Last active
October 28, 2022 04:43
-
-
Save hackerb9/c081729429a65c9e74e2b20b1d25f5bb to your computer and use it in GitHub Desktop.
Tandy 200 Hexdump
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 DIM H$(15): FOR T=0 TO 9:H$(T)=CHR$(48+T): NEXT T: FOR T=ASC("A") TO ASC("F"): H$(T-55)=CHR$(T): NEXT | |
6 DIM R$(7): FOR T=0 TO 7: R$(T)=" ": NEXT | |
10 DEFINT A-F, P: D=0: P=VARPTR(D) | |
15 INPUT "Start"; ST% | |
16 INPUT "End"; EN% | |
18 TS$=TIME$ | |
20 FOR D=ST% TO EN% | |
30 IF (D MOD 8) = 0 THEN PRINT" ";: FOR T=0 TO 7: PRINTR$(T);: NEXT: PRINT: S=0: GOSUB 400 | |
40 GOSUB 200 | |
90 NEXT | |
100 REM Timing | |
110 TE$=TIME$ | |
115 PRINT | |
120 PRINTTS$ " to " TE$ | |
199 END | |
200 REM Print 2 hexits | |
201 ' Input: D is address of an 8-bit integer | |
202 ' Output: None, but 2 hexits are printed followed by a space | |
210 A=PEEK(D) | |
220 PRINTH$(A\16); H$(A MOD 16); " "; | |
230 IF A<32 THEN A=46 | |
240 R$(S)=CHR$(A) | |
250 S=S+1 | |
260 RETURN | |
400 REM Print 4 hexits | |
401 ' Input: P is address of a 16-bit little endian integer | |
402 ' Output: None, but 4 hexits are printed followed by a space | |
410 A=PEEK(P+1): B=PEEK(P) | |
420 PRINTH$(A\16); H$(A MOD 16); H$(B\16); H$(B MOD 16); " "; | |
430 RETURN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment