2.6 Using channels

SYS_CH_SET

set predefined channel

A: channel ID

0 - serial port

1 - OLED, 8 pixels width

2 - OLED, 6 pixels width

SYS_CH_PARAM

define own channel

A: set of parameters

HL, DE, BC: parameters

A=1 (calls)

HL: single char print call

DE: clear screen call

BC: set position call

A=2 (screen size)

D: chars per line

E: lines per screen

A=3 (font definition)

HL: font pointer

B: font width

SYS_CH_CHAR

print one char/send one char to channel

ESC sequences allowed

A: char ascii to print

RST 10h

print/send null-terminated string

string follows RST 10 instruction

RST 10h

.TEXT "HELLO WORLD"

.DB 00h

SYS_CH_SEND

print/send one char, no ESC

A:char/byte to print

SYS_CH_BCD

convert BCD number to ascii and print

A: dual BCD to print

B: options

1 - never print upper nibble

2 - do not print leading zero

4 - print space instead of leading zero

0 - always print leading zero

SYS_CH_HEX

print HEX value

A: value to print in HEX format

ESC codes

16h - set new position to x, y (coordinates follows)

14h - inverse video

15h - normal video

0Ch - clear screen