tetris file for ZX-IDE

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
David G
Posts: 387
Joined: Thu Jul 17, 2014 7:58 am
Location: 21 North, 156 West

tetris file for ZX-IDE

Post by David G »

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
Attachments
tetris1k.asm.zip
tetris file for ZX-IDE
(3.01 KiB) Downloaded 151 times
David G
Posts: 387
Joined: Thu Jul 17, 2014 7:58 am
Location: 21 North, 156 West

Re: tetris file for ZX-IDE

Post by David G »

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

Code: Select all

cp 030h         ;left (k)
...
cp 031h         ;right (l)
...
cp 029h         ;drop (d)
to

Code: Select all

cp 21h         ;left (5 "<-"")
...
cp 24h         ;right(8 "->"")
... 
cp 22h         ;drop (6 [down arrow])
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).
Post Reply