home/ unimog/ jal/ source/ COM.JAL Unimog COM.JALserial routines
include f877_20
include jlib include f877_modules procedure com3 (byte in v) is t = ( v / 100 ) + 48 v = v % 100 -- if t != 48 then f877_serial_transmit ( t ) -- ASCII of digit of 100's -- end if t = ( v / 10 ) + 48 v = v % 10 -- if t != 48 then f877_serial_transmit ( t ) -- ASCII of digit of 10's -- end if t = v + 48 f877_serial_transmit ( t ) -- ASCII of digit of units -- t = 32 -- f877_serial_transmit ( t ) -- Black space end procedure procedure com (byte in v) is f877_serial_transmit ( v ) end procedure function comin return byte is if F877_serial_RX_buffer then f877_serial_receive ( t ) else t = 0 end if return t end function function comwait return byte is while ! F877_serial_RX_buffer loop end loop f877_serial_receive( t ) return t end function |