Add Atari version of of doesclrscrafterexit().

- Update documentation.
- Update atari.h and apple2.h header files.
- Adapt Atari test/target programs.
- Fix a typo in "div" entry in funcref.sgml.
This commit is contained in:
Christian Groessler
2016-06-07 00:42:51 +02:00
parent 13482984ca
commit c7874b9f60
8 changed files with 71 additions and 39 deletions

19
libsrc/atari/doesclrscr.s Normal file
View File

@@ -0,0 +1,19 @@
;
; Christian Groessler, June-2016
;
; unsigned char doesclrscr(void);
;
; returns 0/1 if after program termination the screen isn't/is cleared
;
.export _doesclrscrafterexit
.import __dos_type
.include "atari.inc"
_doesclrscrafterexit:
ldx #0
lda __dos_type
cmp #MAX_DOS_WITH_CMDLINE + 1
txa
rol a
rts

View File

@@ -7,14 +7,9 @@
;
.export __is_cmdline_dos
.import __dos_type
.include "atari.inc"
.import _doesclrscrafterexit
__is_cmdline_dos:
ldx #0
lda __dos_type
cmp #MAX_DOS_WITH_CMDLINE + 1
txa
rol a
eor #$01
jsr _doesclrscrafterexit ; currently (unless a DOS behaving differently is popping up)
eor #$01 ; we can get by with the inverse of _doesclrscrafterexit
rts

View File

@@ -35,7 +35,7 @@ static struct __iocb *findfreeiocb(void)
static void exitfn(void)
{
/* if DOS will automatically clear the screen, after the program exits, wait for a keypress... */
if (! _is_cmdline_dos())
if (doesclrscrafterexit())
cgetc();
}