; CP/M for M100, T102, T200 ; ; CONOUT Console Out for M100, T102 ver 3.0 ; ; By Philip Avery 3-May-09 ; ; ; This routine switches from OptROM to Main ROM, displays character in reg A, ; then switches back to OptROM. ; ; Requires System RAM to be present (F5F4H-FFFH) ; ; Must be located above System ROM, ie within RAM 8000H - F5F3H. ; ------------------------------------------------------------- Conout push psw push b push d xra a ; Turn Off Option ROM (lower 32k RAM), ie enable System ROM out 0e0H mov a,c ; Get character to display cpi 0dh ; Is it CR? jnz Conout1 rst 4 ; Yes, display CR and mvi a,0ah ; LF jmp Conout2 Conout1 cpi 08h ; Is it Backspace? jnz Conout2 mvi a,7fh ; Yes, display Del Conout2 rst 4 ; Display char in A mvi a,1 ; Turn On Option ROM (lower 32k RAM) out 0e0H pop d pop b pop psw ret .END