Introduction to assembly Language: Debug Debugging Tools

Source: Internet
Author: User

For college students, basic need to learn advanced programming language, I believe most of the science and technology students know C + +, C, Java language and other high-level language, but also know the machine language of the most low-level language, but there are many do not know the assembly language, may have heard the name, but do not know the use and so on. Now I will explain to you the assembly language and the introduction. I also just learn assembly language, you can follow me to study together. Unlike high-level languages, assembly language is machine-oriented and closest to machine language. To learn the assembly language, it is necessary to understand the machine instructions, data, matching representation and storage format, and the operation mode of the machine instruction program. Assembly language practice is very strong, you must learn while hands can grasp, need patience and careful. Beginners generally need to use the debug gadget to debug the program, and now I will show you the use of Debug Debugging Tools and Debug command.

Tools/Materials
    • Computer

    • System with Debug gadget installed (typically 32-bit Windows system comes with, 64-bit needs to install itself)

Method/Step
  1. debug debugger is provided in the form of a DOS external command program, Its file name is debug.com. If you are using a Windows system, then if it is a 32-bit computer, usually comes with debug debugging tools, and 64-bit generally do not bring this tool, you need to install. XP system is not introduced for the time being, the reader can refer to the method I introduced to try. First, click the open Windows Start icon. In the box, enter CMD, note is cmd, not debug, although input debug can also, but in the subsequent debugging of the program will appear some problems. Enter cmd and press ENTER to open the debugging tool.

  2. after opening the CMD program, enter debug, the same case, The use of uppercase, for the convenience of operation, the subsequent operation of all of me using lowercase. After entering, press Enter and the work box shown will appear.

  3. For another example, add the 21h and 23h two numbers, and the results are stored in AL. and through the command-t step by step execution, see the results. Each input a T, press ENTER after the completion of an instruction, the first instruction is the 21h into the ax register low AL, see the value of ax into 0021, the second step is to add 21h and 23h, and the results are stored in AL, after the execution of the value of AX to see from 0021 into 0044. Notice that after the execution of the two instructions, the value of the IP has changed, that is, the address pointer has changed. NV, up, EI, PL, NZ, NA, PO, NC represent the status of the flag register, no further introduction, consult the relevant books will have a detailed introduction.

  4. Now let's introduce a few common command characters. A: Progressive assembly; u: disassembly; t: Execute command by line; D: Display a certain memory unit content, re-enter the contents of the following memory will continue to display on the original display content; Q: Exit debug back To Dos State; R: Change or display the contents of one or more registers; N: Name file ; W: Writes the named file to disk; L: Loads the program into memory.

    Briefly introduce these commonly used several. Readers who are in need can go online to receive more detailed command letters.

    Let's show you a simple example and use these command characters.

    To view the saved content after saving, you can use Q to exit, and then enter the Dir return to see the directory under the file. You can see the file you named

Introduction to assembly Language: Debug Debugging Tools

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.