Thread overview
inline assembler interrupts
Jun 27, 2006
llee
Jun 28, 2006
Lionello Lunesu
Jun 28, 2006
Frank Benoit
June 27, 2006
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.


June 28, 2006
llee 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. 

Are those int 21h dos services available under windows!?! That would surprise me.

L.
June 28, 2006
I did not test it, but perhaps this works:

const uint DOS_IRQ_VECTOR = 0x21;

void callIrq( ushort interrupt_code ){
  asm{
    mov AH, interrupt_code ;
    int DOS_IRQ_VECTOR ;
  }
}