|
|
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: 1664 (0x680)
Types: TextFile
Names: »HEXASM.PAS«
└─⟦44b695f10⟧ Bits:30009789/_.ft.Ibm2.50006607.imd Mogens Pelles Zilog 80,000 / EOS projekt
└─⟦this⟧ »HEXASM.PAS«
└─⟦88829d438⟧ Bits:30009789/_.ft.Ibm2.50007360.imd Mogens Pelles Zilog 80,000 / EOS projekt
└─⟦this⟧ »HEXASM.PAS«
└─⟦cbb94d8d9⟧ Bits:30009789/_.ft.Ibm2.50007340.imd Mogens Pelles Zilog 80,000 / EOS projekt
└─⟦this⟧ »HEXASM.PAS«
PROGRAM HEXASM;
TYPE
i8 = 0..255;
VAR
file_name: string(.14.);
src: text;
log: text;
dst: file of i8;
c: string(.2.);
comment: string(.70.);
c_length: i8;
s: i8;
table: ARRAY (.char.) OF i8;
i: i8;
j: char;
BEGIN
getcomm(File_name);
assign(src, concat(file_name, '.hex'));
reset(src);
assign(log, concat(file_name, '.prt'));
rewrite(log);
assign(dst, concat(file_name, '.obj'));
rewrite(dst);
(*
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;
writeln(log, ' ':10
, concat(file_name, '.obj')
, '='
, concat(file_name, '.hex')
);
writeln(log);
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);
writeln(log, s:3, ' < ', c:2, ' ', comment);
write(dst, s);
END;
END.«eof»