Last active
June 26, 2019 07:30
-
-
Save eparadis/69af2cbb499422839b441bd6b904f62c to your computer and use it in GitHub Desktop.
formatted hex dump of an area of memory in BASIC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 INPUT "offset (dec) "; F | |
10 FOR I = 0 TO 255 STEP 16 | |
11 IF I+F<16 THEN PRINT "0"; | |
12 IF I+F<256 THEN PRINT "0"; | |
13 IF I+F<4096 THEN PRINT "0"; | |
15 PRINT HEX$(I+F);" "; | |
20 FOR J = 0 TO 15 | |
25 V = PEEK(I+J+F) | |
27 IF V < 16 THEN PRINT "0"; | |
30 PRINT HEX$(V); | |
35 PRINT " "; | |
40 NEXT J | |
50 FOR J = 0 TO 15 | |
60 V = PEEK(I+J+F) | |
70 IF V<32 OR V>126 THEN V=46 | |
75 PRINT CHR$(V); | |
80 NEXT J | |
90 PRINT | |
100 NEXT I | |
110 INPUT "N for next, P for previous, Q to quit "; C$ | |
120 IF C$ = "N" OR C$ = "n" THEN F = F+256: GOTO 10 | |
130 IF C$ = "P" OR C$ = "p" THEN F = F-256: GOTO 10 | |
140 END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
navigate forwards or backwards a page