From: Daniel Serpell Date: Sun, 2 Dec 2018 00:45:22 +0000 (-0300) Subject: Adds documentation and a sample config file for the ATARI format. X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e767c8990d07003d9c91a6151cc61f0ea28639ea;p=cc65 Adds documentation and a sample config file for the ATARI format. --- diff --git a/cfg/atari-xex.cfg b/cfg/atari-xex.cfg new file mode 100644 index 000000000..f0a6291db --- /dev/null +++ b/cfg/atari-xex.cfg @@ -0,0 +1,24 @@ +FEATURES { + STARTADDRESS: default = $2E00; +} +SYMBOLS { + __STARTADDRESS__: type = export, value = %S; +} +MEMORY { + ZP: file = "", define = yes, start = $0082, size = $007E; + MAIN: file = %O, define = yes, start = %S, size = $BC20 - %S; +} +FILES { + %O: format = atari; +} +FORMATS { + atari: runad = start; +} +SEGMENTS { + ZEROPAGE: load = ZP, type = zp, optional = yes; + EXTZP: load = ZP, type = zp, optional = yes; # to enable modules to be able to link to C and assembler programs + CODE: load = MAIN, type = rw, define = yes; + RODATA: load = MAIN, type = ro optional = yes; + DATA: load = MAIN, type = rw optional = yes; + BSS: load = MAIN, type = bss, optional = yes, define = yes; +} diff --git a/doc/atari.sgml b/doc/atari.sgml index 80293d82f..346377b36 100644 --- a/doc/atari.sgml +++ b/doc/atari.sgml @@ -203,6 +203,18 @@ is + +This config file allows writing multi segment binaries easily, without having to +write the header explicitly on each segment. + +It is similar to the This config file can be used to create 8K or 16K cartridges. It's suited both diff --git a/doc/ld65.sgml b/doc/ld65.sgml index beb2144bf..0230b517f 100644 --- a/doc/ld65.sgml +++ b/doc/ld65.sgml @@ -894,7 +894,7 @@ look like this: } -The only other available output format is the o65 format specified by Andre +There are two other available formats, one is the o65 format specified by Andre Fachat (see the ). It is defined like this: @@ -904,7 +904,20 @@ name="6502 binary relocation format specification">). It is defined like this: } -The necessary o65 attributes are defined in a special section labeled +The other format available is the Atari (xex) segmented file format, this is +the standard format used by Atari DOS 2.0 and upward file managers in the Atari +8-bit computers, and it is defined like this: + + + FILES { + %O: format = atari; + } + + +In the Atari segmented file format, the linker will write each . @@ -925,6 +938,15 @@ has several attributes that may be defined here. } +The Atari file format has only one attribute, + FORMATS { + atari: runad = _start; + } + The FEATURES section