From: uz Date: Tue, 4 Jan 2011 19:39:07 +0000 (+0000) Subject: More changes by Karri Kaksonen. X-Git-Tag: V2.13.3~559 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a2ec97ac13bfd51921a4c9c01e24b16de10d6c7b;p=cc65 More changes by Karri Kaksonen. git-svn-id: svn://svn.cc65.org/cc65/trunk@4899 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/include/dirent.h b/include/dirent.h index 362e5b868..612fe3869 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -79,6 +79,19 @@ struct dirent { char d_name[13]; /* 8.3 + trailing 0 */ }; +#elif defined(__LYNX__) + +struct dirent { + unsigned char d_blocks; + unsigned int d_offset; + char d_type; + void *d_address; + unsigned int d_size; +}; + +extern struct dirent FileEntry; +#pragma zpsym ("FileEntry"); + #else struct dirent { diff --git a/libsrc/lynx/open.s b/libsrc/lynx/open.s index f4d0471b0..3ef56cd03 100644 --- a/libsrc/lynx/open.s +++ b/libsrc/lynx/open.s @@ -112,8 +112,8 @@ flagsok: jsr steaxysp lda #$01 jsr pusha0 - lda _FileEntry - ldx _FileEntry+1 + lda #<_FileEntry + ldx #>_FileEntry jsr pushax ldx #$00 lda #$08 diff --git a/src/ld65/cfg/lynx.cfg b/src/ld65/cfg/lynx.cfg index d94b1fa90..5d45a2614 100644 --- a/src/ld65/cfg/lynx.cfg +++ b/src/ld65/cfg/lynx.cfg @@ -10,12 +10,12 @@ MEMORY { } SEGMENTS { EXEHDR: load = HEADER, type = ro; - STARTUP: load = RAM, type = ro; + STARTUP: load = RAM, type = ro, define = yes; LOWCODE: load = RAM, type = ro, optional = yes; INIT: load = RAM, type = ro, define = yes, optional = yes; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; + CODE: load = RAM, type = ro, define = yes; + RODATA: load = RAM, type = ro, define = yes; + DATA: load = RAM, type = rw, define = yes; BSS: load = RAM, type = bss, define = yes; ZEROPAGE: load = ZP, type = zp; EXTZP: load = ZP, type = zp, optional = yes;