TRS80 zcc optimization

Discussion about other targets
Post Reply
voidstar
New member
Posts: 6
Joined: Sun May 30, 2021 6:38 am

TRS80 zcc optimization

Post by voidstar »

I'm targeting a TRS80 (model 3). The code is compiling and running - now I'd like to explore optimization options. I understand zcc is a front-end that is doing a lot of things for me behind the scenes - but I'm little lost on what all that is (z88dk-z80asm.exe and zsdcc.exe?) and why I need -create-app

Here is what I'm using to compile:

zcc +trs80 -vn test.c utility.c core.c destiny_structs.c game_strings.c -create-app -subtype=disk -lndos -lm -o test

And it runs with the emulator like this:

trs80gp -m3 test.out -dx
-dx Disable floppy disk controller (boot into ROM BASIC)

Do I need -lndos? I tried passing optimize for speed, but I don't think it was working (probably not passed correctly). I think there are some TRS80 target examples, but they are all 1 single .c file.

In the cc65 world, I'd run cc65, ca65, then ld65 -- trying to clarify the equivalent aspects for z88dk.

Thanks!
User avatar
jorgegv
Well known member
Posts: 287
Joined: Wed Nov 18, 2020 5:08 pm

Re: TRS80 zcc optimization

Post by jorgegv »

voidstar wrote: Thu Jun 03, 2021 4:26 am In the cc65 world, I'd run cc65, ca65, then ld65 -- trying to clarify the equivalent aspects for z88dk.
ZCC does the same but behind the scenes (similarly to GCC for regular compilations):
  • sccz80, zsdcc, etc. are the equivalents of your cc65
  • z88dk-z80asm is the equivalent of your ca65
  • I guess the linker is included with sccz80 or zsdcc (your ld65) - I don't have any z*ld in my z88dk install
  • And -appmake tells the compiler to do an additional pass to generate platform-specific output, e.g. a .TAP file for a Spectrum platform.
User avatar
jorgegv
Well known member
Posts: 287
Joined: Wed Nov 18, 2020 5:08 pm

Re: TRS80 zcc optimization

Post by jorgegv »

Sorry, instead of -appmake I meant -create-app. z88dk-appmake is the name of the tool that is invoked behind the scenes
Post Reply