X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=inline;f=libsrc%2Fatari%2Fsystem_check.s;h=b1d80b0c2885acdd507be78414da6808decfe5fd;hb=85170998ad45cadb2064fa68349bb3a8975efd89;hp=ee74809220ce2b5749517fac0fed9178f7642e5c;hpb=e4c934b6f541786c18192e893b59f93ba2719884;p=cc65 diff --git a/libsrc/atari/system_check.s b/libsrc/atari/system_check.s index ee7480922..b1d80b0c2 100644 --- a/libsrc/atari/system_check.s +++ b/libsrc/atari/system_check.s @@ -17,7 +17,7 @@ DEBUG = 1 .export syschk .import __SYSCHK_LOAD__ - .import __SAVEAREA_LOAD__ + .import __STARTADDRESS__ ; needed by xlmemchk.inc .include "zeropage.inc" .include "atari.inc" @@ -64,24 +64,25 @@ cont: ldx #0 ; channel 0 .segment "SYSCHKHDR" .word __SYSCHK_LOAD__ - .word trailer - 1 + .word end - 1 ; ------------------------------------------------------------------------ ; Actual code .segment "SYSCHK" +; no XL machine +no_xl: print_string "This program needs an XL machine." + jmp fail + +; entry point syschk: lda $fcd8 ; from ostype.s cmp #$a2 - bne is_xl - -; no XL machine - print_string "This program needs an XL machine." - jmp fail + beq no_xl ; we have an XL machine, now check memory -is_xl: lda RAMSIZ + lda RAMSIZ cmp #$80 bcs sys_ok @@ -142,12 +143,15 @@ loop: dey .endproc +end: + ; ------------------------------------------------------------------------ ; Chunk "trailer" - sets INITAD -trailer: +.segment "SYSCHKTRL" + .word INITAD .word INITAD+1 - .word __SYSCHK_LOAD__ + .word syschk .endif ; .if .defined(__ATARIXL__)