Assembly language instruction and debug command character

Source: Internet
Author: User
Tags microsoft dynamics

mov and add instructions

Assembly Instructions

Control what the CPU is doing

Formal syntax description

mov ax, 18

Send 18 to Ax

(AX) =18

mov Ah, 78

Send 78 to AH

(AH) =78

Add Ax, 8

Add 8 to the value in AX

(AX) = (AX) +8

MOV ax, bx

Send data in BX to AX

(AX) = (BX)

Add ax, BX

Add ax, BX content, results into Microsoft Dynamics AX

(AX) = (AX) + (BX)

• Description: Assembly instructions are case-insensitive; two operands must be in the same number of digits.

debug Command? R command: View, change the contents of the CPU register? d Command: Displays the contents of a piece of memory area in 16 binary format  ? e command: Overwrite the contents in memory? A command: Write a machine instruction &nbsp in memory in the format of assembly instruction; U command: Translate in-memory machine instructions into assembly instructions? T command: Execute a machine instruction  ? G Command: Executes to the specified position (breakpoint), such as "G cs:0012";? P Command: Execute subroutine call, loop, interrupt, repeat string operation and so on, stop at the next instruction.  ? Q command: Exit Debug Description:? The data entered or displayed in debug is in hexadecimal form; The debug command is a single letter, the case of commands and parameters can be mixed input; When a syntax error occurs in the command, "^error" is displayed in the error location; Before executing an instruction with the T command, make sure it is valid. Invalid instructions can cause deadlock in the processor, debug cannot respond, and even reboot the system.                                                                                                                        mov/add/sub directive (        )                                                                 function: Transmit, accumulate, reduce.                                                                          format: two operands.

Number of Operations 1

Number of Operations 2

Example

Register

Immediate number

mov ax, 1000H

Segment Register

Register

MOV ds, ax

Register

Register

Add bx, ax

Register

Memory Unit

Sub CX, [0]

Memory Unit

Register

mov [0], AL

Register

Segment Register

MOV bx, DS

Memory Unit

Segment Register

mov [0], DS

Segment Register

Memory Unit

mov ds, [0]

......

......

......

Inc Directive (INC) format: inc operand? Function: Add the value of the operand by 1? Description: The operand can be a register, or the memory unit Dec instruction (dec)? format: Dec operand? Function: Reduce the value of the operand by 1? Description: The operand can be a register, or it can be a memory unit • What are the key features of looping using the Loop command? Number of cycles in CX; The address identified in the loop instruction is preceded by the instruction, and the program segment to be executed is written in the middle of the label and loop instruction; Loop Loop Program Framework

MOV cx, number of cycles

S: loop-executed program segments

......

Loop s

Assembly language instruction and debug command character

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.