z88dk forums

z80 Development Kit

You are not logged in.

#1 2009-05-13 21:12:46

siggi
Well known member
Registered: 2007-07-26
Posts: 160

Romable code for all targets

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


My ZX81 web-server, compiled with Z88DK V1.7:
http://zx81-siggi.endoftheinternet.org/index.html smile
Online since 2007 ...

Offline

 

#2 2009-05-14 08:04:35

alvin
Administrator
Registered: 2007-07-16
Posts: 338

Re: Romable code for all targets

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.

Offline

 

#3 2009-05-14 22:02:00

stefano
Administrator
Registered: 2007-07-16
Posts: 711

Re: Romable code for all targets

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.

Offline

 

#4 2009-05-15 12:00:56

siggi
Well known member
Registered: 2007-07-26
Posts: 160

Re: Romable code for all targets

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 (2009-05-15 12:01:41)


My ZX81 web-server, compiled with Z88DK V1.7:
http://zx81-siggi.endoftheinternet.org/index.html smile
Online since 2007 ...

Offline

 

#5 2009-05-15 19:15:13

stefano
Administrator
Registered: 2007-07-16
Posts: 711

Re: Romable code for all targets

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..

Offline

 

#6 2009-05-15 22:22:46

dom
Administrator
Registered: 2007-07-15
Posts: 745
Website

Re: Romable code for all targets

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.

Offline

 

#7 2009-05-16 08:17:48

siggi
Well known member
Registered: 2007-07-26
Posts: 160

Re: Romable code for all targets

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


My ZX81 web-server, compiled with Z88DK V1.7:
http://zx81-siggi.endoftheinternet.org/index.html smile
Online since 2007 ...

Offline

 

#8 2009-05-16 11:53:14

stefano
Administrator
Registered: 2007-07-16
Posts: 711

Re: Romable code for all targets

Slurp, now I'm looking forward the new features  smile

Offline

 

#9 2010-03-29 15:27:05

siggi
Well known member
Registered: 2007-07-26
Posts: 160

Re: Romable code for all targets

Any progress meanwhile? wink

Siggi


My ZX81 web-server, compiled with Z88DK V1.7:
http://zx81-siggi.endoftheinternet.org/index.html smile
Online since 2007 ...

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson