It is possible to load it on a normal ZX81 but may confuse normal users (if they are existing ).marste wrote:I didn't still test, but seems that Antonio's work is possible to be loaded on a real 1K ZX81!...
You have to twice load a file, first a prepared loader and then a second file.
The other hand is, that you have to respect the 1k limit and the limitations of the system (loading specifications).
If you count both single files together you have a program which is over the 1k limit.
You have first a 65 byte file and then a 1016 byte file. So all in all it is 65 byte more than the 1k limit - more or less exactly what you loose as stack needed for the general BASIC handling (loading and starting the program). I could load a program with 950 bytes on a 1k machine with no problem and think this can be even optimized. This was my first quick and dirty attempt.
So for me it is not a ZX81 1k program if you can not provide it in a 1k .p file. But this is philosophic and here you can start a war of opinions, of course. It is the same matter regarding the hardware. How much modding a ZX81 is allowed and how much is too much that the end result won't be a ZX81 anymore. The opinions here are either very different. Anyway, it is a great work from antonio but for me it is breaking the 1k rules. Maybe just for me.
You should take notice of the great work of Dr Beep who programmed many 1k games (which are provided with a single .p file) here:
viewtopic.php?f=4&t=552&start=10
As far as I know he provided all games in a pack and included all sources to the files (so would let you know all the tricks he did) which are available after a small donation he will give to a cancer charity.
http://www.worldofspectrum.org/forums/s ... hp?t=45378
Here the q&d demo, giving 948 byte (including DFILE and vars section) - could be surely optimized.
It just shows a character which is toggling between X and Y every few seconds.
Code: Select all
format zx81
;labelusenumeric
;LISTOFF
MEMAVL = MEM_1K
STARTMODE EQU SLOW_MODE
include 'SINCL-ZX\ZX81.INC' // definitions of constants
;LISTON
AUTORUN:
10 REM _asm
LD HL,(16396)
INC HL
@@: CALL .loop
INC (HL)
CALL .loop
DEC (HL)
JR @b
.loop: HALT
DJNZ $-1
DEC C
JR NZ,.loop
RET
db $2FC dup 0 // free area of code plus overwriting the system variables (not all allowed) and shorten the stack
END _asm
RAND USR _hide #10#
DFILE_ADDR:
db $76
dbzx 'X'
db 24 dup($76)
VARS_ADDR:
db $80
WORKSPACE: