[coleco] add pragmas for OS7 features?

tschak909
Well known member
Posts: 171
Joined: Sun Sep 09, 2018 5:44 pm

Re: [coleco] add pragmas for OS7 features?

Post by tschak909 »

I need to be able to set the BSS to avoid the sound and controller areas, and this is flubbing:

zcc +coleco -m -s -pragma-define:CRT_ENABLE_STDIO=0 -pragma-define:REGISTER_SP=0x73B8 -pragma-define:CLIB_FOPEN_MAX=0 -pragma-define:fputc_cons=0 -pragma-define:CLIB_DEFAULT_SCREEN_MODE=-1 -pragma-define:CRT_ORG_BSS=0x708C -L../.. -los7 -osound_demo.rom -create-app ./build/./src/sound_demo.c.o
/home/thomc/Workspace/z88dk/lib/config/../../lib/target/coleco/classic/rom.asm:12: error: duplicate definition: CRT_ORG_BSS
^---- defc CRT_ORG_BSS = 0x7000
^---- defc CRT_ORG_BSS=28672
make: *** [Makefile:21: build/sound_demo.rom] Error 1

what can I do here? I am currently changing the value in rom.asm
tschak909
Well known member
Posts: 171
Joined: Sun Sep 09, 2018 5:44 pm

Re: [coleco] add pragmas for OS7 features?

Post by tschak909 »

I wound up doing this in rom.asm

Code: Select all

IF !DEFINED_CRT_ORG_BSS                                                                                                              
    defc    CRT_ORG_BSS = 0x7000                                                                                                     
ENDIF                                                                                                                                
User avatar
dom
Well known member
Posts: 2014
Joined: Sun Jul 15, 2007 10:01 pm

Re: [coleco] add pragmas for OS7 features?

Post by dom »

Ah, so there's some memory used by those routines that isn't in the header?

That's the right fix BTW :) I'll add it to the repo.
tschak909
Well known member
Posts: 171
Joined: Sun Sep 09, 2018 5:44 pm

Re: [coleco] add pragmas for OS7 features?

Post by tschak909 »

Basically, from 0x7000 to 0x7020 is not used. 0x7020 to 0x702A is hard-coded to be used by the sound routines, and 73B9 is noted as the top of the stack, with locations below it being reserved for various OS7 pointers.
detailed.png
You do not have the required permissions to view the files attached to this post.
Post Reply