=======================================
= List and define the three basic types of operands =
=======================================
There are three types of basic operands
1) Immediate - a constant
An immediate operand is a constant expression such as a number, character or an arithimetic expression.
mov al,10 : al= 10
mov bl, 'A' : bl= 'A'
mov cx, 'AB' : cx= 'AB'
mov dx, '123h' : dx= '13h'
2) Register Operands
Regester operands are eight or sixteen bit registers or 32 if using extended register.
mov ax,bx
mov al,bl
3 Memory Operands
memory operands are specified either by the name of a variable or by a register that contains the address of a variable. A variable name implies the address of a variable and instructs the computer to reference the contents of memory at that address. Memory references have the following syntax:segment:offset(base, index, scale)
================================================
= Explain data addressing modes to from assembly programming =
================================================
Register(or Register Direct):
reg1 := reg2 * reg3;
This addressing mode does not have an effective address and is not considered to be an addressing mode on some computers.
Base plus offset, and variations:
reg := RAM[base + offset]
This is sometimes referred to as 'base plus displacement'
Immediate:
reg1 := reg2 + constant;
===================================================
= Enlist and differentiate between program visible and invisible registers .=
===================================================
Visible register:
Visible Registers are visible to programmers or in other words they can be accessed directly via instructions or the programs while Invisible Registers may be accessed indirectly by the instructions or may be accessed exclusively internally. The programming model of the 8086 through the Pentium II’s considered to be program visible because its registers are used during application programming and are specified by the instructions.
invisible
- The program invisible registers are used to access and specify the address tables of global and local descriptor tables.
- Since these types of register cannot be accessed directly by a program they are called invisible registers.
- The Global Descriptor table register contains the limit and the base addresses for the descriptor table. The same applies for the Interrupt descriptor table register.
- Since the maximum length is limited to 64 Kbytes the limit of each descriptor table is limited to 16 bits.
- The GTDR is loaded with the address of the global descriptor table whenever a protected mode operation is required.
======================================
= Differentiate between selectors and descriptors =
======================================
Descriptors are a bit like real mode segments; they describe (as the name implies) a memory area in protected mode. A descriptor contains information about segment length, its base address and the attributes of it (i.e. type, access rights, ...). These descriptors are stored internally in a so-called descriptor table, which is basically an array of such descriptors. Selectors are roughly an index into this table. Because these 'segments' can be up to 4 GB in size, 32 bits aren't sufficient anymore to describe a single memory location like in real mode. 48 bits are now needed to do this, a 32 bit address and a 16 bit sized selector. The GO32 unit provides the tseginfo record to store such a pointer. But due to the fact that most of the time data is stored and accessed in the %ds selector, FPC assumes that all pointers point to a memory location of this selector. So a single pointer is still only 32 bits in size. This value represents the offset from the data segment base address to this memory location.
= List and define the three basic types of operands =
=======================================
There are three types of basic operands
1) Immediate - a constant
An immediate operand is a constant expression such as a number, character or an arithimetic expression.
mov al,10 : al= 10
mov bl, 'A' : bl= 'A'
mov cx, 'AB' : cx= 'AB'
mov dx, '123h' : dx= '13h'
2) Register Operands
Regester operands are eight or sixteen bit registers or 32 if using extended register.
mov ax,bx
mov al,bl
3 Memory Operands
memory operands are specified either by the name of a variable or by a register that contains the address of a variable. A variable name implies the address of a variable and instructs the computer to reference the contents of memory at that address. Memory references have the following syntax:segment:offset(base, index, scale)
================================================
= Explain data addressing modes to from assembly programming =
================================================
Register(or Register Direct):
reg1 := reg2 * reg3;
This addressing mode does not have an effective address and is not considered to be an addressing mode on some computers.
Base plus offset, and variations:
reg := RAM[base + offset]
This is sometimes referred to as 'base plus displacement'
Immediate:
reg1 := reg2 + constant;
===================================================
= Enlist and differentiate between program visible and invisible registers .=
===================================================
Visible register:
Visible Registers are visible to programmers or in other words they can be accessed directly via instructions or the programs while Invisible Registers may be accessed indirectly by the instructions or may be accessed exclusively internally. The programming model of the 8086 through the Pentium II’s considered to be program visible because its registers are used during application programming and are specified by the instructions.
invisible
- The program invisible registers are used to access and specify the address tables of global and local descriptor tables.
- Since these types of register cannot be accessed directly by a program they are called invisible registers.
- The Global Descriptor table register contains the limit and the base addresses for the descriptor table. The same applies for the Interrupt descriptor table register.
- Since the maximum length is limited to 64 Kbytes the limit of each descriptor table is limited to 16 bits.
- The GTDR is loaded with the address of the global descriptor table whenever a protected mode operation is required.
======================================
= Differentiate between selectors and descriptors =
======================================
Descriptors are a bit like real mode segments; they describe (as the name implies) a memory area in protected mode. A descriptor contains information about segment length, its base address and the attributes of it (i.e. type, access rights, ...). These descriptors are stored internally in a so-called descriptor table, which is basically an array of such descriptors. Selectors are roughly an index into this table. Because these 'segments' can be up to 4 GB in size, 32 bits aren't sufficient anymore to describe a single memory location like in real mode. 48 bits are now needed to do this, a 32 bit address and a 16 bit sized selector. The GO32 unit provides the tseginfo record to store such a pointer. But due to the fact that most of the time data is stored and accessed in the %ds selector, FPC assumes that all pointers point to a memory location of this selector. So a single pointer is still only 32 bits in size. This value represents the offset from the data segment base address to this memory location.

Leave a Reply