To Run

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Lets see how a simple Assembly Language Program could be run using MASM.

1)Resuming with the Point no. 5 of previous post Beginning With MASM After typing a simple program for addition the screen will look like:

It is a simple program in which 2 numbers 01H and 02H are taken into register AL and BL and then added and final result could be viewed in register AL or memory location 3000H. 2)Now Let us Save the file (File-> Save ) and exit (File->Exit or Alt+F+x) well get back to the cmd screen :

3) Now well follow the final 3 instructions given in step no. 8 in previous post to compile and run the program (circled by green color). Keep pressing enter when program asks for object file name or run file name during compilation and linking.

4)After entering Debug addition.exe the cursor starts blinking in front of a hyphen . Now well see the step by step result by pressing t and enter alternatively.

5) Here we can see that after pressing t for the fourth time the value 02 is moved in BX and value 01 is moved in AX. In the next step the values are added and and result 03 could be seen in AX register itself. After that in further steps we have moved result to location 3000 H and then terminated the program by int 21H. So above was a simple implementation of a sample program. Ill be uploading the source codes of some more sample programs in the upcoming posts. Any queries could be posted as a comment and would be answered as soon possible.

You might also like