dr beep wrote: ↑Sun Apr 23, 2017 8:46 pm
My experience:
LASTK, MARGIN, FLAGX, FRAMES and CDFLAG can't be used.
Talking about ZX81 (and not thinking to have a custom display routine anyway needing a pointer) also DFILE cannot be used and I added also DB_ST (but on this I may be wrong), while FLAGX in my experience can be used (I mean if you put values there they will be kept when program will be run), while I think you can use CDFLAG (and many others listed with xx and maybe also the ? ones) as memory after the asm program start.
dr beep wrote: ↑Sun Apr 23, 2017 8:46 pm
You can set the start to machine code (only BASIC-command ever on reusable memory (best on variablesmemory or array or on screen that gets cleared directly after loading)
In the kit is at the end, and infact all the memory after "maxstack available line" is used by stack in SuperMicro (in order of clearing: basic pgm -firsto to go-, asm init code, initial chess playing logic - last to go but cleared when main logic start playing)
dr beep wrote: ↑Sun Apr 23, 2017 8:46 pm
Smallest needed code is 11 bytes. where 4 bytes can be coded.
Yes, you gave me this idea!!
dr beep wrote: ↑Sun Apr 23, 2017 8:46 pm
BASIC-prog:
Linenumber: 2 bytes, byte 1 max value 63 second all values allowed
Linelength: 2 bytes, every length (and code) allowed
I highlighted this in ZX80 basic routine, but infact I should write properly the limits for ZX81!
dr beep wrote: ↑Sun Apr 23, 2017 8:46 pm
BASIC-call: 3 bytes defb 249, 212, 28 "RANDOMIZE USR 0"
Marker start floating point: 1 byte, 126
Floating point short: 3 bytes defb 143, 0, 18 (address #4009 where you code JP START)
Final 2 bytes of floatingpoint number can be skipped as can end of BASIC.
The final 2 bytes can be whateve value since they are the decimal digits of the FP number. In order to save (and use differently) also the useful 3 bytes at 4009 I developed the formula you can see in the kit (calculated by the assembler at compile time) based on reported documentation to jump directly to init (without the double jump).
Last note: hope that you also will start to develop for ZX80! The kit is already multiplatform, meaning you can use the same source for both platforms!
Happy hacking!
_Stefano