delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/29/14:35:33

From: "John S. Fine" <johnfine AT erols DOT com>
Newsgroups: alt.lang.asm,comp.os.msdos.djgpp,comp.os.msdos.programmer
Subject: Re: NASM + DJGPP linking
Date: Tue, 29 Jun 1999 14:01:12 -0400
Lines: 30
Message-ID: <377909E8.3497@erols.com>
References: <930622805 DOT 86738 AT kyle DOT inet DOT net DOT nz>
Mime-Version: 1.0
X-Trace: o+QYoTnJuNVynBxi/ghgi6zRcivh4EHProoh+nNMESY=
X-Complaints-To: abuse AT rcn DOT com
NNTP-Posting-Date: 29 Jun 1999 18:03:08 GMT
X-Mailer: Mozilla 3.01 (Win95; U)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

David Mitchell wrote:
> 
> Umm, I have written the following for NASM:

>     mov bp, sp
. . .
>     mov ax, [bp+4]
>     int 10h
. . .
> and compiled it as a COFF, then I compiled it with this file :
. . .
> using the line (DJGPP):
> >>gcc main.c graphics.o

  DJGPP is a 32-bit environment.  That means you must use
esp instead of sp, ebp instead of bp, and ebp+8 instead of
bp+4.

  DJGPP is a protected mode environment.  Instructions like
"int 10h" cannot go directly to the BIOS.  They must be
intercepted by the DOS extender and redispatched in V86 or
real mode.

  DJGPP code can be run several different environments (such
as CWSDPMI or Windows DOS boxes etc.).  I don't remember whether
all, some or none of them redispatch int 10h's for you.  I
expect it is in the FAQ.
-- 
http://www.erols.com/johnfine/
http://www.geocities.com/SiliconValley/Peaks/8600/

- Raw text -


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