From aac88eac53e3a0dc178a7711741e12f021850de1 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Fri, 13 Sep 2013 18:28:17 +0200 Subject: [PATCH] Use labels instead of segment load addresses to specify entry points in the EXE file. --- libsrc/atari/crt0.s | 4 +++- libsrc/atari/shadow_ram_prepare.s | 2 +- libsrc/atari/system_check.s | 14 +++++++------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/libsrc/atari/crt0.s b/libsrc/atari/crt0.s index eb5de1f40..e30d7c07f 100644 --- a/libsrc/atari/crt0.s +++ b/libsrc/atari/crt0.s @@ -52,6 +52,8 @@ ; Real entry point: +start: + .if .defined(__ATARIXL__) jsr sram_init .endif @@ -229,4 +231,4 @@ APPMHI_save: .res 2 .segment "AUTOSTRT" .word RUNAD ; defined in atari.inc .word RUNAD+1 - .word __STARTUP_LOAD__ + 1 + .word start diff --git a/libsrc/atari/shadow_ram_prepare.s b/libsrc/atari/shadow_ram_prepare.s index dd8b2c0da..78e7ba4f0 100644 --- a/libsrc/atari/shadow_ram_prepare.s +++ b/libsrc/atari/shadow_ram_prepare.s @@ -374,6 +374,6 @@ screen_device_length = * - screen_device .word INITAD .word INITAD+1 - .word __SRPREP_LOAD__ + .word sramprep .endif ; .if .defined(__ATARIXL__) diff --git a/libsrc/atari/system_check.s b/libsrc/atari/system_check.s index ee7480922..2baa5d19c 100644 --- a/libsrc/atari/system_check.s +++ b/libsrc/atari/system_check.s @@ -71,17 +71,17 @@ cont: ldx #0 ; channel 0 .segment "SYSCHK" +; no XL machine +no_xl: print_string "This program needs an XL machine." + jmp fail + 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 @@ -148,6 +148,6 @@ loop: dey trailer: .word INITAD .word INITAD+1 - .word __SYSCHK_LOAD__ + .word syschk .endif ; .if .defined(__ATARIXL__) -- 2.39.5