Mail Archives: djgpp/1998/03/16/09:16:39
Nope. 3 things:
1) The syntax of the asm command is:
asm ("asm commands here" : invars : outvars: clobbered registeres);
I think. I don't use the asm command.
2) The converted code would look like this:
movl $13h, %eax
int $10h
3) You can't call real mode interrupts from a protected mode program. You can
try the following and it will work, though most people prefer to use the DPMI
calls for safety. This code is a little more portable.
#include <dos.h>
void set_mode13h()
{
union REGS regs;
regs.x.ax = 0x13;
int86(0x10, ®s, ®s);
}
--
"DeHackEd"
EMail address not given out due to low-life spammers.
You're the computer, you tell ME where the <censored> file is!
Michael Langton wrote in message <350df91e DOT 820097 AT news DOT manawatu DOT gen DOT nz>...
>Hello,
>I'm used to putting assembler statements into my programs using asm.
>But I can't figure out the (apparently) different syntax under djgpp.
>Here's a simple thing I would like to be able to do (this works fine
>under bc3):
>
>asm {
> mov ax, 0x0013
> int 0x10
>}
>
>TIA
>
>--
> Michael Langton <langtons DOT NOTTHISBIT AT manawatu DOT gen DOT nz>
- Raw text -