FT736R.4 DEF PROCsat_mode(F%,B%(1)) IF F%=tx B%(5)=&27 ELSE B%(5)=&17 PROCput: ENDPROC : DEF PROCfreq(F) B%(5)=1 PROCfr(F) PROCput: ENDPROC : DEF PROCsat_freq(F%,F) IF F%=tx B%(5)=&2E ELSE B%(5)=&1E PROCfr(F) PROCput: ENDPROC : DEF PROCfr(F) IF F>=1000 FX%=on ELSE FX%=off F=(F+0.000005)/1000 FOR I%=1 TO 4: F=F*100: F%=INT(F): F=F-F% B%(I%)=(F% DIV 10)*16 + F% MOD 10 NEXT IF FX%=on B%(1)=B%(1)AND &F + &C0: REM 1200 MHz band corrrection ENDPROC : DEF FNsqlch B%(5)=&E7: PROCput: PROCget IF B%(1)=0 THEN =0 ELSE= -1 : DEF FNmeter B%(5)=&F7: PROCput: PROCget =B%(1) : DEF PROCset_up REM Establish constants etc DIM B%(5) off=0: on=-1 rx =0: tx=-1 plus=+1: minus=-1 lsb=0: usb=1: cw=2: cwn=&82: fm=8: fmn=&88 : REM Most code after this is for controlling the BBC micro hardware REM and needs recoding for any other machine. Note "*FXn,m" is REM merely a BBC micro operating system call, no. n, parameter m. REM REM Set up RS423 = 4800,8,N,2 *FX8,6 *FX7,6 *FX156,16,227 ENDPROC : DEF PROCput REM Procedure sends five bytes to RS432c port, spaced by 50ms REM bytes are in array B%(1) ... B%(5) FOR I%=1 TO 5 REM Delay below is in the spec, but can actually be omitted T%=TIME: REPEAT UNTIL TIME >= T%+5: REM Wait 50 ms/byte REM Now direct output to RS423, o/p char, and restore o/p to screen *FX3,3 VDU B%(I%) *FX3,0 NEXT ENDPROC : DEF PROCget REM Flush RS423 I/P buffer, then read bytes from input stream REM until op code is detected. Previous value is result. REM (straight reading 5 bytes found to be unreliable) *FX15,1 *FX2,1 REPEAT B%(1)=B%: B%=GET: UNTIL B%=B%(5) *FX2,0 ENDPROC : REM End of code REM de G3RUH @ GB7SPV 1990 May 29 JAS>