ti83-sdk/lib83/putchar.c
2023-10-08 01:32:30 +02:00

34 lines
496 B
C

#include <stdio.h>
int putchar(int c) __naked {
c;
__asm
; If a is 0xA:
ld a, l
push hl
push bc
.db 0x01, 0xFF, 0x00
or h
sbc hl,bc
pop bc
pop hl
jr nz, do_print
push ix
rst 0x28
.dw 0x452E
pop ix
ret
do_print:
push ix
rst 0x28
.dw 0x4504
pop ix
ret
__endasm;
}