Assembly Language Learning Notes (ix) Principle of transfer instruction

Source: Internet
Author: User
1.8086 Transfer Instruction Classification:
Unconditional Jump instruction: JMP
Conditional Transfer directives:
Loop command: Loop
Procedure (function equivalent to C)
Interrupt ()

The operator offset is a compiler-processed symbol in assembly language, and his function is to get the offset address of the label
Start:mov ax,offset start; equivalent to mov ax,0

JMP unconditionally jumps, can only modify IP, can also modify CS and IP
JMP Short Designator (intra-segment -128~127): Transfer to label instruction
(IP) = (IP) + 8-bit displacement
JMP near PTR designator (intra-segment transfer -32769~32767)
(IP) = (IP) + 16-bit displacement
Complement...
JMP far PTR designator (inter-segment transfer)

To transfer an address in a register with the JMP directive:
Instruction format: jmp 16 Register
JMP Word PTR memory cell address: Intra-segment transfer
JMP DWORD PTR memory Unit Address: transfer between segments

2.JCXZ command: Conditional jump instruction; All conditional instructions are short-shifted
JCXZ Marking:
If cx=0, then turn to the label, otherwise do not jump
When cx=0, (IP) = (IP) + 8-bit displacement

3.loop instruction, all circular instructions are short transfer, if cx=0 does not jump

4. The meaning of transfer according to displacement:










Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.