.include "monitor.def" .module crt0 .globl _main ; .area _HEADER (ABS) ; .org 0x800 .area _CODE call _main ret _putchar:: ld hl,#2 add hl,sp ld c,(hl) call conout ret _getchar:: call conin jp nz,_getchar ld l,c ret _puts:: inc sp inc sp ex (sp),hl dec sp dec sp ; rst 0x38 call puts ld hl,#crlf call puts ret _hexword:: push ix ld ix,#0 add ix,sp ld l,4(ix) ld h,5(ix) call hexword pop ix ret _hexout:: push ix ld ix,#0 add ix,sp ld a,4(ix) call hexout pop ix ret