Instruction Set
4-155
MOV
MOV
This example sets up the Data Segment (DS) register and the Extra Segment (ES) register
with different segment addresses.
Tips
You cannot use MOV to copy directly from a memory location to a segment register. To
copy a segment address to a segment register, first copy the segment address to a general
register, and then copy the value in the general register to the segment register.
Related Instructions
If you want to
See
Copy a component from a port in I/O memory to a string in main memory
INS
Copy a component from one string in memory to another string in memory
MOVS
Copy a component from a string in main memory to a port in I/O memory
OUTS
; set up DS and ES with different segment addresses
; direct assembler that DS and ES point to
; different segments of memory
ASSUME
DS:SEG_A, ES:SEG_B
; set up DS with SEG_A segment and ES with SEG_B segment
; (can’t copy directly from memory location
; to segment register)
MOV
AX,SEG_A
; load one segment into DS
MOV
DS,AX
; DS points to SEG_A
MOV
AX,SEG_B
; load another segment into ES
MOV
ES,AX
; ES points to SEG_B
Содержание Am186 Series
Страница 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Страница 10: ...Table of Contents x...
Страница 18: ...Programming 1 8...
Страница 40: ...Instruction Set Listing 3 14...