TIP: Click on subject to list as thread! ANSI
echo: 80xxx
to: HERMAN SCHONFELD
from: JAN WAGEMAKERS
date: 1997-07-12 08:31:00
subject: Memory!

Hello Herman,
Herman Schonfeld wrote to Craig Hart :
 HS> CH> Correction to lesson one: in real mode, the 286+ can
 HS> CH> access 1088kb-16 bytes of memory. This is achieved by
 HS> CH> segmentreg=FFFFh offset reg=0 to FFFFh. This is how the 286+ ITSELF
 HS> CH> operates.
 HS> It can't access 1088kb. A 16-bit pointer can only access up to
 HS> 2^16 bytes, or 64kb.
 HS> "When in real mode, the 80x86 processor is has limited access to
 HS> only 1,024 kb using a segment:offset resolution." "Extending DOS, Ray
 HS> Gwin".
From : "The Undocumented PC" :
1MB Segment Wrap
The 286 and all later CPUs provide 16MB or more of memory address range as
compared with the 8088's 1MB maximum memory address range. A quirk with the
8088 addressing scheme allowed a program to access the lowest 64KB area
using any segment:offset pair that exceeded the 1MB limit. For example, the
segment offset FFFF:50 will access the same byte as 0:40. Altough there is
no reason for software to ever use this quirk, bugs in a few very old
programs used segment:offset pairs that wrap the 1MB boundary. Since these
programs seemed to work correctly, no actions were taken to correct the
defects.
The 286 provide 16M of addressability, and provides its own quirk when
accessing memory with a segment:offset pair that would cause a wrap on the
8088. _!_Instead, the 286 CPU accesses 64KB just above the 1MB boundary._!_
Table : illustrate the differences in adressing memory between the 8088 and
        the 80286.
| Segment:Offset | 8088 Physical | 80286 Physical |
| Address        | Address       | Address        | Notes
|----------------+---------------+----------------+---------------------------
| FFFF:0         | 0FFFF0h       | 0FFFF0h        | Same physical address
|----------------+---------------+----------------+---------------------------
| FFFF:10        | 0             | 100000h        | 1M difference
|----------------+---------------+----------------+---------------------------
| FFFF:FFFF      | 0FFEFh        | 10FFEFh        | 1M difference, limit is
|                |               |                | 16 bytes from end of 64KB
|                |               |                | block
+----------------+---------------+----------------+---------------------------
(Note from me : In the above tabel you can see that the 80286 can access
                1024KBytes + 64Kbytes - 16Bytes = 1088KBytes - 16Bytes   )
 HS> CH>Finally, you can switch on the A20 gate yourelf if you like and
 HS> restore CH>the CH>full addresability - you just need to know how to
 HS> program the hardware, CH>or, in this day and age, ask Himem.sys to do
 HS> it for you.
 HS> Well, perhaps you could give me your "reference" so I could go
 HS> over it, it seems doubtful that they would include that feature.
Also from : "The Undocumented PC" :
A20 Gate
To make the 80286 system appear identical to the 8088 addressing, IBM added
external hardware to the 80286 to force the A20 address line to zero. This
hardware is referred to as the A20 gate. When the A20 gate is in its
default state, access to memory at 1MB will actually access memory in the
first 64K, just like the 8088.
To allow memory access above the 1M boundary, the A20 gate is enabled. The
state of the CPU's address line 20 is then passed unaltered. This allows
access to _!_64K (less 16 bytes) just above the 1M boundary in all CPU
modes, real and protected._!_ To access the remainder of extended memory,
it is necessary to go into protected mode, or use tricks. (undocumented
LOADALL instruction.)
The 64K area just above the 1MB area is reffered to as the High Memory Area
(HMA). Recent versions of DOS can load portions of itself into the HMA to
save place in the lower 640K. To make the HMA work, the A20 line must be
enabled.
Have a nice day, Herman.       - Jan Wagemakers -
.!. Life is short and love is always over in the morning (The Sisters of 
Mercy)
--- Terminate 4.00/Pro
(2:292/8133.23)
---------------
* Origin: - Belgi‰/Belgium - Internet : JanW@mail.dma.be

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.