Merge pull request #2606 from groessler/something_to_pull

Atari: fix fallout of change of INIT segment to 'bss' type
This commit is contained in:
Christian Groessler
2025-02-25 21:55:48 +01:00
committed by GitHub
11 changed files with 17 additions and 13 deletions

View File

@@ -22,8 +22,8 @@ SEGMENTS {
CODE: load = MAIN, type = ro, define = yes; CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro, optional = yes; RODATA: load = MAIN, type = ro, optional = yes;
DATA: load = MAIN, type = rw, optional = yes; DATA: load = MAIN, type = rw, optional = yes;
INIT: load = MAIN, type = bss, define = yes, optional = yes;
BSS: load = MAIN, type = bss, define = yes, optional = yes; BSS: load = MAIN, type = bss, define = yes, optional = yes;
INIT: load = MAIN, type = bss, optional = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,

View File

@@ -52,7 +52,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro, define = yes; CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw; DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss, optional = yes; INIT: load = MAIN, type = bss, define = yes, optional = yes;
BSS: load = MAIN, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro; AUTOSTRT: load = TRAILER, type = ro;
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes; OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;

View File

@@ -36,7 +36,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro, define = yes; CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw; DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss, optional = yes; INIT: load = MAIN, type = bss, define = yes, optional = yes;
BSS: load = MAIN, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
} }
FEATURES { FEATURES {

View File

@@ -40,7 +40,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro, define = yes; CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw; DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss, optional = yes; INIT: load = MAIN, type = bss, define = yes, optional = yes;
BSS: load = MAIN, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro; AUTOSTRT: load = TRAILER, type = ro;
} }

View File

@@ -67,7 +67,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro, define = yes; CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw; DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss, optional = yes; INIT: load = MAIN, type = bss, define = yes, optional = yes;
BSS: load = MAIN, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro; AUTOSTRT: load = TRAILER, type = ro;
} }

View File

@@ -78,7 +78,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro, define = yes; CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw; DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss, optional = yes; INIT: load = MAIN, type = bss, define = yes, optional = yes;
BSS: load = MAIN, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro; AUTOSTRT: load = TRAILER, type = ro;

View File

@@ -58,7 +58,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro, define = yes; CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw; DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss, optional = yes; INIT: load = MAIN, type = bss, define = yes, optional = yes;
BSS: load = MAIN, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
SRPREPHDR: load = UNUSED, type = ro; SRPREPHDR: load = UNUSED, type = ro;
SRPREPTRL: load = UNUSED, type = ro; SRPREPTRL: load = UNUSED, type = ro;

View File

@@ -65,7 +65,7 @@ SEGMENTS {
CODE: load = MAIN, type = ro, define = yes; CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw; DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss, optional = yes; INIT: load = MAIN, type = bss, define = yes, optional = yes;
BSS: load = MAIN, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro; AUTOSTRT: load = TRAILER, type = ro;
} }

View File

@@ -10,10 +10,10 @@
.include "atari.inc" .include "atari.inc"
.import __BSS_RUN__, __STARTADDRESS__, _cas_init .import __INIT_RUN__, __STARTADDRESS__, _cas_init
.export _cas_hdr .export _cas_hdr
.assert ((__BSS_RUN__ - __STARTADDRESS__ + 127) / 128) < $101, error, "File to big to load from cassette" .assert ((__INIT_RUN__ - __STARTADDRESS__ + 127) / 128) < $101, error, "File to big to load from cassette"
; for a description of the cassette header, see De Re Atari, appendix C ; for a description of the cassette header, see De Re Atari, appendix C
@@ -22,7 +22,7 @@
_cas_hdr: _cas_hdr:
.byte 0 ; ignored .byte 0 ; ignored
.byte <((__BSS_RUN__ - __STARTADDRESS__ + 127) / 128) ; # of 128-byte records to read .byte <((__INIT_RUN__ - __STARTADDRESS__ + 127) / 128) ; # of 128-byte records to read
.word __STARTADDRESS__ ; load address .word __STARTADDRESS__ ; load address
.word _cas_init ; init address .word _cas_init ; init address

View File

@@ -204,6 +204,10 @@ APPMHI_save: .res 2
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
.segment "INIT" ; have at least one (empty) segment of INIT, exehdr.s needs its definition
; ------------------------------------------------------------------------
.segment "LOWCODE" ; have at least one (empty) segment of LOWCODE, so that the next line works even if the program doesn't make use of this segment .segment "LOWCODE" ; have at least one (empty) segment of LOWCODE, so that the next line works even if the program doesn't make use of this segment
.assert (__LOWCODE_RUN__ + __LOWCODE_SIZE__ <= $4000 || __LOWCODE_RUN__ > $7FFF || __LOWCODE_SIZE__ = 0), warning, "'lowcode area' reaches into $4000..$7FFF bank memory window" .assert (__LOWCODE_RUN__ + __LOWCODE_SIZE__ <= $4000 || __LOWCODE_RUN__ > $7FFF || __LOWCODE_SIZE__ = 0), warning, "'lowcode area' reaches into $4000..$7FFF bank memory window"
; check for LOWBSS_SIZE = 0 not needed since the only file which uses LOWBSS (irq.s) also uses LOWCODE ; check for LOWBSS_SIZE = 0 not needed since the only file which uses LOWBSS (irq.s) also uses LOWCODE

View File

@@ -1,11 +1,11 @@
; This file defines the EXE header and main chunk load header for Atari executables ; This file defines the EXE header and main chunk load header for Atari executables
.export __EXEHDR__: absolute = 1 .export __EXEHDR__: absolute = 1
.import __MAIN_START__, __BSS_LOAD__ .import __MAIN_START__, __INIT_LOAD__
.segment "EXEHDR" .segment "EXEHDR"
.word $FFFF .word $FFFF
.segment "MAINHDR" .segment "MAINHDR"
.word __MAIN_START__ .word __MAIN_START__
.word __BSS_LOAD__ - 1 .word __INIT_LOAD__ - 1