{$I defines.inc}
uses clanky;

var hlasky:pdpole;


Function Get_DS_selector:word;assembler;
asm
mov ax,ds
end;


Function get_far_pointer(segm:word;hl:pdpole;i:longint):pointer;assembler;
asm
push esi
push ds
mov ax,segm
mov ds,ax
mov esi,hl
mov ebx,i
shl ebx,2 {EBX:=EBX*4}
add esi,ebx
mov eax,ds:[esi]
pop ds
pop esi
end;


var w:word;
    i:longint;
    p:Pclanek;

begin
hlasky:=Nacti_Data('d:\tp\projekty\wokna32\translat\blocek2.cz');
vaznik_s_hlaskami:=hlasky;


w:=get_ds_selector;
i:=longint(get_far_pointer(w,hlasky,0));

writeln(longint(hlasky^[0]));
writeln(i);

p:=far_hlll(w,hlasky,'m1');
writeln(p^.nadpis^);
writeln(p^.pocet_radek);
end.
