GEMDOS console functions and termination upon ctrl c

GFA, ASM, STOS, ...

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

Post Reply
User avatar
Count
Atari maniac
Atari maniac
Posts: 90
Joined: Sat Sep 16, 2017 9:15 am
Location: Germany

GEMDOS console functions and termination upon ctrl c

Post by Count »

As you may know, the GEMDOS console functions like Cconout, Cconin etc. lead to program termination when ctrl c is pressed. Same with mintlib's standard io functions, which use Fwrite and Fread.

Is there any way to disable this behaviour (plain TOS)?
User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2724
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: GEMDOS console functions and termination upon ctrl c

Post by charles »

rewrite over it in memory?
or avoid using it.
The radioactive half-life : )
Atari is a lifestyle,not a hobby.
HOLD ON ! ! ! Im printing unreadable characters ...!
joska
Hardware Guru
Hardware Guru
Posts: 4823
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: GEMDOS console functions and termination upon ctrl c

Post by joska »

Not tested by me, but I believe you can use Crawin()/Crawio() for character input/output.
Jo Even

VanillaMiNT - Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64
User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12959
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: GEMDOS console functions and termination upon ctrl c

Post by wongck »

Not tested, may be Bconin/Bconout is low level enough?
My Stuff: FB/Falcon CT63 CTPCI ATI RTL8139 USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
joska
Hardware Guru
Hardware Guru
Posts: 4823
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: GEMDOS console functions and termination upon ctrl c

Post by joska »

As a general rule you should not use BIOS functions when writing a GEMDOS program.
Jo Even

VanillaMiNT - Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64
User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12959
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: GEMDOS console functions and termination upon ctrl c

Post by wongck »

Ah, learn something new everyday. Thanks for the rule.
My Stuff: FB/Falcon CT63 CTPCI ATI RTL8139 USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
User avatar
Count
Atari maniac
Atari maniac
Posts: 90
Joined: Sat Sep 16, 2017 9:15 am
Location: Germany

Re: GEMDOS console functions and termination upon ctrl c

Post by Count »

joska wrote:As a general rule you should not use BIOS functions when writing a GEMDOS program.
That was my intention to ask this question. But if there is no chance to disable that by setting a bit in a system variable or something like that, I will switch over to BIOS functions. The RAWCON device is no option since I need the VT52 sequences.
User avatar
shoggoth
Nature
Nature
Posts: 1031
Joined: Tue Aug 01, 2006 9:21 am
Location: Halmstad, Sweden
Contact:

Re: GEMDOS console functions and termination upon ctrl c

Post by shoggoth »

If you’re writing C code, just catch the appropriera signal iirc.
Ain't no space like PeP-space.
Spectone
Atariator
Atariator
Posts: 26
Joined: Thu Dec 27, 2012 4:15 am
Location: Queensland

Re: GEMDOS console functions and termination upon ctrl c

Post by Spectone »

When a ctrl-c is received gemdos calls Pterm() but before it terminates the process it call the etv_term vector to give the process a chance to clean up. Setexc() can set the etv_term vector.

Where does Pterm() lead to? Probably the previous Pexec(). You can call Pexec() youself and when you get that Pterm() execution will return to just after the Pexec() you called.
Post Reply

Return to “Coding”