Предмет:
Тип роботи:
Курсова робота
К-сть сторінок:
82
Мова:
Українська
write(hexword(i+start),':');
end;
8: write(' ');
end;
write(hexbyte(bytes[i+start]):3);
if i mod 16 = $F then
begin
write(' ');
dumpascii($F);
end;
end;
if (num-1) mod 16 < $F then
begin
for j := num mod 16 to $f do
begin
write(' ');
if j = 8 then
write(' ');
end;
write(' ');
i := 16*((num-1) div 16) + $F;
dumpascii((num-1) mod 16);
end;
writeln;
end;
procedure dumpwords(var loc;start,num:word);
var
words:array[0..32760] of word absolute loc;
i:word;
begin
if num = 0 then
exit;
repeat
write(hexword(start):4);
for i:=1 to minw(15,num) do
write(hexword(start+i):5);
writeln;
write(hexword(words[start]));
for i:=1 to minw(15,num) do
write(hexword(words[start+i]):5);
writeln;
inc(start,16);
dec(num,16);
until num > 65535 - 16;
end;
end.
Head.pas
unit head;
{$I SWITCHES.INC}
{ NENI cely tisk DPMI, WINDOWS }
{ Header declarations and dumper }
interface
uses globals,util,dump;
type
unit_flags = set of (ieee_reals,overlays,windows60,i286,moveable,
f20,preload,f80,
dpmi,windows,f400,f800,
discardable,f2000,f4000,f8000);
{$IFDEF UNIT60}
const
tpu_file_id = 'TPU9';
type
header_ptr = ^header_rec;
header_rec = record
file_id: array[0..3] of char; { 0-3 }
i4, { 4-5 }
i6, { 6-7 }
ofs_this_unit, { 8-9 }
ofs_hashtable, { A-B }
ofs_entry_pts, { C-D }
ofs_code_blocks, { E-F }
ofs_const_blocks, {10-11}
ofs_var_blocks, {12-13}
ofs_dll_list, {14-15}
ofs_unit_list, {16-17}
ofs_src_name, {18-19}
ofs_line_lengths, {1A-1B}
sym_size, {1C-1D}
code_size, {1E-1F}
const_size, {20-21}
reloc_size, {22-23}
const_reloc_size, {24-25}
var_size, {26-27}
ofs_full_hash: word; {28-29}
flags : unit_flags; {2A-2B}
other : array[$2C..$3F] of byte; {2C-3F}
end;
{$ELSE}
{BP 7.0}
const
tpu_file_id = 'TPUQ';
type
header_ptr = ^header_rec;
header_rec = record
file_id: array[0..3] of char; { 0-3 }
i4, { 4-5 }
i6, { 6-7 }
ofs_this_unit, { 8-9 }
ofs_hashtable, { A-B }
ofs_entry_pts, { C-D }
ofs_code_blocks, { E-F }
ofs_const_blocks, {10-11}
ofs_var_blocks, {12-13}
ofs_dll_list,