the inline assembler

dennis luehring dl.soluz at gmx.net
Tue Jun 27 17:37:16 PDT 2006


llee schrieb:
> In article <e7sa56$3qb$1 at digitaldaemon.com>, Frits van Bommel says...
>> lee wrote:
>>> I'm trying to call dos interrupts using the inline assembler.
>>> Unfortunately I keep getting the following message during compilation:
>>> end of instruction
>>> The code I used is listed below. Any help is welcome.
>>> asm
>>> {
>>> mov AH, interrupt_code ;
>>> int 21H                ;
>>> ..
>>> }
>>> where interrupt_code is of type long. 
>> I don't believe '21H' is a valid integer in D.
>> This should compile:
>>
>> void main()
>> {
>>     long interrupt_code;
>>     asm
>>     {
>>         mov AH, interrupt_code ;
>>         int 0x21               ;
>>     }
>> }
>>
> The same error results.

long interrupt_code is much larger than the 8bit ah register

btw: what are you doing? plain old dos 21h is decprecated since win95
most 16bit interrupt (int 0x10h, int 0x13...) procs don't work under win32

what do you want from dos? what are you trying todo?

ciao dennis



More information about the Digitalmars-d mailing list