






















































































































































































































































































































































































































































































































































































































setbaud 1,9600,8,n,1
setl    9,2
setrts  off
wrchar  xoff
setp    0x7f02,0x01
mode_reco
setc    2,0             

setrts  off
wrchar  xoff
sett    50
wait    tf_sign



movd    " G-D-C  V0.9c (Modul 1) *GDC09c.DW1* by J. Hoerhager AOPE/n",s5,0

out     s5,0,c4

setrts  on
sett    20
wait    tf_sign

error_main:
setp    0x7f02,0x01
mode_reco
wrchar  xon

main:
sett    100
sendsig ans_sign,c3           

main_1:
setl    9,1

wait    rx_sign,cntl_sign,tf_sign
case	cntl_sign,test_rx_sign
compc	14,255
jz	overrun
jmp     main_1
overrun:
movd    "ERROR Buffer overrun on input CHANNEL 1/n",s5,150
writeb  s5,150,0
jmp	error_main
test_rx_sign:
case	rx_sign,test_tf_sign




setl    9,2
rds     s1,0
jz      main_1
compc	15,0
jz	read_okay
movd    "ERROR          on input from CHANNEL 1/n",s5,150
movc    15,s5,156
writeb  s5,150,0
compc	15,128		
jz	read_okay
jmp	error_main



test_tf_sign:
case	tf_sign,main
setc    2,0
jmp     main

read_okay:





compd   " ????? N????",s1,0
jnz     read_send
compd   "-->",s1,13        
jnz     inc_call

compc   2,1                     
jnz     state_out0

movd    "A",s1,7
movs    s5,60,s1,8,4
replace ". ",s1,8,4
setc    2,0
jmp     read_send

state_out0:
movs    s1,0,s5,0,149
setc    2,2                     
jmp     main

inc_call:
compc   2,2                     
jnz     state_in0

movd    "A",s5,7
movs    s1,60,s5,8,4
replace ". ",s5,8,4
setc    2,0
movs    s5,0,s1,0,149
jmp     read_send

state_in0:
movs    s1,0,s5,0,149        
setc    2,1                     
jmp     main

read_send:
writeb  s1,0,2       
jnz     wait_write
sendsig ans_sign,c3
jmp     main_1

wait_write:
wrchar  xoff
wait1_write:
movd    "ERROR input_b is full/n",s5,150
writeb  s5,150,0
sett    50
wait    tf_sign
writeb  s1,0,2       
jnz     wait1_write
wrchar  xon
sendsig ans_sign,c3
jmp     main

zzz:

end


