www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/08/11:56:39

From: "DeHackEd" <notgiven AT out DOT com>
Newsgroups: comp.os.msdos.djgpp
References: <19990108143156 DOT 1466 DOT qmail AT hotmail DOT com>
Subject: Re: some questions...
Lines: 61
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.0810.800
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0810.800
Message-ID: <2Mql2.6018$fz5.265@tundra.ops.attcanada.net>
Date: Fri, 8 Jan 1999 11:53:16 -0500
NNTP-Posting-Host: 142.194.222.231
X-Trace: tundra.ops.attcanada.net 915814526 142.194.222.231 (Fri, 08 Jan 1999 16:55:26 GMT)
NNTP-Posting-Date: Fri, 08 Jan 1999 16:55:26 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

DJGPP is a PROTECT MODE compiler. You can't just load up an address and then use
it. I would consult the FAQ section 10.2 which is directly related to what you
are doing.

Mohamed El-dawy <msdawy AT hotmail DOT com> wrote in message
news:19990108143156 DOT 1466 DOT qmail AT hotmail DOT com...
>Hi all,
>   I would sincerely like to thank  u all for the great effort u r
>doing! this mailing list is one of the most active (and most friendly)
>mailing list i have ever seen. thanx every body!
>
>   well... I'd love to ask some questions!
>   1) how can i determine the free amount of PHYSICAL memory? and how
>can i determine the free amount of TOTAL memory (physical+virtual)?
>
>   2) I have written a very simple clear screen program in assembler, it
>was working fine on Borland C++ but it causes an SIGSEGV fault when i
>run the DJGPP version under windows 98! here is the DJGPP version:
>
>void cls(unsigned int where)
>{
> asm("movl $16000,%%ecx\n"
>     "movl %0,%%edi\n"
>     "movl $0x0,%%eax\n"
>     "rep\n"
>     "stosl\n"
>            : :"g" (where):"esi","edi","eax","ecx","memory");
>}
>
>and here it is in Intel syntax:
>   mov ecx,16000
>   mov edi,where
>   mov eax,0
>   rep stosd
>
>when called with cls(0xa0000) (after setting mode to 320*200 of course)
>it causes a SIGSEGV fault when running! any suggestions?
>  here is the SIGSEGV message:
>
>
>   Exiting due to signal SIGSEGV
>General Protection Fault at eip=000015ba
>eax=00000000 ebx=000082e5 ecx=00003e80 edx=0001001e esi=00000054
>edi=000a0000
>ebp=000910d4 esp=000910cc program=D:\DJGPP\BIN\TEST2.EXE
>cs: sel=01f7  base=82e51000  limit=0009ffff
>
>
>any suggestions are appreciated!
>
>   Keep up the good work guys! See u soon...
>
>
>With love,
>   Mohamed El Dawy
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>


- Raw text -


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