1.1 KiB
1.1 KiB
char_out
Version: 1.0.20096.1
Created On: Fri 02 Apr 2020 11:44:05 AM CEST
Created By: Sun 05 Apr 2020 12:44:42 AM CEST
Created by: Jali jali@orca-central.de
Last modified by: Jali jali@orca-central.de
About
The char_out function is one of the built-in functions from the ROM.
It takes a character, and writes it onto the screen, at a specific location.
Parameters
char_out is called through address 0x8468. It takes three parameters:
- Register A holds the ASCII code of the character to print
- Register DE holds the position on the screen. D is a value between 0 and 3, representing the row, while E has a value between 0-23, representing the column to print in.
Example
10;Outputs an "A" in the second column of the last row
20 ORG 100H ;Tell the assembler to start at addr. 0x100
30START: LD A,41H ;Load the letter "A" to register A
40 LD DE,301H ;Sets the row to 3 and the column to 1
50 CALL 8468H ;Calls the ```char_out``` function
60 RET ;Return
70 END ;Marks the end of the code for the assembler