© Thomas Kunz 2000
SCE 574
91
Moves contents of
cell DS:X into AX
then adds contents
of DS:Y to AX
Moves 0 into My_Array[0]
Moves 0 into My_Array[1]
Moves 0 into My_Array[2]
Moves 0 into My_Array[3]
   Assembler Example
ä .DATA
äX DW 1
äY DW -1
äMy_Array DW 4 DUP(10)
ä .CODE
äSTART MOV  AX,@DATA
ä MOV  DS,AX
ä MOV  AX,X
ä ADD   AX,Y
ä ......
ä MOV BX,OFFSET My_Array
ä MOV [BX], AX
ä MOV [BX+2],AX
ä MOV [My_Array+4],AX
ä MOV SI,6
ä MOV [BX +SI],AX
ä .END  START
Immediate mode
Optional keyword
Offset, loads the
offset of My_Array
from the beginning
of the Data seg.
Need to
initialize the
Data segment
What would
happen with
MOV BX,[My_Array]?
When the
assembler
sees an
arithmetic
operation
it looks up
16 bit address
of variable
name