Ocean-240.2-Emulator/bin/RD.BAS

20 lines
798 B
QBasic
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

10 REM **** Program READ ****
20 CLS 2:SCRN 0,0:INPUT "READ: FILE-1 OR MEMORY-0";R
30 DIM A$(32),N(16):PRINT CHR$(31):IF R=0 GOTO 110
40 INPUT "FILE";FIL$:OPEN "I",#1,FIL$
45 REM ** READ FILE **
50 FOR I=1 TO 16:A$=INPUT$(1,#1):B=B+1
60 A=ASC(A$):IF A<16 THEN PRINT "0"; ELSE PRINT HEX$(A);
70 IF A$>CHR$(32) THEN 80 ELSE A$=" "
80 IF A$>CHR$(127) AND A$<CHR$(160) THEN A$=" "
90 A$(I)=A$:NEXT I:PRINT " ";
100 FOR I=1 TO 16:PRINT A$(I);:NEXT I:PRINT:GOTO 50
110 INPUT "ADDRESS";A
115 REM **** READ MEMORY ****
120 PRINT HEX$(A);"* *";:FOR I=1 TO 16:N(I)=PEEK(A)
130 PRINT USING "\\";HEX$(N(I));:A=A+1:NEXT:PRINT "* *";
140 FOR I=1 TO 16:IF N(I)<32 THEN N(I)=0
150 IF N(I)>127 AND N(I)<160 THEN N(I)=0
160 IF CHR$(N(I))<" " THEN PRINT " "; ELSE PRINT CHR$(N(I));
170 NEXT I