90 PRINT "Real sample no."; J: INPUT R: REM amplitude of Real sample
100 IF Q$ = "Y" THEN PRINT "Quad Sample no."; J: INPUT I: REM amplitude of Imaginary/quadrature sample
110 IF H$ = "Y" THEN R = R * FNA(J): I = I * FNA(J)
120 GOSUB 1000
130 R(K) = R: I(K) = I
140 NEXT J
150 FOR A = 1 TO P: O = 2 ^ (A - 1): REM A=Pass number
160 FOR B = 0 TO S / 2 - 1
170 N = B + O * INT(B / O): M = O + N
180 GOSUB 1500
190 W = W + 2 ^ (P - A): IF W > S / 2 THEN W = 0
200 NEXT B: W = 0
210 NEXT A: CLS : PRINT " N", " REAL", " QUAD"
220 FOR Q = 0 TO S - 1: PRINT Q, R(Q), I(Q)
225 H = H + 1: IF H = 20 THEN H = 0: INPUT "More !"; H$: _
REM omit this line for line printer output. H$ can be anything or just Return/Newline; it is simply a means of breaking the output print into 20 line chunks so that it does not scroll off the screen.
230 NEXT Q: END
1000 REM BIT REVERSED BINARY SBR
1010 K = J: FOR Q = 0 TO P - 1: B(Q) = 0: NEXT Q
1020 FOR Q = P - 1 TO 0 STEP -1
1030 IF K >= 2 ^ Q THEN B(Q) = 1: K = K - 2 ^ Q
1040 NEXT Q: K = 0
1050 FOR Q = 0 TO P - 1: K = K + B(P - 1 - Q) * (2 ^ Q): NEXT Q