2023-03-04 22:09:40 +00:00
|
|
|
org 0x1000
|
|
|
|
|
|
|
|
prhex = $c174
|
|
|
|
putchar = $c45e
|
2023-09-25 19:03:24 +00:00
|
|
|
putstr = $c01b
|
2023-03-04 22:09:40 +00:00
|
|
|
|
|
|
|
PUBLIC _main
|
|
|
|
_main:
|
2023-09-28 18:23:47 +00:00
|
|
|
; "CIAO" vertical stretch
|
|
|
|
ld a,$43
|
|
|
|
ld ($d000),a
|
|
|
|
ld ($d050),a
|
|
|
|
ld a,$49
|
|
|
|
ld ($d001),a
|
|
|
|
ld ($d051),a
|
|
|
|
ld a,$41
|
|
|
|
ld ($d002),a
|
|
|
|
ld ($d052),a
|
|
|
|
ld a,$4f
|
|
|
|
ld ($d003),a
|
|
|
|
ld ($d053),a
|
|
|
|
|
|
|
|
ld a,$80
|
2023-09-25 19:03:24 +00:00
|
|
|
out ($81),a
|
|
|
|
|
2023-09-28 18:23:47 +00:00
|
|
|
ld a,$60
|
|
|
|
ld ($d000),a
|
|
|
|
ld ($d001),a
|
|
|
|
ld ($d002),a
|
|
|
|
ld ($d003),a
|
|
|
|
ld a,$70
|
|
|
|
ld ($d050),a
|
|
|
|
ld ($d051),a
|
|
|
|
ld ($d052),a
|
|
|
|
ld ($d053),a
|
2023-09-25 19:03:24 +00:00
|
|
|
|
2023-09-28 18:23:47 +00:00
|
|
|
ld a,$00
|
|
|
|
out ($81),a
|
2023-03-04 22:09:40 +00:00
|
|
|
|
2023-09-28 18:23:47 +00:00
|
|
|
; "PIPPO" with blinking underline
|
|
|
|
ld a,$50
|
|
|
|
ld ($d010),a
|
|
|
|
ld a,$49
|
|
|
|
ld ($d011),a
|
|
|
|
ld a,$50
|
|
|
|
ld ($d012),a
|
|
|
|
ld a,$50
|
|
|
|
ld ($d013),a
|
|
|
|
ld a,$4f
|
|
|
|
ld ($d014),a
|
2023-03-04 22:09:40 +00:00
|
|
|
|
2023-09-28 18:23:47 +00:00
|
|
|
ld a,$80
|
|
|
|
out ($81),a
|
2023-03-04 22:09:40 +00:00
|
|
|
|
2023-09-28 18:23:47 +00:00
|
|
|
ld a,$20
|
|
|
|
ld ($d010),a
|
|
|
|
ld ($d011),a
|
|
|
|
ld ($d012),a
|
|
|
|
ld ($d013),a
|
|
|
|
ld ($d014),a
|
|
|
|
|
|
|
|
ld a,$00
|
|
|
|
out ($81),a
|
2023-03-04 22:09:40 +00:00
|
|
|
|
2023-09-28 18:23:47 +00:00
|
|
|
; "ABC" underline and overline
|
|
|
|
ld a,$41
|
|
|
|
ld ($d020),a
|
|
|
|
ld a,$42
|
|
|
|
ld ($d021),a
|
|
|
|
ld a,$43
|
|
|
|
ld ($d022),a
|
|
|
|
|
|
|
|
ld a,$80
|
|
|
|
out ($81),a
|
|
|
|
|
|
|
|
ld a,$50
|
|
|
|
ld ($d020),a
|
|
|
|
ld ($d021),a
|
|
|
|
ld ($d022),a
|
|
|
|
|
|
|
|
ld a,$00
|
|
|
|
out ($81),a
|
|
|
|
|
|
|
|
jp ASMPC
|
2023-03-04 22:09:40 +00:00
|
|
|
|
|
|
|
delay:
|
|
|
|
push de
|
|
|
|
ld de,$0000
|
|
|
|
delay_loop:
|
|
|
|
dec de
|
|
|
|
ld a,d
|
|
|
|
or e
|
|
|
|
jr nz,delay_loop
|
|
|
|
|
|
|
|
pop de
|
2023-09-25 19:03:24 +00:00
|
|
|
ret
|
|
|
|
|
|
|
|
uart_rx:
|
|
|
|
in a,($b1)
|
|
|
|
and $01
|
|
|
|
jr z,uart_rx
|
|
|
|
in a,($b0)
|
|
|
|
ret
|
|
|
|
|
|
|
|
uart_tx:
|
|
|
|
in a,($b1)
|
|
|
|
and $04
|
|
|
|
jr z,uart_tx
|
|
|
|
ld a,c
|
|
|
|
out ($b0),a
|
|
|
|
ret
|