K
Krumble Bunk
Good morning c.l.c,
I have a question regarding the following snippet of code.
static inline void WriteMemory(register word Address,register byte
Value)
{
MemoryPage[Address>>13][Address&0x1FFF]=Value;
}
1) Why is 'Address' shifted right by 13 places? What is that actually
doing? (apart from dividing). What i'm getting at, is why use those
precise values? 13 and 0x1FFF - what's special about them, indivudually
and in combination in the 2D array?
I realise there's not an awful lot of information to go on, but any
help is very much appreciated.
Thanks
KB
I have a question regarding the following snippet of code.
static inline void WriteMemory(register word Address,register byte
Value)
{
MemoryPage[Address>>13][Address&0x1FFF]=Value;
}
1) Why is 'Address' shifted right by 13 places? What is that actually
doing? (apart from dividing). What i'm getting at, is why use those
precise values? 13 and 0x1FFF - what's special about them, indivudually
and in combination in the 2D array?
I realise there's not an awful lot of information to go on, but any
help is very much appreciated.
Thanks
KB