Compucolor.org – Virtual Media

Listing of file='DUMPIT.BAS;01' on disk='vmedia/utility-sector.ccvf'

100 INPUT "START ADDRESS , END ADDRESS (DECIMAL)  ";S,A
105 FOR  AD= S TO  A
106 DAT= PEEK (AD)
110 DN= AD:GOSUB  1000:PRINT ""; AD,""; HEX$,
120 DN= DAT:PRINT "";DN,:HEX$= "":HD= 0:GOSUB  1020:PRINT  ""; HEX$,"";
121 N= 128
122 PRINT  SGN (DAT AND  N);
123 IF  N= 1 THEN  PRINT , :GOTO  125
124 N= N/ 2:GOTO  122
125 IF  DAT> 32 AND  DAT< 91 THEN  PRINT  CHR$ (DAT)
126 IF  DAT< 33 OR  DAT > 90 THEN  PRINT
130 NEXT
140 END
900 REM
910 REM
920 REM
930 REM
1000 HD= 0:HEX$= ""
1005 IF  DN> 4095 THEN  HD= INT (DN/ 4096):DN= DN- HD* 4096
1006 GOSUB  1100:HD= 0
1010 IF  DN> 255 THEN  HD= INT (DN/ 256):DN= DN- HD* 256
1012 GOSUB  1100:HD= 0
1020 IF  DN> 16 THEN  HD= INT (DN/ 16):DN= DN- HD* 16
1025 GOSUB  1100:HD= 0
1030 HD= INT (DN):DN= DN- HD
1040 GOSUB 1100:RETURN
1100 IF  HD= 15 THEN  HEX$= HEX$+ "F"
1120 IF  HD= 14 THEN  HEX$= HEX$+ "E"
1130 IF  HD= 13 THEN  HEX$= HEX$+ "D"
1140 IF  HD= 12 THEN  HEX$= HEX$+ "C"
1150 IF  HD= 11 THEN  HEX$= HEX$+ "B"
1160 IF  HD= 10 THEN  HEX$= HEX$+ "A"
1170 IF  HD< 10 THEN  HEX$= HEX$+ RIGHT$ (STR$ (HD),1)
1180 RETURN