
; Test fixed point RCS/B routines

; Prepare directory setting sequences
K /# @ //// R/@/        ; the master routine
K @# @ //// JE//        ; INPUT/B cue to input signed fractions
K :# @ A/// JE//        ; INPUT/B cue to input signed integer
K I# @ A@// #E/@        ; DECOUTPUT/A print single numbers with both integral and fractional part.             
K ## @ E@// DE/@        ; DIVISION/B 
K R# @ //// RE@/        ; B DECIMAL INPUT
K N# @ $$// NE//        ; PRINT/A print fractional signed convention
K C# @ CE// NE//        ; PRINT/A print fractional unsigned convention
K T# @ ZE// R/@/        ; Entry to master routine using PRINT/A to print signed fract at addr [/F]      
K L# @ WE// R/@/        ; Entry to master routine using PRINT/A to print unsigned fract at addr [/F]      
K H# @ UE// R/@/        ; Entry to master routine using DECOUTPUT/A to print signed integer at addr [/F]      

YTP

; call in B.DECIMAL INPUT
GR/

; now follows input data for DECIMAL INPUT routine

F FF S 9+ 25+ 025- 250+ 002500- 
L
W QF : 25+ 9- 0+ 1000+
G
C

K /F E FF// 
GL/         ; print [FF] as unsigned fraction
K /F E KF// 
GT/         ; print [KF] as signed fraction
K /F E ZF// 
GT/     
K /F E WF// 
GT/     
K /F E YF// 
GT/     

; Should print
;
;   90000000000
;   25000000000
;  -02500000000
;   25000000000
;  -00249999999


K /F E QF// 
GH/         ; print [QF] as signed integer
K /F E BF// 
GH/         ; print [BF] as signed integer
K /F E "F// 
GH/        
K /F E XF// 
GH/         

; Should print
;
;  +25.
;  -9.
;  +0.
;  +1000.


; calls in the master routine
G//

; now follows input data for master routine

; input fractions for INPUT/B
; will be printed by PRINT/A signed convention
; until a zero is found
25+
333+
04444-
0055555+
000666666-
0+             ; MathTest stops printing on zero

; Should print
;
;  24999999999
;  33299999999
; -04443999999
;  00555549999
; -00066666599
;  00000000000

; input 2 integers with INPUT/B
; will be divided with DIVISION/B
; then result integer+fraction will be printed by DECOUTPUT/A
22+
7+

; Should print
;
; +3.142857142





