All Topics  
LOADALL

 

   Email Print
   Bookmark   Link






 

LOADALL



 
 
LOADALL is the common name for two different, undocumented machine instructions of Intel 80286
Intel 80286

The Intel 286, introduced on February 1, 1982, was an x86 16-bit microprocessor with 134,000 transistors.It was widely used in IBM PC compatible computers during the mid 1980s to early 1990s....
 and Intel 80386
Intel 80386

The Intel 80386, otherwise known as the i386 or just 386, is a microprocessor which has been used as the central processing unit of many personal computers and workstations since 1986....
 processors, which allow access to areas normally outside of the IA-32
IA-32

IA-32 , often generically called x86 or x86-32, is the instruction set architecture of Intel's most commercially successful microprocessors....
 API
Application programming interface

An application programming interface is a set of subroutine, data structures, class and/or Protocol provided by library and/or operating system Service s in order to support the building of applications....
 scope, like descriptor cache registers. The LOADALL for 286 processors is encoded 0Fh 05h, while the LOADALL for 386 processors is 0Fh 07h.

Both variants - as the name implies - load all CPU internal registers in one operation.






Discussion
Ask a question about 'LOADALL'
Start a new discussion about 'LOADALL'
Answer questions from other users
Full Discussion Forum



Encyclopedia


LOADALL is the common name for two different, undocumented machine instructions of Intel 80286
Intel 80286

The Intel 286, introduced on February 1, 1982, was an x86 16-bit microprocessor with 134,000 transistors.It was widely used in IBM PC compatible computers during the mid 1980s to early 1990s....
 and Intel 80386
Intel 80386

The Intel 80386, otherwise known as the i386 or just 386, is a microprocessor which has been used as the central processing unit of many personal computers and workstations since 1986....
 processors, which allow access to areas normally outside of the IA-32
IA-32

IA-32 , often generically called x86 or x86-32, is the instruction set architecture of Intel's most commercially successful microprocessors....
 API
Application programming interface

An application programming interface is a set of subroutine, data structures, class and/or Protocol provided by library and/or operating system Service s in order to support the building of applications....
 scope, like descriptor cache registers. The LOADALL for 286 processors is encoded 0Fh 05h, while the LOADALL for 386 processors is 0Fh 07h.

Both variants - as the name implies - load all CPU internal registers in one operation. LOADALL had the unique ability to set up the visible part of the segment registers (selector) independently of their corresponding cached part, allowing the programmer to bring the CPU into states not otherwise allowed by the official programming model.

As an example of the usefulness of these techniques, LOADALL can set up the CPU to allow access to all memory from real mode
Real mode

Real mode, also called real address mode, is an operating mode of 80286 and later x86-compatible Central processing unit. Real mode is characterized by a 20 bit segmented memory address space , direct software access to BIOS routines and peripheral hardware, and no concept of memory protection or computer multitasking at the hardware le...
, without having to switch it into protected mode
Protected mode

In computing, protected mode, also called protected virtual address mode, is an operational mode of x86-compatible central processing units ....
 (the so-called 'unreal mode
Unreal mode

Unreal mode, also big real mode, huge real mode, or flat real mode, is a variant of real mode , in which one or more data segment registers have been loaded with 32-bit addresses and limits....
'). Programs such as the RAMDRIVE and HIMEM drivers in MS-DOS
MS-DOS

MS-DOS is an operating system commercialized by Microsoft. It was the most commonly used member of the DOS family of operating systems and was the main operating system for personal computers during the 1980s....
, AboveDisk (a commercial package by Above Software which converted hard disk
Hard disk

A hard disk drive , commonly referred to as a hard drive, hard disk, or fixed disk drive, is a non-volatile storage device which stores digitally encoded data on rapidly rotating hard disk platters with magnetic surfaces....
 or extended memory
Extended memory

In computing, Extended memory refers to Computer storage above the first megabyte of address space in an IBM PC with an 80286 or later central processing unit....
 into expanded memory
Expanded memory

In computing, expanded memory is a system of bank switching introduced around 1984 that provided additional memory to MS-DOS programs that required more than what was available in conventional memory....
), and OS/2
OS/2

OS/2 is a computer operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively. The name stands for "Operating System/2," because it was introduced as part of the same generation change release as IBM's "IBM Personal System/2 " line of second-generation personal computers....
 used LOADALL. Examination of the virtual machine monitor code in Windows/386 2.1
Windows 2.0

Windows 2.0 was a 16-bit Microsoft Windows graphical user interface-based operating environment that superseded Windows 1.0. Windows 2.0 was supplemented by Windows 2.1x and Windows 2.1x in 1988....
 shows it uses both the 286 and the even less known 386 variant.

Another interesting usage of LOADALL, signalled in the book The Design of OS/2, would have been to allow running former real mode programs in 16-bit protected mode. Marking all the descriptor caches in the GDT and LDTs "not present" would allow the operating system to trap segment register reloads as well as attempts at performing real-mode specific "segment arithmetic" and emulate the desired behavior by updating the segment descriptors (LOADALL again). This "virtual 8086 mode" for the 80286 was, however, too slow to be practical. The idea had to be discarded, furthermore, due to an erratum in some early Intel 80286 processors. As a result, OS/2 1.x - and Windows in "standard" mode as well - had to run DOS programs in real mode. Nevertheless the idea was not lost; it led Intel to introduce the virtual mode of the 80386, allowing the implementation of "DOS boxes" at last in a relatively efficient and documented way.

80286

Opcode 0F05. The instruction reads data from addresses 00800-00866, whatever the content of the segment registers.
Addressnumber of bytesregisterregisterregisterregister
008006not used
008062MSW, machine status word
0080814not used
008162TR, task register
008182flags
0081A2IP, instruction pointer
0081C2LDTR, local descriptor table register
0081E4x2DS data segmentSS stack segmentCS code segmentES extra segment
008264x2DI destination indexSI source indexBP byte pointerSP stack pointer
0082E4x2BXDXCXAX
008364x6ES segment descriptor
Segment descriptor

In memory addressing for Intel x86 computer architectures, segment descriptors are a part of the segmentation unit, used for translating a logical address to linear address....
CS segment descriptorSS segment descriptorDS segment descriptor
0084E4x6GDT, global descriptor tableLDT, local descriptor tableIDT, interrupt descriptor tableTSS, task state segment


80386

Opcode 0F07. The instruction loads data from address ES:EDI. It actually uses ES, not the ES descriptor.

Addressnumber of bytesregisterregisterregisterregister
ES:EDI+004CR0, control register 0
ES:EDI+044EFLAGS
ES:EDI+084EIP, instruction pointer
ES:EDI+0C4x4EDI, destination indexESI, source index EBP, byte pointerESP, stack pointer
ES:EDI+1C4x4EBXEDXECXEAX
ES:EDI+2C2x4DR6DR7
ES:EDI+344TR, task state selector
ES:EDI+384LDTR, local descriptor table
ES:EDI+3C4x2GS, extra segmentnot usedFS, extra segmentnot used
ES:EDI+444x2DS, data segmentnot usedSS, stack segmentnot used
ES:EDI+4C4x2CS, code segmentnot usedES, extra segmentnot used
ES:EDI+544x12TSS descriptor, task state selectorIDT descriptor, interrupt descriptor table GDT descriptor, global descriptor table LDT descriptor, local descriptor table
ES:EDI+844x12GS segment descriptor
Segment descriptor

In memory addressing for Intel x86 computer architectures, segment descriptors are a part of the segmentation unit, used for translating a logical address to linear address....
FS segment descriptorDS segment descriptorSS segment descriptor
ES:EDI+B42x12CS segment descriptorES segment descriptor


External links