Re: working with addresses
From: Josh Sebastian (curien_at_cox.net)
Date: 01/12/04
- Next message: Jeff Schwab: "Re: FLTK, more docs please"
- Previous message: Kip Warner: "Dev-C++"
- In reply to: pcrAKAJumbo: "Re: working with addresses"
- Next in thread: pcrAKAJumbo: "Re: working with addresses"
- Reply: pcrAKAJumbo: "Re: working with addresses"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 11 Jan 2004 19:39:01 -0500
On Mon, 12 Jan 2004 00:18:20 +0000, pcrAKAJumbo wrote:
> "Richard Heathfield" <dontmail@address.co.uk.invalid> wrote in message
> news:btsfup$ieg$1@hercules.btinternet.com...
>> pcrAKAJumbo wrote:
>
> But if you CPU is addressing in 32 bit mode you cannot simply start
> addressing with 10 bit addresses.
> That's nonsense.
Pentium4 CPUs have two addressing modes: 32-bit and 36-bit.
In the early x86 days, there were 16- and 32-bit addressing modes.
And that's just a couple of examples for PCs. If you leave the x86 world,
it can get even more convoluted.
>> in a 32-bit array, he would prefer to see:
>>
>> 00000000110011101011001010111110
>>
>> rather than
>>
>> 11001110101100101011111000000000
>>
> Too right I don't understand it.
> What the heck are you talking about now? These are two completely
> different numbers.
They both have the same bit-sequence, just aligned differently.
> Yes but in this example I am *obviously* talking about a PC with a 32
> bit address bus.
Is an "address bus" what addresses use to get to work in the morning? ;-}
> I claimed that on a 32 *system* the pointers will be 4 bytes
My 32-bit system can use 36-bit pointers. Chances are, yours can too (P4s
being the most common desktop 32-bit CPU these days).
>> Consider a system which stores long * in 24-bit pointers and int * in
> 32-bit
>> pointers. On such a system, converting an int * into a long *
>> inevitably loses information. Such a conversion is "lossy". A
>> "lossless" conversion
> is
>> one which does not lose information.
>>
> But there is no such a system. CPU's operate in specific modes
No, they don't.
> now I don't claim to be an expert on CPU's
Noted.
> but I know that with the Intel CPU
> you need to change the CPU mode to change memory addressing size
No, you just need to use certain CPU instructions.
> But guarantee is a bit of a strong word , the standards do not guarantee
> anything
The "guarantee" is just like a money-back guarantee at Wal-Mart: if you're
compiler claims to follow the standard and doesn't, you can get your money
back. :-}
"Guarantee" does not mean that there exist no counter-examples.
Josh
- Next message: Jeff Schwab: "Re: FLTK, more docs please"
- Previous message: Kip Warner: "Dev-C++"
- In reply to: pcrAKAJumbo: "Re: working with addresses"
- Next in thread: pcrAKAJumbo: "Re: working with addresses"
- Reply: pcrAKAJumbo: "Re: working with addresses"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|