An interesting file to study to learn how to integrate machine language code into a ZX81 program (tetris1k, public domain code by Russell Marks)
The ASM (language assembly) file only needs to be unzipped into the ZX-IDE folder.
1. Start FASMW-ZX.EXE
2. open Tetris1k.asm
3. press F8 to compile the code, start the emulator and and run the app
tetris file for ZX-IDE
tetris file for ZX-IDE
- Attachments
-
- tetris1k.asm.zip
- tetris file for ZX-IDE
- (3.01 KiB) Downloaded 153 times
Re: tetris file for ZX-IDE
A simple variation that can be made to the Assembly Language is to change the Keys used by the game from
From S, D, K, L to the arrow keys v, <, >
Change these lines
to
For the key codes, see ZX81 manual "Appendix A - The character set".
Try it: For the shifted Arrow keys, try 72h (left arrow) and 73h (right arrow).
From S, D, K, L to the arrow keys v, <, >
Change these lines
Code: Select all
cp 030h ;left (k)
...
cp 031h ;right (l)
...
cp 029h ;drop (d)
Code: Select all
cp 21h ;left (5 "<-"")
...
cp 24h ;right(8 "->"")
...
cp 22h ;drop (6 [down arrow])
Try it: For the shifted Arrow keys, try 72h (left arrow) and 73h (right arrow).