|
|
DataMuseum.dkPresents historical artifacts from the history of: DANOSI |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DANOSI Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 2048 (0x800)
Types: TextFile
Names: »HEXDUMP.PAS«
└─⟦02956c927⟧ Bits:30010510 DVBS1.SW2114.src.2.14-1 SW2114 REAL #1/4 TIME PASCAL SOURCE REL 2.14
└─⟦this⟧ »RTP\HEXDUMP.PAS«
└─⟦4f587ad96⟧ Bits:30010518 DVBS1.SW2114.src.2.7-1 SW2114 1/4 Real Time Pascal 2.7 92.06.16
└─⟦this⟧ »RTP\HEXDUMP.PAS«
└─⟦a2a9e188c⟧ Bits:30010526 DVBS1.SW2114.src.2.6-4 RTP Compiler Source SW2104+SW2114 Disk 1 92.02.03 HEJ HHA
└─⟦this⟧ »RTP\HEXDUMP.PAS«
└─⟦b607d6035⟧ Bits:30010532 RTP compiler Source 1 2.14 26/9(?)-92 DVBS1.SW2114.src.2.14-8
└─⟦this⟧ »HEXDUMP.PAS«
└─⟦fd2665794⟧ Bits:30010523 DVBS1.SW2114.src.2.6-1 RTP compiler source SW2104+SW2114 Disk#1 30/1-92 HHA
└─⟦this⟧ »RTP\HEXDUMP.PAS«
PROGRAM hexdump; {$R-,K-}\r
\r
{ This program will output a hex dump af any disk file. Each }\r
{ line shows the address of the first byte of the line, then 16 }\r
{ bytes in hex, and then the same bytes in ASCII, if they are }\r
{ printable. On running the program, you must specify the name }\r
{ of the disk file to be dumped, and the name of the disk file }\r
{ or logical device (CON:, LST:, etc.) to recieve the dump. }\r
\r
TYPE\r
sector = ARRAY[0..127] OF byte;\r
hexstring = STRING[4];\r
\r
VAR\r
address,i,m,n,p: integer;\r
ch: char;\r
buffer: sector;\r
infile: FILE;\r
outfile: text;\r
\r
FUNCTION hex(number,digits: integer): hexstring;\r
CONST\r
hexdigit: ARRAY[0..15] OF char = '0123456789ABCDEF';\r
VAR\r
d: integer;\r
h: hexstring;\r
BEGIN\r
h[0]:=chr(digits);\r
FOR d:=digits DOWNTO 1 DO\r
BEGIN\r
h[d]:=hexdigit[number AND 15];\r
number:=number SHR 4;\r
END;\r
hex:=h;\r
END;\r
\r
BEGIN\r
IF (argcnt<1) OR (argcnt>2) THEN\r
BEGIN\r
writeln('Syntax: HEXDUMP <infile> [<outfile>]'); halt;\r
END;\r
assign(infile,argstr(1)); {$I-} reset(infile,1) {$I+};\r
IF iores>0 THEN\r
BEGIN\r
writeln('HEXDUMP: "',argstr(1),'" does not exist'); halt;\r
END;\r
IF argcnt=2 THEN\r
assign(outfile,argstr(2)) ELSE\r
assign(outfile,'CON:');\r
rewrite(outfile);\r
address:=0;\r
REPEAT\r
blockread(infile,buffer,size(sector),n);\r
i:=0;\r
WHILE i<n DO\r
BEGIN\r
m:=n-i; IF m>16 THEN m:=16;\r
write(outfile,hex(address,4),' ');\r
FOR p:=0 TO pred(m) DO\r
BEGIN\r
IF p=8 THEN write(outfile,' ');\r
write(outfile,hex(buffer[i+p],2):3);\r
END;\r
write(outfile,'':(16-m)*3+(16-m) DIV 8+2);\r
FOR p:=0 TO pred(m) DO\r
BEGIN\r
ch:=chr(buffer[i+p]);\r
IF (ch>=@32) AND (ch<=@126) THEN\r
write(outfile,ch) ELSE write(outfile,'.');\r
END;\r
writeln(outfile);\r
i:=i+m; address:=address+m;\r
END;\r
UNTIL n=0;\r
close(infile); close(outfile);\r
END.\r
«eof»