Chapter 6: Memory
Section 0:  Print copy 
Page 1: 
FOCT Hardware TABLE OF CONTENTS PREVIOUS NEXT HELP SEARCH INDEX


Objectives
To provide a picture of the memory structure of a personal computer differentiating between the various types of memory.

To gain an insight into the way DOS allocates memory and the application software uses the different areas of memory. 


Section 1, page 1: Types of memory 
Types of memories
In the 60s to 70s magnetic memories were the dominant technology, however as time passed the development of semiconductor technology has led to the situation where 4Mbytes bit memory chips are common, low priced, consuming less power than the original 256 bit memory chip. There are three principal types of memory systems for microprocessors. 

1. Dynamic random access memory (DRAM), which stores data passively and requires periodic refresh to maintain data.

2. Static RAM (SRAM), which maintains data without periodic refresh.

3. Read only memory (ROM), which maintains data in the absence of power, but which cannot be rewritten in the normal memory-cycle time. 


Section 1, page 2: Generic memory chip 
Generic memory chip

Photo of SIMMs

The diagram below shows the generic memory chip--the example has 4K bits organised as a 4K x 1 array. The chip therefore responds to 4K different addresses each address containing 1 bit. Eight chips can be combined in one memory system to create a memory with 4Kbytes and multiples of 8 can be used to make larger byte-wide memories. The chip has separate pins for data input and output. The chip also has 12 address pins (4K = 212) for 4K unique addresses. The control pins are CHIP SELECT which enables or disables the chip which must be asserted to respond to a memory request and READ/WRITE L. The READ/WRITE L dictates whether the chip will accept a read request and retrieve stored data or whether it will accept a write request and transfer data from the input pin to memory. When a logic 1 READ is asserted when a logic 0 WRITE L is asserted. (Power connections have been omitted.) The chip illustrated is similar to a 2147 static RAM.

The next page demonstrates this process. 

Figure 6-1: A generic memory chip, organised as a 4K x 1 memory

Stone, H.S. 1982, Microcomputer interfacing, Addison-Wesley, Reading, Mass., p. 127.


 
 

Section 1, page 3: Memory chip animation 
This animation shows two processes:
Memory chip animation

Adapted from: Stone, H.S. 1982, Microcomputer interfacing, Addison-Wesley, Reading, Mass., p. 127.



Section 1, page 4: Memory interface 
Memory inteface 
The figure below shows a simplified logic diagram for an interface with the memory chip described. 16 address lines come from the microprocessor but only 12 are used for the chip address, the remaining 4 lines pass through a decoder that is capable of producing 16 different chip selects, thereby selecting different chips for different regions of the address space. All control signals are passed parallel to a bank of eight chips whose I/Ps and O/P are connected to the eight data lines or the data bus, giving an 8 bit word length. Replication can extend to 16 bit or 32 bit word lengths.

The next page demonstrates this process. 

Figure 6-2: A simplified schematic diagram for a memory interface

Stone, H.S. 1982, Microcomputer interfacing, Addison-Wesley, Reading, Mass., p. 129.


Section 1, page 5: Memory interface animation 

The animation begins with the 16 address lines coming from the microprocessor.

Memory interface animation

Adapted from: Stone, H.S. 1982, Microcomputer interfacing, Addison-Wesley, Reading, Mass., p. 129.



Section 1, page 6: Static Random Access Memory (RAM) 
Static Random Access Memory (RAM)
The previous description of memory read write has used static RAM. RAM as it can be both written to and read from (as opposed to ROM). Static RAM as the designs used did not include provisions for memory refresh. Static RAM maintains memory through active circuits (transistors/amplifiers) which requires power to maintain even when the chip is inactive and in standby (low-power) mode. Static RAM requires higher power and greater cooling than dynamic memories.

Advantage of static RAM--simple to interface to processors--little hardware overhead required. 


Section 1, page 7: ROM (Read Only Memory) 
ROM (Read Only Memory)
It is not required to write to ROM and therefore simpler to interface with processors. The electrical connection for ROM chips are almost identical to RAM chips except that ROMs do not have a READ/WRITE L pin, they are always in READ mode. The only control pin required is an OUTPUT ENABLE pin that turns on the internal tri-state drivers. A second control pin on ROMs is the CHIP SELECT. The CHIP SELECT places the chip in a low-power standby mode--as there is no requirement of power to maintain the memory it does not draw power when not accessed.

For microprocessor systems a variety of sizes of ROMs have been used, IBM PC BIOS ROMs used a 64 K bit chip in a 8K x 8 configuration (2364). 


Section 1, page 8: Dynamic RAM 
Dynamic RAM
Dynamic memory cannot retain data indefinitely without external support logic. The information is stored as electrical charge in small capacitors and the charge tends to dissipate over a period of time. It is therefore necessary to refresh memory periodically in order to preserve data. The problem and the operation of the refresh is illustrated in the following figure. 

Figure 6-3: A symbolic diagram of the structure of a dynamic memory cell: The switch states for WRITE are and closed; for READ, switches , and are closed; and otherwise the switches are open.

Stone, H.S. 1982, Microcomputer interfacing, Addison-Wesley, Reading, Mass., p. 136.


Section 1, page 9: Dynamic memory cell 
Dynamic memory cell
The capacitor C is the memory element, the switches (Field Effect Transistors) are controlled by the address decoding circuitry (illustrated as toggle switches for simplicity).

To write data in memory, switches and are closed, connecting the capacitor C to the input data through the amplifier. A logic 1 charges the capacitor and a logic 0 discharges C. The switches are then opened and the capacitor is isolated from the rest of the chip.

To read, the output switch connects C to a comparator which decides whether the stored voltage is less than or greater than a reference voltage. The output of the comparator is a logic 0 or logic 1 depending on the result. 

As the read operation may "disturb" the charged stored on the capacitor it must be followed by a recharging of the capacitor through closure of switches S4 and S2.

These processes are demonstrated on the next page. 


Section 1, page 10: Dynamic memory cell animation 

The processes shown here are:

Dynamic memory cell animation

Adapted from: Stone, H.S. 1982, Microcomputer interfacing, Addison-Wesley, Reading, Mass., p. 136.


Section 2, page 1: Memory space 
IBM type PC
There are four types of "memory space" within the IBM system running under Microsoft DOS operating system. The types are Conventional Memory, High-DOS Memory, Extended Memory and Expanded Memory. 

Section 2, page 2: Conventional memory 
Conventional memory
DOS defines conventional memory as the 1Mbyte found on typical PCs (up to 1024K). However, DOS applications can only use 640K. This 1Mbyte region is divided into two sections. The first 640K region is where operating system software applications, TSRs (Terminate and Stay Resident programs) and device drivers are executed. The region of 384K above 640K is reserved for the use of video adapters, LAN (Local Area Network) adapters, hard disk controllers etc.-- see the next section. This 384K area is not generally available for use by applications as there is usually no RAM chip in this region. This area as expected is entirely separate and only accessible via special hardware/software support. This region may be referred to as "high DOS" memory. 

Section 2, page 3: High-DOS memory 
High-DOS memory
The High-DOS memory exists in the area between 640K and 1Mbyte, as previously stated this area is normally reserved for video memory, ROM and other devices. The Lotus/Intel/Microsoft Expanded Memory Specification LIM/EMS version 4.0 hardware together with software is capable of "back-filling" any part of this High-DOS area, which is not in use, with useable RAM. There are important restrictions to bear in mind when using High-DOS.

The amount of High-DOS memory varies from PC to PC. A PC with a monochrome display (e.g. HerculesTM Mono) will have far more High-DOS available than a PC with a VGA monitor. Other devices that affect High-DOS availability are BIOS chips with extensive built in diagnostics, disk drive controllers with BIOS and LAN adapters. High-DOS regions are not always contiguous. Though there may be 128K of High-DOS they may be split into one 64K section and two 32K sections. A TSR that is 70K cannot be relocated to this High-DOS configuration. There are a variety of utility software programs that when run will indicate the use made of this memory space by adapters and should indicate the contiguous blocks of space available. 


Section 2, page 4: Expanded memory 
Expanded memory
Expanded memory is the method for bypassing the 640K DOS limit. The expanded memory (EMS) is accessed via special memory boards or hardware added to a computer in conjunction with Expanded Memory Management (EMM) software. Examples of expanded memory hardware are AST Rampage TM, Intel Above Board TM, and other memory boards. Certain PCs (all 386/486 PCs) may have EMS support built-in, but all EMS memory hardware is activated via special EMM software.

Expanded memory is accessed through a special region called a Page Frame. Page Frames are generally located in the areas between 640K and 1Mbyte. The PC "sees" the expanded memory in sections, the Page Frames provide a "window" in conventional memory through which sections of expanded memory can be accessed. All expanded memory is accessed using industry standard specifications for the use of this memory and are defined by the LIM/EMS and EEMS (Enhanced Expanded Memory Specification, a superset of the original LIM/EMS 3.2 specification developed by AST Research, Quadram and Ashton-Tate, now superseded by the LIM/EMS 4.0 specification). Most applications and TSRs that access extra memory, access expanded memory. Although there may be 4, 6 or 16Mbyte of expanded memory only specific portions of it can be used for the relocating of programs and device drivers. 


Section 2, page 5: EMS page frame 
The EMS Page Frame
As indicated, expanded memory does not actually exist in a PC in any physical sense, it exists outside the PC's address space. Page Frames provide the windows in conventional memory through which portion of the extra memory on the memory board can be accessed. The LIM/EMS standard provided a technique by which programs and data can be switched in and out of conventional memory via expanded memory. The switching or "mapping" takes place using dynamic 16K (or more) segments of memory referred to as Page Frames, or EMS Page Frames. On Intel 80386 machines and machines that support LIM/EMS 4.0, EMS Page Frames can exist in conventional memory and be as large as 576K. 

Section 2, page 6: Extended memory 
Extended memory
Extended memory is accessible only on AT-class PCs (80286 and above). These PCs can access memory from location 0K to 16, 384K (16Mbyte). This memory can only be addressed in the protected mode of the 286/386 machines and is therefore not directly accessible by DOS applications.

Some AT-class machines come with more than 640K of RAM, where the first 640K of RAM supplied is placed starting at location 0K (zero) to location 640K. The next 384K are as still reserved for hardware, such as the ROM BIOS, so the remainder of the RAM supplied with this kind of PC is placed starting at location 1024K. This 384K of RAM exists above 1MB and is different from the High-DOS memory and is referred to as extended memory. Only certain regions of extended memory may be used to relocate programs and device drivers, the High Memory Area (HMA). This area is controlled by the XMS (eXtended Memory Specification), through such special device drivers as Microsoft HIMEM.SYS. On 386/486 and some 286 systems this extended memory can be converted into the LIM/EMS 4.0 expanded memory. Application software like Lotus 123 release 3.1, O/S 2, and windows 3.0 access the extended memory.

The HMA is fixed at 64K therefore the largest program that can fit there must be 64K or less. HMA only support the loading of COM files and device drivers (typically SYS files), not EXE files. The HMA does not support the loading of more than one program or device driver within the region, to maximise this region it is advisable to use it only for larger programs and device drivers (up to 64K). 


Section 3, page 1: 80286 memory space 

THE FIRST MEG OF MEMORY SPACE FOR A 80286 SYSTEM

First Meg / Overview 
        Memory Area     Size    Description
        0000 - 003F     1K      Interrupt Area
        0040 - 004F     0.3K    BIOS Data Area
        0050 - 006F     0.5K    System Data
        0070 - 123B     71K     DOS
        123C - 16D2     18K     Program Area
        16D3 - 9FFF     548K    [Available]
        ===Conventional memory ends at 640K====
        A000 - AFFF     64K     VGA Graphics
        B000 - B7FF     32K     Unused
        B800 - BFFF     32K     VGA Text
        C000 - C7FF     32K     Video ROM
        C800 - EFFF     60K     Unused
        F000 - FFFF     64K     System ROM
First Meg / Programs 
        123C - 1245     0.2K    [Available]
        1246 - 1248     0K      NLSFUNC Environment
        1249 - 12F5     2.7K    NLSFUNC
        12F6 - 145A     5.6K    COMMAND
        145B - 146B     0.3K    COMMAND Environment
        146C - 1472     0.1K    GMOUSE Environment
        1473 - 16D2     9.5K    GMOUSE
        16D3 - 9FFF     548K    [Available]
First Meg / Interrupts 
        0070: IO        01 03 04 0F 13
        02CD: MSDOS     00 20 21 25 26 27 28 2A 2B 2C 2D 32
                        34 35 36 37 38 39 3A 3B 3C
        0BB4: ANSI              1B 29
        0DE9: F:                15 19
        116E: DOS Stacks        02 08 09 0A 0B 0D 0E 70 72 73 74 76
        1249: NLSFUNC   2F
        12F6: COMMAND   22 23 24 2E
        1473: GMOUSE    0C 10 33
        16D3: [Available]       3D 3E 3F
        C000: Video ROM 05 1F 43 6D
        F000: System ROM        06 07 11 12 14 16 17 18 1A 1C 1D 40
                        41 42 44 45 46 47 48 49 4A 4B 4C 4D
                        4E 4F 50 51 52 53 54 55 56 57 58 59
                        5A 5B 5C 5D 5E 5F 67 68 69 6A 6B 6C
                        6E 6F 71 75 77
First Meg / BIOS Data 
        00: Serial Ports                03F8 02F8 0000 0000
        08: Parallel Ports              0378 0000 0000 0000
        10: Installed Hardware          4463
        12: Reserved                    FF
        13: Memory Size in Kb           0280
        15: Reserved                    00 00
        17: Keyboard Control            20 00 00
        1A: Keyboard Head/Tail          003C 003C
        1E: Keyboard Buffer             50E0 1E61 273A 0938
        26:                     0B30 0332 0938 0736
        2E:                     342E 1970 1372 316E
        36:                     0F09 50E0 1C0D 3C00
        3E: Diskette Data               01 01 25 00
        42: Diskette Status             00 00 00 07 00 0D 02
        49: Display Mode                03
        4A: Number of Columns           0050
        4C: Regen Buffer Length         1000
        4E: Regen Buffer Start          0000
        50: Cursor Positions            1034 0000 0000 0000
        58:                     0000 0000 0000 0000
        60: Cursor Type         07 06
        62: Display Page                00
        63: CRT Controller Base         03D4
        65: 3x8 Setting         09
        66: 3x9 Setting         30
        67: Reset Vector                0000:0280
        6B: Interrupt Occurred          00
        6C: Timer Counter               0009:8954
        70: Timer Overflow              00
        71: Break Bit                   00
        72: Reset Word          0000
        74: Fixed Disk Status           00
        75: Fixed Disks Attached                01
        76: Fixed Disk Control          00
        77: Reserved                    00
        78: Printer Timeouts            14 14 14 14
        7C: Serial Timeouts             01 01 01 01
        80: Keyboard Start              001E
        82: Keyboard End                003E
        84: Screen Rows (Less 1)                18
        85: Character Height            0010
        87: Video Control States                60 F9
        89: Reserved                    31 0B
        8B: Media Control               05
        8C: Fixed Disk Data             58 00 00
        8F: Reserved                    47
        90: Media States                15 93
        92: Reserved                    00 00
        94: Current Cylinders           07 00
        96: Keyboard State              10
        97: Keyboard LED                12
        98: User Wait Routine           0000:0000
        9C: User Wait Count             0000:0000
        A0: Wait Active Flag            00
        A1: Reserved            00 00 00 00 00 00 00
        A8: EGA Structures              C000:0191
First Meg / Timings 
        First Meg
                Speed PC/XT
        Memory AreaK/Sec        Index
        0000 - 9FFF     5804    11.2
        A000 - B7FF1947 3.8
        B800 - DFFF961  1.9
        E000 - FFFF     4655    9.0

Section 4, page 1: 80386 memory space 

THE FIRST MEG OF MEMORY SPACE FOR A 80386 SYSTEM

First Meg / Overview 
        Memory Area     Size    Description
        0000 - 003F             1K      Interrupt Area
        0040 - 004F             0.3K    BIOS Data Area
        0050 - 006F             0.5K    System Data
        0070 - 19FC             102K    DOS
        19FD - 2373             37K     Program Area
        2374 - 9FFF             498K    [Available]
        ===Conventional memory ends at 640K====
        A000 - AFFF     64K     VGA Graphics
        B000 - B7FF     32K     Mappable
        B800 - BFFF     32K     VGA Text
        C000 - C7FF     32K     Video ROM
        C800 - CFFF     32K     Mappable
        D000 - DFFF     64K     Unused
        E000 - EFFF             64K     Page Frame
        F000 - FFFF             64K     System ROM
First Meg / Programs 
        Memory Area     Size    Description
        19FD - 1B13     4.4K    COMMAND
        1B14 - 1B18             0.1K    [Available]
        1B19 - 1B59             1K      COMMAND Environment
        1B5A - 1B70     0.4K    [Available]
        1B71 - 1B7A     0.2K    STUB
        1B7B - 1BB0     0.8K    REDIR400
        1BB1 - 1BF8     1.1K    SAVE
        1BF9 - 1D67     5.7K    SCH
        1D68 - 217D     16K     DLL
        217E - 22CD     5.3K    EMSLOAD
        22CE - 2373             2.6K    DNNETHLD
        2374 - 9FFF             498K    [Available]
First Meg / Interrupts 
        0070:   IO      01 03 04 0F 19
        0123:   MSDOS   20 21 25 26 27 28 2B 2C 2D 32 34 35
                        36 37 38 39 3A 3B 3C 3D 3E 3F
        0B84:   QEMM386 15 4B 67
        0C1C:   ANSI    1B 29
        123B:   MOUSE   0C 10 33
        1988:   DOS Stacks      02 08 0A 0B 0E 72 73 74 76
        19FD:   COMMAND 22 23 24 2E
        1B7B:   REDIR400        05 17 2F
        1BF9:   SCH     0D 1A 6C 70
        1D68:   DLL     09 6B
        217E:   EMSLOAD 13 69
        22CE:   DNNETHLD        2A 5C 6E
        C000:   Video ROM       1F 43 6D
        E000:   Page Frame      00
        F000:   System ROM      06 07 11 12 14 16 18 1C 1D 40 42 44
                        45 46 47 48 49 4A 4C 4D 4E 4F 50 51
                        52 53 54 55 56 57 58 59 5A 5B 5D 5E
                        5F 68 6A 6F 71 75 77
First Meg / BIOS Data 
        00: Serial Ports        03F8 02F8 0000 0000
        08: Parallel Ports      0378 0002 0002 0000
        10: Installed Hardware  C463
        12: Reserved    BF
        13: Memory Size in Kb   0280
        15: Reserved    00 00
        17: Keyboard Control    20 00 00
        1A: Keyboard Head/Tail  003C 003C
        1E: Keyboard Buffer     316E 1769 2166 1265
        26:             1F73 1474 342E 1970
        2E:             1372 316E 1C0D 3C00
        36:     0       F09 50E0 1C0D 1E61
        3E: Diskette Data       01 81 25 00
        42: Diskette Status     04 00 00 06 01 07 02
        49: Display Mode        03
        4A: Number of Columns   0050
        4C: Regen Buffer Length 1000
        4E: Regen Buffer Start  0000
        50: Cursor Positions    1029 0000 0000 0000
        58:             0000 0000 0000 0000
        60: Cursor Type 07 06
        62: Display Page        00
        63: CRT Controller Base 03D4
        65: 3x8 Setting 09
        66: 3x9 Setting 30
        67: Reset Vector        0C3A:0184
        6B: Interrupt Occurred  00
        6C: Timer Counter       0008:6839
        70: Timer Overflow      00
        71: Break Bit   00
        72: Reset Word  0000
        74: Fixed Disk Status   00
        75: Fixed Disks Attached        01
        76: Fixed Disk Control  08
        77: Reserved    00
        78: Printer Timeouts    14 14 14 34
        7C: Serial Timeouts     01 01 01 01
        80: Keyboard Start      001E
        82: Keyboard End        003E
        84: Screen Rows (Less 1)        18
        85: Character Height    0010
        87: Video Control States        60 09
        89: Reserved    11 0B
        8B: Media Control       05
        8C: Fixed Disk Data     58 00 00
        8F: Reserved    37
        90: Media States        15 07
        92: Reserved    00 00
        94: Current Cylinders   06 00
        96: Keyboard State      10
        97: Keyboard LED        12
        98: User Wait Routine   0000:0000
        9C: User Wait Count     0000:0000
        A0: Wait Active Flag    01
        A1: Reserved    00 00 00 00 00 00 00
        A8: EGA StructuresC000: 432F
First Meg / Timings 
        First Meg
                Speed   PC/XT
        Memory Area     K/Sec   Index
        Memory Cache    10798   20.8
        0000 - 9FFF             7606    14.7
        A000 - B7FF     3162    6.1
        B800 - BEFF     1114    2.2
        BF00 - BFFF     1463    2.8
        C000 - CFFF     7581    14.6
        D000 - DFFF     933     1.8
        E000 - EFFF             1059    2.0
        F000 - FFFF             7593    14.7

Section 5, page 1: Required reading 
Book graphic
Reading 6-1
Microsoft MS-DOS--User's guide and reference pp. 274-291
(Resource Materials Book 2) 

Section 6, page 1: Chapter evaluation 
Pen & paper graphic
Chapter Evaluation
 
 

If you haven't already done so for this chapter, please take a few minutes to complete the Chapter Evaluation Form. Your input is vital to the continued improvement of the on-line delivery of this unit.

 


FOCT Hardware TABLE OF CONTENTS PREVIOUS NEXT HELP SEARCH INDEX
URL: http://webclass.cqu.edu.au//Units/81120_FOCT_Hardware/Study_Material/Study_Guide/chap6/
Last modified: Tue Jun 24 12:07:21 1997 by sharonn