www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/08/29/14:45:12

Message-ID: <09D1E9BD9C30D311919200A0C9DD5C2C03F58A8B@mcaexc01.msj.maxtor.com>
From: "Kimball, Robert" <Robert_Kimball AT maxtor DOT com>
To: "'djgpp AT delorie DOT com'" <djgpp AT delorie DOT com>
Subject: Trouble with Assembly code
Date: Wed, 29 Aug 2001 12:11:56 -0600
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Reply-To: djgpp AT delorie DOT com

Hello DJGPP folks,
I am getting an error when compiling / assembling code that I do not
understand.

Here is the code:
  #if DJGPP
   __asm__ __volatile__ ("
     pusha\n
     push %%es\n
     movw %%ds, %%ax\n
     movw %%ax, %%es\n
     movl %0, %%edi\n
     movw $6, %%cx\n
     movb %0x21, %%bl\n
     xorb %%bh, %%bh \n
     movw $0x0300, %%ax\n
     int $0x31 \n
     pop %%es\n
     popa \n
   "
   : // no output stuff
   : "g" (DPMI_Regs)
   : "%edi"
   );

  #else  // MicroSlop
   ASM
   {
     pusha
     mov ax, ds                /* ES:EDI will point to DPMI Regs struct.
*/
     mov es, ax
     mov edi, OFFSET DPMI_Regs 
     mov cx, 6                 /* Count = 6 words to push onto stack.
*/
     mov bl, 21h               /* BL has INT Func. to be called- INT 21h.
*/
     xor bh, bh
     mov ax, 0300h             /* Set up to Simulate Real Interrupt.
*/
     int 31h                   /* Issue the DPMI INT 31h Function Call.
*/
     popa
   }
  #endif
The error that I get from RHIDE is "Error: cannot reload integer constant
operand in 'asm'."  

What is this telling me?
Also how do I correctly translate the OFFSET thing in the above Intel style
code?  
I looked through the FAQ for this but found nothing.
Bob

- Raw text -


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