10 ! PROGRAM TO CALCULATE BITMAP BLOCK, WORD AND BIT NUMBER
11 ! CORRESPONDING TO A DISK BLOCK
20 PRINT 
21 PRINT "PROGRAM TO TRANSLATE AN ABSOLUTE DISK BLOCK NUMBER"
22 PRINT "INTO A GIVEN BLOCK, BYTE AND BIT OF [0,0]BITMAP.SYS"
23 PRINT
40 PRINT "ZAP>DDN:[0,0]BITMAP.SYS/AB"
41 PRINT "(FOR ZAP USE, THIS PROGRAM GIVES CORRECT BLOCK NUMBER)"
42 PRINT "(FOR ZAP USE, DISK MUST BE MOUNTED '/UNL')"
43 PRINT
44 PRINT "MCR>DMP XX:=[0,0]BITMAP.SYS/BL:NN:NN"
45 PRINT "(FOR DMP USE, YOU MUST ADD 1 TO BLOCK NUMBER)"
46 PRINT
100 INPUT "HIGH, LOW BLOCK NUMBER (OCTAL)";FH$,FL$
110 FH=OCT(FH$)
120 FL=OCT(FL$) : IF FL<0 THEN LET FL=FL+65536
130 BL=INT(FH*65536)+FL
140 BB=INT(BL/4096)
145 BY=INT((BL-BB*4096)/8)
150 BI=INT(BL-BB*4096-BY*8)
152 PRINT "FOR BLOCK NUMBER "; BL;" (DECIMAL)"
155 PRINT "BLOCK NUMBER OF BITMAP = ";OCT$(BB+1);"  (0 IS FIRST BLOCK)"
160 PRINT "BYTE NUMBER OF BLOCK   = ";OCT$(BY);"  (0 IS FIRST BYTE)"
165 PRINT "BIT NUMBER OF BYTE     = ";OCT$(BI);"  (0 IS LOWEST BIT)"
170 GOTO 100
