Presentation is loading. Please wait.

Presentation is loading. Please wait.

we are going to write our Assembly language program as sample ex01.asm. So that we can attempt our assigment.

Similar presentations


Presentation on theme: "we are going to write our Assembly language program as sample ex01.asm. So that we can attempt our assigment."— Presentation transcript:

1

2 we are going to write our Assembly language program as sample ex01.asm. So that we can attempt our assigment.

3 Right click any where on white area, choose New and then Click on Text Document as shown.

4 Here a new Text Document has been created. Double click on it to open it.

5 Type in these instructions in the Text file as shown. This program is exactly same as ex01.asm in handouts. You can see.

6 After Typing these instructions, click on File menu, choose Save As… as shown.

7 Named it as ex01.asm as shown and click on Save. Note that the file is being saved in our Assembly folder. Don’t forget to change Save as type to All Files.

8 Our First Assembly Program named as ex01.asm is successfully being saved inside Assembly folder.

9 Goto Start menu and click on Run.

10 Type in here “cmd” and press enter key on keyboard to open DOS prompt.

11 First I typed “D:” in order to switch to D: drive Then I typed “cd Assembly” command in order to go inside our Assembly folder. The command “nasm ex01.asm –o ex01.com –l ex01.lst” will create two files “ex01.com and ex01.lst” if executed successfully and we will get our command prompt back without any error messages.

12 Next, we are going to execute ex01.com program and open it in the Debugger.

13 First I typed in Ex01.com and hit enter key. The program is executed but displayed nothing as there is no input/output instruction in our program. Next I type the command “afd ex01.com” and press enter. It will open our AFD debugger window with ex01.com loaded.

14 This is how our AFD debugger looks like. You can see that ex01.com is loaded properly inside it. To execute its instructions one by one, press F2 key on keyboard.

15 I have pressed F2 key once and you can see that now our second instruction is highlighted. Similarly, keep on hitting F2 key until all instructions are executed.

16 This message shows that our program has terminated properly. All instruction are executed.

17


Download ppt "we are going to write our Assembly language program as sample ex01.asm. So that we can attempt our assigment."

Similar presentations


Ads by Google