Message-ID: <36143299.5CBD3686@geocities.com> From: Sahab Yazdani X-Mailer: Mozilla 4.5b2 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: 0xA0000 or 0xA000? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 55 Date: Thu, 01 Oct 1998 20:55:37 -0500 NNTP-Posting-Host: 209.148.142.159 X-Complaints-To: abuse AT sprint DOT ca X-Trace: HME2.newscontent-01.sprint.ca 907290086 209.148.142.159 (Thu, 01 Oct 1998 21:01:26 EDT) NNTP-Posting-Date: Thu, 01 Oct 1998 21:01:26 EDT Organization: Sprint Canada Inc. To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp OK, I'm simply trying to access mode 13h and plotting a pixel and then getting out! Though Whenever I run my program I either get nothing on the screen (0xA000) or get a page fault (0xA0000)! Now my code is still really simple and looks something like this: #include #include void main() { union REGS regs; regs.x.ax = 0x13; int386(0x10, ®s, ®s); unsigned char *memory = (unsigned char *) 0xA000; memory[ 320 ] = 15; getch(); regs.x.ax = 0x03; int386(0x10, ®s, ®s); } Now with this program I get nothing on the screen, but if I switch "memory" to 0xA0000 I get a page fault that reads something like this: Page fault at eip=0000187e, error=0006 eax=000a0140 ebx=003e4180 ecx=003e4180 edx=000a0000 esi=00000054 edi=0000cf84 ebp=003e1fd4 esp=003e1fc8 program=E:\SAHAB\CPROJ\MASSAC~1\MASS.EXE cs: sel=00af base=82cbc000 limit=003f1fff ds: sel=00b7 base=82cbc000 limit=003f1fff es: sel=00b7 base=82cbc000 limit=003f1fff fs: sel=0087 base=00011550 limit=0000ffff gs: sel=00c7 base=00000000 limit=ffffffff ss: sel=00b7 base=82cbc000 limit=003f1fff Call frame traceback EIPs: 0x0000187e 0x00004196 Now my first question is which of these memory locations is it: 0xA0000 or 0xA000? PS. Thanks to everyone who responded to my MAKEFILE post! -- ********************************************************************** * Sahab Yazdani * Those who look wise among the * * Thornhill Secondary School * Foolish, look foolish amoung the wise * ********************************************************************** * http://www.geocities.com/TimesSquare/Bunker/8994/index.html * * Click the link to visit my portion of The Neverhood * **********************************************************************