Xref: news2.mv.net comp.os.msdos.djgpp:1633 From: Chris Dial Newsgroups: comp.os.msdos.djgpp Subject: WHY DOESN'T IT WORK!? Date: Sat, 02 Mar 1996 19:53:42 -0800 Organization: Oregon Public Networking Lines: 42 Message-ID: <313917C6.5574@jeffnet.org> NNTP-Posting-Host: 204.214.98.28 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp I have a question about DJGPP 2.0: char *screen; char screen2[65536]; short our_global_selector; int main(void) { if (__djgpp_nearptr_enable()==0) return 1; screen= 0xa0000+ __djgpp_conventional_base; our_global_selector = _dos_ds; /* This sends 1 byte to the VGA screen..... */ screen[0]=(char)255; /* Just like doing this will send one byte to the screen */ asm (" pushw %es movw _our_global_selector,%es movl $0xa0000,%edi movb $255,%es:(%edi) popw %es "); /* This puts 1 byte in the array 'screen2' */ screen2[0]=(char)255; /* So how come this does not send one byte to 'screen2'? */ asm (" pushw %es movw _our_global_selector,%es movl _screen2,%edi movb $255,%es:(%edi) popw %es "); return 0; }; -Chris Dial