www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/26/02:29:08

To: djgpp AT delorie DOT com
Subject: Re: [Q] PM just like RM?
Message-ID: <19961226.230751.4975.2.chambersb@juno.com>
References: <01bbf02a$1fe67430$72216dc2 AT parkview>
From: chambersb AT juno DOT com (Benjamin D Chambers)
Date: Thu, 26 Dec 1996 02:03:30 EST

On 22 Dec 1996 17:04:44 GMT "Yeep" <Yeep AT xs4all DOT nl> writes:
[snip]
>Now this got me thinking.....
>This is just like Real mode in a small model.
[snip]
>Now is this just a coincidence that this works?
[snip]
>Could anyone tell me, 'cos I'm not happy when my code _just_ works, I 
>wanna
>know _why_ it works.

I believe when you say it's just like a small model, you mean you have 1
segment and everything is local.
In that sense, yes.
The problem is that the base address really isn't 0 - so a0000 isn't
really a0000, it's a0000+base address.  That's why you have to use the
segment over-ride.  Or, you could just add a base value to your pointer
to make it 'wrap around' to where it's supposed to be - then you'd have a
near pointer to the data.  Check the FAQ, I believe it explains this
method.

...Chambers

- Raw text -


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