Article View: comp.lang.pascal.delphi.misc
Article #290Problem with Assembler in Delphi
From: Christophe LE CORFEC
Date: Fri, 15 May 1998 00:00
Date: Fri, 15 May 1998 00:00
28 lines
1511 bytes
1511 bytes
I would like write a function named GetLongPathName (like the function
GetShortPathName in Win32 API).
I have found "Interrupt 21h Function 7160h Get Long Path Name" in the
API windows
So I must write it in Assembler in Delphi with the following code
asm
mov ax, 7160h
mov cl, 2 ; Get Long Path Name
mov ch, SubstExpand
mov si, seg SourcePath
mov ds, si
mov si, offset SourcePath
mov di, seg DestPath
mov es, di
mov di, offset DestPath
int 21h
end;
But the compiler refuse the lines which contain "seg". It gives me the
message :
SEG is not declared!!!
My question is : where's the problem?
How can I pass the segment of the variables?
Thank you for your help
Technical Details
Message-ID:
<355BE5EA.721C4D01@wanadoo.fr>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1091e5,4ae14b9353dac8b2,start X-Google-Attributes: gid1091e5,public X-Google-Thread: 10baee,557e0f466030319d X-Google-Attributes: gid10baee,public X-Google-Thread: f894d,4ae14b9353dac8b2,start X-Google-Attributes: gidf894d,public From: Christophe LE CORFEC <Christophe.Lecorfec@wanadoo.fr> Subject: Problem with Assembler in Delphi Date: 1998/05/15 Message-ID: <355BE5EA.721C4D01@wanadoo.fr> X-Deja-AN: 353430481 Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Organization: Wanadoo - (Client of French Internet Provider) Mime-Version: 1.0 Newsgroups: comp.lang.pascal.delphi.misc,borland.public.delphi.winapi,borland.public.delphi