--- /dev/null
+FEATURES {
+ STARTADDRESS: default = $2E00;
+}
+SYMBOLS {
+ __EXEHDR__: type = import;
+ __MAINCHNKHDR__: type = import;
+ __AUTOSTART__: type = import; # force inclusion of autostart "trailer"
+ __STARTADDRESS__: type = export, value = %S;
+}
+MEMORY {
+ ZP: file = "", define = yes, start = $0082, size = $007E;
+
+# file header, just $FFFF
+ HEADER: file = %O, start = $0000, size = $0002;
+
+# "main program" load chunk
+ MAINHDR: file = %O, start = $0000, size = $0004;
+ RAM: file = %O, define = yes, start = %S, size = $BC20 - %S;
+ TRAILER: file = %O, start = $0000, size = $0006;
+}
+SEGMENTS {
+ EXEHDR: load = HEADER, type = ro, optional = yes;
+ MAINHDR: load = MAINHDR, type = ro, optional = yes;
+ CODE: load = RAM, type = ro, define = yes, optional = yes;
+ RODATA: load = RAM, type = ro optional = yes;
+ DATA: load = RAM, type = rw optional = yes;
+ BSS: load = RAM, type = bss, define = yes, optional = yes;
+ ZEROPAGE: load = ZP, type = zp;
+ AUTOSTRT: load = TRAILER, type = ro, optional = yes;
+}
STARTADDRESS: default = $2000;
}
SYMBOLS {
+ __EXEHDR__: type = import;
+ __SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
+ __MAINCHNKHDR__: type = import;
+ __AUTOSTART__: type = import; # force inclusion of autostart "trailer"
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
__STARTADDRESS__: type = export, value = %S;
__RESERVED_MEMORY__: type = weak, value = $0000;
- __SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
}
MEMORY {
ZP: file = "", define = yes, start = $0082, size = $007E;
STARTADDRESS: default = $2000;
}
SYMBOLS {
+ __EXEHDR__: type = import;
+ __SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
+ __MAINCHNKHDR__: type = import;
+ __AUTOSTART__: type = import; # force inclusion of autostart "trailer"
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__STARTADDRESS__: type = export, value = %S;
__RESERVED_MEMORY__: type = weak, value = $0000;
- __SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
}
MEMORY {
ZP: file = "", define = yes, start = $0082, size = $007E;
}
SYMBOLS {
+ __EXEHDR__: type = import;
+ __SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
+ __MAINCHNKHDR__: type = import;
+ __AUTOSTART__: type = import; # force inclusion of autostart "trailer"
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__STARTADDRESS__: type = export, value = %S;
- __SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
sramprep: type = import; # force inclusion of SRPREP
}
}
SYMBOLS {
+ __EXEHDR__: type = import;
+ __SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
+ __MAINCHNKHDR__: type = import;
+ __AUTOSTART__: type = import; # force inclusion of autostart "trailer"
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
__STARTADDRESS__: type = export, value = %S;
- __SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
sramprep: type = import; # force inclusion of SRPREP
}
}
SYMBOLS {
+ __EXEHDR__: type = import;
+ __SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
+ __MAINCHNKHDR__: type = import;
+ __AUTOSTART__: type = import; # force inclusion of autostart "trailer"
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__STARTADDRESS__: type = export, value = %S;
- __SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
sramprep: type = import; # force inclusion of SRPREP
}
; Stefan Haubenthal
;
- .export _exit
.export __STARTUP__ : absolute = 1 ; Mark as startup
+ .export _exit, start
.import initlib, donelib
.import callmain, zerobss
- .import __STARTUP_LOAD__, __BSS_LOAD__
.import __RESERVED_MEMORY__
.import __RAM_START__, __RAM_SIZE__
.ifdef __ATARIXL__
.include "atari.inc"
; ------------------------------------------------------------------------
-; EXE header
-
-.segment "EXEHDR"
-
- .word $FFFF
-
-.segment "MAINHDR"
-
- .word __STARTUP_LOAD__
- .word __BSS_LOAD__ - 1
-
-; ------------------------------------------------------------------------
-; Actual code
.segment "STARTUP"
.ifndef __ATARIXL__
APPMHI_save: .res 2
.endif
-
-
-.segment "AUTOSTRT"
- .word RUNAD ; defined in atari.inc
- .word RUNAD+1
- .word start
--- /dev/null
+; This file defines the EXE header for Atari executables
+
+ .export __EXEHDR__: absolute = 1
+
+.segment "EXEHDR"
+
+ .word $FFFF
+
--- /dev/null
+; This file defines the EXE file "trailer" which sets the entry point
+
+ .export __AUTOSTART__: absolute = 1
+ .import start
+
+ .include "atari.inc"
+
+.segment "AUTOSTRT"
+ .word RUNAD ; defined in atari.inc
+ .word RUNAD+1
+ .word start
+
--- /dev/null
+; This file defines the chunk header for the main program load chunk
+
+ .export __MAINCHNKHDR__: absolute = 1
+ .import __RAM_START__, __BSS_LOAD__
+
+.segment "MAINHDR"
+
+ .word __RAM_START__
+ .word __BSS_LOAD__ - 1