Following the instruction of Chapter 10 of First Steps in Z80 Assembly Language by Darryl Sloan: Firstly, we fill the screen with a BASIC program of random colored "hello" messages. The assembler code, as I understand it, is then able to copy that screen data and print it back after the screen is cleared.
However, I just get a black screen instead of the random collection of coloured hello.
This is the asm
ORG 50000; Origin statement
LD HL, 30000 ; start address
LD BC, 6912 ; number of bytes to copy
LD DE, 16384 ; destination address
LDIR
RET
and the BASIC
40 PRINT INK INT (RND*8); PAPER INT (RND*8); "Hello";
50 GO TO 50
I understand the concept and the code, however unlike the author, I'm not using an emulator with a built in assembler. - Which is where I may be going wrong.
- Write assembler code in notepad.
- Convert asm code to tap
- Load in tap file
- Type the two lines of BASIC in the emulator to the existing code
- RUN program in emulator
- RANDOMIZE USR 50000
The source document is made free available and can be found here