Tuesday, September 27, 2016

Debugging Assembly Language | Introduction to

If you are interested in writing code on command prompt and like writing code in command prompt than this tutorial is for you. Debugging assembly language is easy. Following picture shows an example of it:

What is Debugging?

Debug is a dos program which allows programmers to see execution of the program closely in depth. It is used to:

  • Change and see memory contents
  • Enter and execute programs
  • Hold the program at a specific instruction to check the data values or change them.

Debugging commands Assembly language

Below are the command examples of debugging an assembly language code:

Debug: Enter a program

Q: Quit the program.

R: See register contents/values.

R<register>: see particular register content/value also change it.

Practice Program: See AX register contents and change the value to 2, 34, 543, and GE.

A: this command assembles the program. You can enter assembly instructions into the memory.

A <starting address>: starting address can be an offset of code segment or you can also specify segment register.

Example – your turn: a 100 or a cs: 100 are the same, type a 100 and debug it.

U: a command that un-assembles the program. You can see machine code of your program by using this command. You can also specify the starting and ending addresses of memory section you want to see the code of, U<starting address> (space) <ending address>.

G: G is a go command that allows the program to run until it reaches the breakpoint. At the end register contents are displayed to the programmer.

F: F command is used to fill into the memory. Format of this command is: F<starting address> <ending address> <data>.

E: E command is used to enter any data or change into the memory. For example: E 200 ‘HELLO WORLD’.

D: D command is used to see the register contents. You can also use this command to fill segment providing offset. For example: F 10 10F FF, fills 16bytes with FF.


9 comments :

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. This comment has been removed by a blog administrator.

    ReplyDelete
  5. This comment has been removed by a blog administrator.

    ReplyDelete
  6. This comment has been removed by a blog administrator.

    ReplyDelete
  7. This comment has been removed by a blog administrator.

    ReplyDelete
  8. Health is not all about diet and exercise. The Hormones in your body can either break you or build you. Hormones are special chemical messengers responsible for controlling your body activities. The endocrine glands directly secret these complex chemical substances into your bloodstream.

    ReplyDelete
  9. Resurge Review the maker of Resurge pills believes that the consumption of this supplement for a period of at least 90 days will deliver lasting results. You will be able to witness immediate weight loss and improved health; however, minimum consumption of 90 days is advised. For the time being there is no Resurge bonus available.

    ReplyDelete

Note: Only a member of this blog may post a comment.

Copyright 2017. All Rights Reserved. Privacy Policy / Terms And Conditions / Sitemap / Contact