ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/04/15/11:30:03

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: eplmst AT lu DOT erisoft DOT se (Martin Stromberg)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Another GAS problem
Date: 15 Apr 2002 15:09:42 GMT
Organization: Ericsson Erisoft AB, Sweden
Lines: 31
Message-ID: <a9eqfm$qhq$1@antares.lu.erisoft.se>
References: <a9eobf$4v99 AT imsp212 DOT netvigator DOT com>
NNTP-Posting-Host: lws256.lu.erisoft.se
X-Newsreader: TIN [version 1.2 PL2]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Jacky Luk (luckie AT netvigator DOT com) wrote:
: Hi,
:    I have posted on this question in this arena before. In GAS, how do u
: load the segment address into ES when dealing with BIOS interrupts like the
: 13h ? as u know, interrupt 13h requires me to load the es register with the
: .text segment value and bx with the offset... for instance:

If you're using DJGPP and DPMI this won't work. If you're not using
DPMI, then it can be made to work (I think).

: #include "asmdefs.inc"
: .text

: .globl start
: start:
:  movb $0x2, %ah
:  movb $0x1, %al
:  movb $0x1, %cl
:  movb $0x0, %dl
:  movw bootbuffer, %bx  <--- I knew this one already
:                                              movw -4(%ebp), %ebx
:  movw .data, %es  <-- but what about this?

I'd do (untested) 
"	movw	$(some_number), %bx
	movw	%bx, %es
	mowv	$bootbuffer, %bx"

Right,

						MartinS

- Raw text -


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