|
|
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: 3617 (0xe21)
Types: TextFile
Names: »EXTSCAN.PAS«
└─⟦b6837b237⟧ Bits:30010500 SW2103 REL 1.11 Sourcer DVBS1.SW2103.rel.1.11-1 MASTER 31-1-192
└─⟦this⟧ »EXTSCAN.PAS«
program extscan;\r
const\r
ext_max_routine = 150; (* max no of words (of 2 chars each) pr inline routine *)\r
ext_max_charbuf = 5000; (* number of words in charbuf *)\r
descr_max_param= 30; (* max number of parameters of a module *)\r
c_size_identifier= 12;\r
descr_free_words = 4; (*number of unused words in descr*)\r
\r
var ext_pass5: file of integer;\r
file_position, not_resolved : integer;\r
\r
ext_open_codes:\r
record\r
cur_word_ptr : integer; (* points at first free word in charbuf *)\r
charbuf : array [ 1 .. ext_max_charbuf ] of integer;\r
end;\r
\r
\r
type\r
\r
identifier= packed array [ 1..c_size_identifier ] of char;\r
(* type definitions from modules: *)\r
\r
ext_states = (ext_unused, ext_declared, ext_open, ext_closed);\r
\r
param_ptr= ^ param_descr;\r
\r
param_descr = record\r
next_param: param_ptr;\r
kind,\r
size : integer;\r
end;\r
\r
procedure ext_scan;\r
const\r
size_of_codedescr = 8; (* no of words in descr, containing date etc *)\r
var\r
i, j, codewords, skipwords, codepos,\r
descr_length, no_of_pages, size_of_page, bytes_on_last_page, kind_of_obj,\r
app, pno, next_word,\r
curkey, prevkey : integer;\r
ident : identifier;\r
paramtab : array [ 1 .. descr_max_param ] of param_descr;\r
found : boolean;\r
param_p: param_ptr;\r
\r
begin\r
\r
reset (ext_pass5);\r
read(ext_pass5, next_word);\r
file_position := 0;\r
not_resolved := 1;\r
\r
with ext_open_codes do\r
while not eof(ext_pass5) and (next_word > 0) and (not_resolved > 0) do\r
begin\r
descr_length := next_word;\r
read (ext_pass5,\r
no_of_pages,\r
size_of_page,\r
bytes_on_last_page,\r
kind_of_obj);\r
\r
(* read name *)\r
for i := 1 to 6 do\r
begin\r
read (ext_pass5, app);\r
ident [ i*2-1 ] := chr (app div 256);\r
ident [ i*2 ] := chr (app mod 256);\r
end;\r
for i := 13 to c_size_identifier do ident [ i ] := ' ';\r
writeln('identifier: ', ident);\r
\r
(* skip entry points etc *)\r
for i := 1 to 5 do read (ext_pass5, next_word);\r
(*read last param offset*)\r
read (ext_pass5,app);\r
\r
(*skip the free words*)\r
for i := 1 to descr_free_words do read(ext_pass5, next_word);\r
\r
(*read number of params *)\r
read (ext_pass5,pno);\r
writeln('params: ',pno);\r
\r
if pno > descr_max_param then writeln('error-ext_param_number');\r
for i := 1 to pno do\r
with paramtab[ i ] do\r
read (ext_pass5, kind, size);\r
\r
file_position := descr_length div 2 + file_position;\r
codewords := ((no_of_pages - 1) * size_of_page + bytes_on_last_page + 1) div 2;\r
skipwords := codewords;\r
writeln('code : ', codewords);\r
\r
if (kind_of_obj = 4) or (kind_of_obj = 5) then\r
begin (* open routine in library *)\r
\r
writeln('open - routine');\r
end;\r
\r
(* skip any remaining part of code-body *)\r
for i := 1 to skipwords do read(ext_pass5, next_word);\r
file_position := file_position + codewords;\r
(* skip external link part *)\r
read (ext_pass5, pno);\r
file_position := file_position + 1;\r
for i := 1 to pno do\r
begin\r
(* skip external name *)\r
for j := 1 to 6 do read (ext_pass5, next_word);\r
file_position := file_position + 6;\r
(* skip parameter list *)\r
read (ext_pass5, j); (* number of params *)\r
file_position := file_position + 2*j + 1;\r
for j := 2*j downto 1 do read (ext_pass5, next_word);\r
(* skip number of uses *)\r
read (ext_pass5, next_word);\r
file_position := file_position + 1;\r
end;\r
(* skip internal link part *)\r
read (ext_pass5, pno);\r
pno := pno * 4; (* four words per entry *)\r
for i := 1 to pno do read (ext_pass5, next_word);\r
file_position := file_position + pno + 1;\r
\r
(* now the libraryfile is positioned at start of next entry *)\r
read(ext_pass5, next_word);\r
end; (* scan of library file *)\r
\r
end; (* procedure extscan *)\r
\r
begin\r
assign(ext_pass5, 'rtp35022.lib');\r
ext_scan;\r
end.«eof»