www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/07/01:31:18

Date: Fri, 6 Feb 1998 21:27:33 -0800 (PST)
Message-Id: <199802070527.VAA19107@adit.ap.net>
Mime-Version: 1.0
To: "JAP" <jap AT mundivia DOT es>, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Help about INT 21H under inline asm

At 12:04  2/4/1998 +0100, JAP wrote:
>Hi.
>I tried to call the  int 21H under inline asm from gcc and i got the program
>fall. It caused an internal protection fault under win95.
That's true. I believe this is caused by the distinction between protected
mode and real mode interrupts.
>I want to know if it can be possible to call this interrupt or it's
>impossible under protected mode.
The easiest way is to do it from C and call the `__dpmi_int' function. This
corresponds to an INT 31h DPMI function in assembly, I think the libc docs
and the DPMI spec can tell you more if necessary.
>Another question is if these lines is correct:
>movw $0x7, %%ax;
>shl $8, %%ax;
>because I can't make anything with AH 
Really? Doesn't this work?
movb $0x7, %%ah

>and I wonder I I can shift 8 bits to
>the left and then AH=7 and AL=0 after I make the shift.
Sure.
shlw $8, %%ax

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019