Professional Documents
Culture Documents
Near and Far Jump
Near and Far Jump
• The jump location may be in the same code segment, in which case it
is near jump. For a near jump, the value of CS remains the same, but
the value of IP will change. This is also called an intra-segment (within
segment) jump.
• The jump location may be in a different code segment – then it is
called a far jump. In this case, both CS and IP will have to take on new
values. This is an inter-segment (between segments) jump.
Loop Instruction
• LOOP label
The register CX is assigned to decrement every time LOOP executes.
When CX = 0, the looping is exited.
String Instructions
• The 8086 has a set of instructions for handling blocks of data in the form of
bytes or words.
• They are called ‘string’ instructions. A string is an array of data of the same
type – for example, a character string or a byte string.
• String instructions can be seen to be useful when in the memory, data has to
be moved, searched or compared in blocks (arrays).
Pre-requisites for using String Instructions
• Two segments are to be defined i.e., the data segment and the extra
segment. This means that the corresponding segment registers DS and ES
have to be initialized and used. The data segment is the source segment
and the extra segment is the destination segment.