putstrg
banksel TOSL ; bank 31 |B31
movf TOSL,W ; top-of-stack lo |B31
movwf FSR1L ; |B31
movf TOSH,W ; top-of-stack hi |B31
iorlw 128 ; set FSR1.15 for rom access |B31
movwf FSR1H ; |B31
getchar movlb 0 ; bank 0 |B0
moviw INDF1++ ; null terminator? |B0
bz putexit ; yes, exit, else |B0
call Put232 ; print string character |B?
bra getchar ; loop |B?
putexit movlb 31 ; bank 31 |B31
movf FSR1L,W ; adjust return address |B31
movwf TOSL ; |B31
movf FSR1H,W ; |B31
movwf TOSH ; |B31
movlb 0 ; bank 0 |B0
return ; |B0