Romable code for all targets

Requests for features
Post Reply
siggi
Well known member
Posts: 344
Joined: Thu Jul 26, 2007 9:06 am

Romable code for all targets

Post by siggi »

For V1.10 it is already in the road map: "Move all library static variables to the crt0s"

If then there will also no selfmodifying code generated by the compiler, it would be (quite) easy to generate romable code with Z88DK.

Hope to be sometimes able to put some tools compiled with Z88DK into the EEPROMs in my ZX81.

Siggi
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

Post by alvin »

Hi siggi,

This is exactly what I intend to look at -- I think it should be a priority to ensure all code is ROMable and that it is easy to separate code and data segments. Sooner or later z88dk will get a new assembler that can generate code for multiple code and data segments and we can look into automatically compiling code for projects of greater than 64k in size. This would be a necessary prelude to this step.

I'm hoping stef and dom will be on board with this as I'm not familiar with all the library code.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

The recent experiments with the Spectrum showed it is half-way between easy and difficult.
In example, we have functions based on ROM calls.. what should we do in that case? Are we thinking at a ROM block parallel to the existing one ?
Anyway, for my possibilities, I'll try to help.
siggi
Well known member
Posts: 344
Joined: Thu Jul 26, 2007 9:06 am

Post by siggi »

I would like to have some compiled tools in the region 8-16K or above 32K on a ZX81, running in the BASIC environment. So ROM calls for this case would be okay.

Or is somebody willing to compile UNIX using Z88DK to replace the Sinclair ROM of my ZX81? :lol:

Siggi
Last edited by siggi on Fri May 15, 2009 11:01 am, edited 1 time in total.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

Siggi, I bet you had that need with the ZX81, but this thread title is "Romable code for all targets", should it make sense do the same on a Spectrum in example ?
By the way it was just one example..
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

I've taken a bit of break off from revising (apologies for the silence) and went back to the assembler I was looking at earlier, things are going well (so far).

I'm missing support for the following instructures: rst, jr, djnz, im and a couple of addressing modes ld (XXXX),a as well as ld (hl),a. From a semi complete list of 690 opcodes, I get a total of 75 errors - I need to create a test suite to validate it of course.

The assembler supports sections, has its own object file format and can easily have the assembler directives replaced (hence backwards compatibility with z80asm is possible).

The linker can understand multiple formats which raises the possibility of backwards compatibility with z80asm library/object files.

Anyway, the jist is that it'll make ROMable code much easier than now and with luck won't be too far off.
siggi
Well known member
Posts: 344
Joined: Thu Jul 26, 2007 9:06 am

Post by siggi »

Hi Stefano,
indeed I need it on a ZX81. But won't the necessary changes (no selfmodifying code, variables in a ram segment) work also on all other targets?
If target-specific libraries need to be modified, the ZX81 libs should be the first ;-)

Siggi
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

Slurp, now I'm looking forward the new features :)
siggi
Well known member
Posts: 344
Joined: Thu Jul 26, 2007 9:06 am

Post by siggi »

Any progress meanwhile? ;)

Siggi
Post Reply