Unfortunately the IM2 features of Z88DK cannot be used with a ZX81. But it would be nice, if it were possible to hook a C function into the display routine, so that is called 25 or 50 times/sec during SLOW mode (of course outside the time critical section of the display routine).
I ported a IRC chat program from Spectranet zo ZeddyNet. The Speccy version uses IM2 to read and buffer keyboard entries. My workaround on the Zeddy works, but using INTs would be much better
BTW: Could you perhaps add information into WIKI, which libraries are (not) reentrant and (not) romable?
Siggi
EDI: Upps, I mixed NMI with IM2 ...
C-Interrupt routine for ZX81
C-Interrupt routine for ZX81
Last edited by siggi on Tue Feb 21, 2012 10:03 am, edited 1 time in total.
There is no need to stop stef
The test target(s) will exist in parallel for a while yet. The main thing will be a rewrite of stdio and an update to more conformance with c99. The immediate goal is to get networking integrated and to have a model that supports many attached devices through a device driver abstraction attached to the end of a file stream.
Existing library code will only be added incrementally as things are checked for romability, opportunities for improvement, etc, so the test targets will be missing things initially. z88dk has grown a lot over the years through add-ons, so I think this is the right time to take a fresh look at how the whole should fit together.
The test target(s) will exist in parallel for a while yet. The main thing will be a rewrite of stdio and an update to more conformance with c99. The immediate goal is to get networking integrated and to have a model that supports many attached devices through a device driver abstraction attached to the end of a file stream.
Existing library code will only be added incrementally as things are checked for romability, opportunities for improvement, etc, so the test targets will be missing things initially. z88dk has grown a lot over the years through add-ons, so I think this is the right time to take a fresh look at how the whole should fit together.
The new clib is the rewrite.
It uses a sectioned memory model so ROMable code can always be generated automatically. For the zx81 specifically, there should be separate sections for "executable ram" and "data ram" which is easy to set up; the new stdio code uses FILE structures that contain executable code (a jump) so this must be in "executable ram". If you have gaps in your memory map that is easy to accommodate too.
The new clib needs someone to create a zx81 target with lightweight display drivers and provide alternate implementations of functions that use af'. The current zx81 target using the classic library has many different variations so creating a zx81 target should be done by someone with some zx81 knowledge like maybe stef or yourself.
Adding an isr call to the end of the video interrupt shouldn't be that difficult and should be easy to add to the classic library?
It uses a sectioned memory model so ROMable code can always be generated automatically. For the zx81 specifically, there should be separate sections for "executable ram" and "data ram" which is easy to set up; the new stdio code uses FILE structures that contain executable code (a jump) so this must be in "executable ram". If you have gaps in your memory map that is easy to accommodate too.
The new clib needs someone to create a zx81 target with lightweight display drivers and provide alternate implementations of functions that use af'. The current zx81 target using the classic library has many different variations so creating a zx81 target should be done by someone with some zx81 knowledge like maybe stef or yourself.
Adding an isr call to the end of the video interrupt shouldn't be that difficult and should be easy to add to the classic library?