Remove line number
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
10;Queries the keyboard for input and prints the resulting keycode
|
;Queries the keyboard for input and prints the resulting keycode
|
||||||
20 ORG 100H ;Tell the assembler to start at addr 0x100
|
ORG 100H ;Tell the assembler to start at addr 0x100
|
||||||
30START: LD HL,GREET ;Load the start addr. of the banner text
|
START: LD HL,GREET ;Load the start addr. of the banner text
|
||||||
40 LD B,15H ;The length if the string
|
LD B,15H ;The length if the string
|
||||||
50 LD DE,0H ;Start output in the top left corner
|
LD DE,0H ;Start output in the top left corner
|
||||||
60 CALL 84CDH ;Call str_out
|
CALL 84CDH ;Call str_out
|
||||||
70LOOP: CALL 8881H ;Call the char_in
|
LOOP: CALL 8881H ;Call the char_in
|
||||||
80 LD DE,16H ;Position cursor in row 0, col 22
|
LD DE,16H ;Position cursor in row 0, col 22
|
||||||
90 CALL 8468H ;Print the char
|
CALL 8468H ;Print the char
|
||||||
100 JR LOOP ;Retrun to the loop
|
JR LOOP ;Retrun to the loop
|
||||||
110 RET ;End the program
|
RET ;End the program
|
||||||
120GREET: DB 'Test keyboard input: '
|
GREET: DB 'Test keyboard input: '
|
||||||
130 END ;Mark the end of code for the assembler
|
END ;Mark the end of code for the assembler
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
10;Outputs an "A" in the second column of the last row
|
;Outputs an "A" in the second column of the last row
|
||||||
20 ORG 100H ;Tell the assembler to start at addr. 0x100
|
ORG 100H ;Tell the assembler to start at addr. 0x100
|
||||||
30START: LD A,41H ;Load the letter "A" to register A
|
START: LD A,41H ;Load the letter "A" to register A
|
||||||
40 LD DE,301H ;Sets the row to 3 and the column to 1
|
LD DE,301H ;Sets the row to 3 and the column to 1
|
||||||
50 CALL 8468H ;Calls the ```char_out``` function
|
CALL 8468H ;Calls the ```char_out``` function
|
||||||
60 RET ;Return
|
RET ;Return
|
||||||
70 END ;Marks the end of the code for the assembler
|
END ;Marks the end of the code for the assembler
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
10;output a string into the top left of the screen
|
;output a string into the top left of the screen
|
||||||
20 ORG 0100H ;Start at addr 0x100
|
ORG 0100H ;Start at addr 0x100
|
||||||
30START: LD HL,DATA ;Load the start address of the string
|
START: LD HL,DATA ;Load the start address of the string
|
||||||
40 LD B,0DH ;The length of the string (max 255 chars)
|
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)
|
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
|
CALL 84CDH ;Call the str_out function in ROM
|
||||||
70 RET ;Return from call
|
RET ;Return from call
|
||||||
80DATA: DB 'HELLO, WORLD!'
|
DATA: DB 'HELLO, WORLD!'
|
||||||
90 END ;End marker for the assembler
|
END ;End marker for the assembler
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user