🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.lang.asm
Article #433

Re: The offset is so large

#433
From: Frank Kotler
Date: Sat, 10 Jun 2006 17:14
36 lines
2979 bytes
cmk128@hotmail.com wrote:
> thanks for the great answrer,

Sorry, I couldn't resist. :) Nathan gave you a more serious answer.

> my memory layout is like that:
> 
> OS library : 0x1800000
> OS code   : 0x1600000
> 
> And my SS is 0x0 and ESP is 0x16ffffff,

Do you mean SS.base is 0x0? SS = 0 would be an invalid selector. Or are 
we not in pmode yet? In any case, you've got a badly misaligned stack! 
Use a "round number". 0x17000000 should be okay for an initial esp.

> that's why i go the negative
> value in the OS library. But it is already? in my os library function,
> when i declare a char array which larger than 4KB, i got a GP (general
> protection fault). Please give me some suggestions to solve this.

You can hardly expect us to diagnose problems in your OS! 4k sounds like 
a probable page size - maybe an error in your "page not present" handling?

Might be more of an a.o.d. question than either asm or gnu gcc... 
Essentially, you need someone to debug your code for you, and you're 
probably not going to find anyone, so you'll have to do it yourself. You 
use Bochs, right? That's supposed to tell you something (I've never used 
it). Or you could "instrument" your code - put something on the screen, 
or beep, before each section of code, so you can at least see how far 
you got before the crash...

As Betov says, "Courage!"

Best,
Frank
Technical Details
Message-ID: <qeCdnQ9cEJP1YxfZnZ2dnUVZ_vSdnZ2d@comcast.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail
References: <1149914165.205201.192150@m38g2000cwc.googlegroups.com> <MNCdnRBuINEAzRfZnZ2dnUVZ_q2dnZ2d@comcast.com> <1149941295.897580.211400@g10g2000cwb.googlegroups.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f7d8d,c887c247d41a26de
X-Google-Thread: 11318c,c887c247d41a26de
X-Google-Attributes: gidf7d8d,gid11318c,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail
NNTP-Posting-Date: Sat, 10 Jun 2006 12:16:23 -0500
Date: Sat, 10 Jun 2006 13:14:22 -0400
From: Frank Kotler <fbkotler@comcast.net>
Organization: N
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7) Gecko/20040618
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: alt.lang.asm,gnu.gcc.help
Subject: Re: The offset is so large
References: <1149914165.205201.192150@m38g2000cwc.googlegroups.com>   <MNCdnRBuINEAzRfZnZ2dnUVZ_q2dnZ2d@comcast.com> <1149941295.897580.211400@g10g2000cwb.googlegroups.com>
In-Reply-To: <1149941295.897580.211400@g10g2000cwb.googlegroups.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <qeCdnQ9cEJP1YxfZnZ2dnUVZ_vSdnZ2d@comcast.com>
Lines: 36
NNTP-Posting-Host: 24.60.77.229
X-Trace: sv3-sPGHqjiygmYEKt8DoRG6K1Comd0CFkxVrLORcD/duBklME6y3coOl0DDVS2Xyel2+c/BR3cEYVwGVeG!qxKnvaDocy8PYFvxKogKqeZ6pVPYpJwcLzopVaH8fudFHs6wKUrcHOTNxaFkm0q6M3FIrgAWnS/F!y/x6QpJE
X-Complaints-To: abuse@comcast.net
X-DMCA-Complaints-To: dmca@comcast.net
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.32