Предмет:
Тип роботи:
Курсова робота
К-сть сторінок:
82
Мова:
Українська
style="text-align: justify;"> if dynamic in obj_type then
write(' ',vmt_entry);
write(';');
end;
if external_code in code_type then
write(' external;');
if assembler in code_type then
write(' assembler;');
if interrupt in code_type then
write(' interrupt;');
if exported in obj_type then
write(' export;');
if windows_frame in obj_type then
write(' W+;');
if from_dll in obj_type then
begin
write(' external ''',dll_name(entry_pt^.code_block),'''');
if by_name in obj_type then
write(' name ''',dll_name(entry_pt^.offset),'''')
else
write(' index ',entry_pt^.offset);
write(';');
end
else
if by_name in obj_type then
write(' Unexpected by_name flag!');
if local_code in obj_type then
write(' local code;');
unknown_flags := obj_type - [exported,windows_frame,from_dll,by_name,
dynamic,local_code];
if unknown_flags <> [] then
write(' Unrecognized object flags: ',hexbyte(byte(unknown_flags)));
if not (inline_code in code_type) then
begin
write(tab,'{ Proc ',hexwordblank(entry_ofs));
if not (from_dll in obj_type) then
write(' Entry ',hexwordblank(entry_pt^.code_block),':',
hexword(entry_pt^.offset));
if (vmt_entry > 0) and not (dynamic in obj_type) then
write(' vmt index ',hexword(vmt_entry),'h');
writeln('}');
end
else
begin
writeln;
indent;
write(' Inline(');
code := add_only_offset(info,sizeof(func_info_rec)
+func_type.num_args*sizeof(arg_rec));
for i:=1 to entry_ofs div 2 - 1 do
begin
write('$',hexbyte(hi(code^)):2,'/');
if lo(code^) <> 0 then
writeln('Low byte not zero!');
code := add_only_offset(code,sizeof(word));
end;
writeln('$',hexbyte(hi(code^)):2,');');
if lo(code^) <> 0 then
writeln('Low byte not zero!');
end;
if do_locals in active_options then
write_locals(name,info);
end;
end;
{$ELSE}
procedure write_proc_info(var name:string; info:func_info_ptr);
type
inline_data_ptr = ^inline_data;
inline_data = record
itype:byte;
case integer of
0:(b:byte);
1:(w:word);
2:(offset,block,block_unit:word);
end;
var
entry_pt : entry_pt_ptr;
code_ptr,codestart : inline_data_ptr;
i : word;
unknown_flags : obj_flags;
begin
indent;
with info^ do
begin
write_proc_type(name,code_type,func_type_ptr(addr(func_type)));
entry_pt := add_only_offset(buffer,header^.ofs_entry_pts+entry_ofs);
if vmt_entry > 0 then
begin
write(' virtual');
if dynamic in obj_type then
write(' ',vmt_entry);
write(';');
end;
if external_code in code_type then
write(' external;');
if assembler in code_type then
write(' assembler;');
if interrupt in code_type then
write(' interrupt;');
if exported in obj_type then
write(' export;');
if windows_frame in obj_type then
write(' W+;');
if not (not_from_dll in obj_type) and
([inline_code,external_code,interrupt,assembler]*code_type=[]) then
begin
write(' external ''',dll_name(entry_pt^.code_block),'''');
if ent_by_name in entry_pt^.flags then
write(' name ''',dll_name(entry_pt^.offset),'''')
else
write(' index ',entry_pt^.offset);
write(';');
end;
unknown_flags := obj_type - [exported,windows_frame,not_from_dll,
dynamic];
if unknown_flags <> [] then