Added example code
This commit is contained in:
10
src/example/str_out.asm
Normal file
10
src/example/str_out.asm
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user