Date: Tue, 10 Jan 1995 14:53:11 EST From: THE MASKED PROGRAMMER To: djgpp AT sun DOT soe DOT clarkson DOT edu Cc: badcoe AT bsa DOT bristol DOT ac DOT uk Hi, dj wrote: >> So how's it done ? How do I find the real-address of a protected-mode address ? > >You don't. The page lookup takes no extra time, so just use the >linear address space, not the real address space. Pages aren't >allocated linearly anyway. It's not the page lookup that I wanted to avoid. It's the addition of the offsets to the base address. If the lower part of the base address is 0x0000 then I can simply load the offset into (say) dx (or dh and dl depending whether they're already together) with the two high-bytes already in the top of edx. I can then do the lookup with the simple form of address calculation (I think, I'm pretty much a beginner with the 386 ) which might be a bit faster. I suspect that it wouldn't be fast enough even so. I'm only following this thread for completeness (my best attempt so far is ~10-fold too slow and that's after trying about 10 diff asm strategies). >Have you actually looked at the code that "gcc -O3" produces for >foo[x][y] when the dimensions are 256x256? It might already be >optimal - gcc is a real good optimizer. Hmmm, is it really that good ? I'll be very impressed if it is. Thanks, Badders (Hoping to be impressed in the near future.)