Added example code

This commit is contained in:
2020-04-02 23:44:05 +02:00
parent 61d533eb17
commit 937e360bf0
5 changed files with 116 additions and 0 deletions

10
src/example/str_out.asm Normal file
View File

@@ -0,0 +1,10 @@
10;output a string into the top left of the screen
20 ORG 0100H ;Start at addr 0x100
30START: LD HL,DATA ;Load the start address of the string
40 LD B,0DH ;The length of the string (max 255 chars)
50 LD DE,0H ;Start in the top left corner (D=0-3 -> row; E=0-23 column)
60 CALL 84CDH ;Call the str_out function in ROM
70 RET ;Return from call
80DATA: DB 'HELLO, WORLD!'
90 END ;End marker for the assembler