|
|
DataMuseum.dkPresents historical artifacts from the history of: Bogika Butler |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Bogika Butler Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 1280 (0x500)
Types: TextFile
Names: »HEXASM.BAK«
└─⟦89ce9b901⟧ Bits:30009789/_.ft.Ibm2.50007362.imd Mogens Pelles Zilog 80,000 / EOS projekt
└─⟦this⟧ »HEXASM.BAK«
PROGRAM HEXASM;
VAR
file_name: string(.14.);
src: text;
dst: file of byte;
c: string(.2.);
comment: string(.70.);
c_length: byte;
s: byte;
table: ARRAY (.char.) OF byte;
i: byte;
j: char;
BEGIN
write(output, 'Enter SRC file: ');
readln(input, file_name);
assign(src, file_name);
reset(src);
write(output, 'Enter DST file: ');
readln(input, file_name);
assign(dst, file_name);
rewrite(dst);
FOR i := 0 TO 127 DO
table(. chr(i) .) := 0;
FOR j := '0' TO '9' DO
table(. j .) := ord(j) - ord('0');
FOR j := 'A' TO 'F' DO
table(. j .) := ord(j) - ord('A') + 10;
FOR j := 'a' TO 'f' DO
table(. j .) := ord(j) - ord('a') + 10;
WHILE not eof(src) DO
BEGIN
readln(src, c, comment);
c_length := length(c);
CASE c_length OF
0: s := 0;
1: s := table(.c(.1.).);
2: s := table(.c(.1.).) * 16 + table(.c(.2.).);
END;
writeln(output, s:3, ' < ', c:2, ' ', comment);
write(dst, s);
END;
close(dst);
writeln(output, '...');
readln(input);
END.«eof»