10 ! PROGRAM TO CONVERT OCTAL BLOCK # TO RP03 CYL, SURFACE AND SECTOR
20 ! AND ALSO TO AED CYL, HEAD AND SECTOR
30 DIM BL$[6]V,BH$[1]
31 INPUT "HIGH, LOW BLOCK NUMBERS (0=FIRST BLOCK) ";BH$,BL$
32 BH=0 : BL=0
33 BH=OCT(BH$) : BL=OCT(BL$)
38 IF BL<0 THEN  LET BL=BL+2^16
40 CA=INT(BL/200) +INT(BH*2^16/200)
42 RE=INT(BL+BH*2^16-200*CA)
45 SU=INT(RE/10)
50 SE=RE-INT(SU*10)
70 PRINT "RP CYL","OCT. = ";OCT$(CA)," DEC. = ";CA
80 PRINT "RP SUR","OCT. = ";OCT$(SU)," DEC. = ";SU
90 PRINT "RP SEC","OCT. = ";OCT$(SE)," DEC. = ";SE
100 BN=CA*200+SU*10+SE
110 PRINT "BLOCK #","OCT. = ";OCT$(BN/8);OCT$(BN-8*INT(BN/8)),
120 PRINT " DEC. = ";BN
130 CY=INT(BN/160)
140 SU=INT((BN-CY*160)/32)
150 SE=BN-CY*160-SU*32
170 PRINT "SM CYL","OCT. = ";OCT$(CY)," DEC. = ";CY
180 PRINT "SM SUR","OCT. = ";OCT$(SU)," DEC. = ";SU
190 PRINT "SM SEC","OCT. = ";OCT$(SE)," DEC. = ";SE
195 PRINT "SURFACES LISTED FROM TOP ARE 0,1,SERVO,2,3,4"
200 GOTO 31
