Guys, I've done some experementing and here's how the my final code snippet looks like after correcting some bugs:
Dec_Num = Octal_Num DIG 2 *(8*8) + Octal_Num DIG 1 *(8*1) + Octal_Num DIG 0 'Converts octal to decimal no.
Bin_Num = %1000000000 + Dec_Num 'gives 10-bit result
W = Bin_Num 'temporary holds 10-bit binary no.
Loop:
FOR Bit_Counter = 1 TO 9 'process just 9-bits starting with
IF Bin_Num.8 = 1 THEN 'bit 8 MSB and discart MSB bit 9
GOSUB Send_One 'jump to subroutine for sending 1's
ELSE
GOSUB Send_Zero 'jump to subroutine for sending 0's
ENDIF
Bin_Num = Bin_Num << 1
NEXT Bit_Counter
Bit_Counter = 0
Bin_Num = W 'restores 10-bit binary value
GOTO Loop
PS Dwayne, I think you can't go that way. You first have to do all your math, store results into variables and then use IF... THEN...ELSE statements.
--
Sincerest regards,
YZ7REA Vladimir M Skrbic
4N7ATV Repeater Administrator
YU7GHZ Radio Club President
Bookmarks