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: References: 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