.export syschk
.import __SYSCHK_LOAD__
- .import __SAVEAREA_LOAD__
+ .import __STARTADDRESS__ ; needed by xlmemchk.inc
.include "zeropage.inc"
.include "atari.inc"
.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
.endproc
+end:
+
; ------------------------------------------------------------------------
; Chunk "trailer" - sets INITAD
-trailer:
+.segment "SYSCHKTRL"
+
.word INITAD
.word INITAD+1
- .word __SYSCHK_LOAD__
+ .word syschk
.endif ; .if .defined(__ATARIXL__)