You are on page 1of 9

CS2523 - Computer Organisation and

Assembly Language

Segment Override Prefix


In the Last Lecture
• We discussed

- Subtraction
- Jump

2
Addressing Modes
jnz

• Jump if the zero flag is not set.


• Zero flag is set if the last logical or mathematical instruction has
produced a zero in its destination.
Addressing Modes

Register Indirect

mov ax, [bx]


Addressing Modes

Register Indirect + Offset

mov ax,[bx+num1];base + offset


mov ax,[si+num1];index + offset
Addressing Modes

Base + Index

mov ax,[bx+si]
Addressing Modes

Base + Index + Offset

mov ax,[bx+si+num1]
Addressing Modes

mov ax,[num1] ; (o) - Offset


mov ax,[bx] ; (b) - Base
mov ax,[si] ; (i) - Index
mov ax,[bx+num1] ; b+o
mov ax,[si+num1] ; i+o
mov ax,[bx+si] ; b+i
mov ax,[bx+si+num1] ; b+i+o
Segment Override Prefix
Instruction Opcode
mov ax,[cs:bx] 2E9B07
mov ax,[es:bx] 268B07
mov ax,[ss:bx] 368B07
mov ax,[bx] 8B07
Override prefix will be used in case we override the default segment for bx register
because its default was the data segment and not the code segment.

So here we are telling the processor that just for this instruction take bx to CS and not DS.
This value is per instruction

You might also like