10 ! PROGRAM TO CONVERT RP03 REGISTERS TO ACTUAL BLOCK #
20 ! AND THEN BACK TO AED CYL, HEAD AND SECTOR
25 DIM A$[6]V
30 INPUT "RPCA (IN OCTAL )";A$
35 CA=OCT(A$)
40 INPUT "RPDA (IN OCTAL) ";A$
45 DA=OCT(A$)
50 SU=INT(DA/256)
60 SE=DA-SU*256
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 30
