addressing modes are related to physical attributes liek registers available andwoord length.
The most common adresssing modes are outlined below:
register addressing
if data is transferred from a source register to a destination register then this is an example of register addressing. an example would be
mov ds,ax
this instruction copys the data contained in the source ax and places it in the ds register.
immediate addressing
theis is where the data appears immediatly after the oop code, as part of the instruction. for example the number 20 in the example as follows:
mov ax, 20
this instruction places 20 into the register ax.
direct addresssing
ddirect addressinng refers directly to a specific memory location. example:
mov ax,[mydata]
the instruction copies the contents of memory location 'mydata' (specified by a label) into the ax register.
indirect adressing
indirect adddressing uses a number inside a register to point to the memory location of interest where the actual data can be found. example:
mov ax, [bx]
in this instruction the memory location pointed to by [bx] (and not the actual number in it) is copied to the ax register.
indexed addressing
for indexed addessing anumber contained in one register is usually used in combination with thee number in another register to point to the actual memory location where the data is stored. example:
mov cx, [bx + di]
this instruction the number in the bx register is combined with the number in the di register and the result points to the memory location where the source data is located.
Tuesday, 6 November 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment