Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Coding in Assembly Language Part 1-Microprocessors-Lab Assignments, Exercises of Microprocessors

This is lab assignment for Microprocessors course given by Govinda Singh at National Institute of Industrial Engineering. It includes: Command, Help, Debug, Environment, Compliment, Internal, Registers, Flag, Bits, Logical, Address

Typology: Exercises

2011/2012

Uploaded on 07/07/2012

kali
kali 🇮🇳

4.5

(37)

109 documents

1 / 3

Related documents


Partial preview of the text

Download Coding in Assembly Language Part 1-Microprocessors-Lab Assignments and more Exercises Microprocessors in PDF only on Docsity! Group B Lab 1 Dated: 21 February 2012 Name: ____________________________ Roll No:______________ Q:1 short Questions (for help use the file debug_tutorial.pdf) 1) command for finding help in debug environment 2) write down the valid commands for debugger with one example (in debug) 3) what is the command used to show the contents of memory 4) command to show only 16 bytes of memory, whose logical address is CS:IP 5) internal registers used for storing length of the program when we want to save the file in the hard disk 6) extension used for saving the code file 7) command to change flag register 8) how you can compliment all the flag bits with the above command Q:2 9) write the following assembly code in the debugger and answer the following questions (donot change the contents of CS and IP) mov al,ff mov bl,01 add al,bl nop i) What is the logical address of 1st instruction:____________ ii) After the instruction execution “add al,bl” what is the changes in the flag register, justify your answer iii) What is the logical address of last instruction “nop” iv) What is the command to append the following code after the above code inc al inc bl add al,bl nop int 21 v) Last address of the instruction “int21” vi) What the command u 100 does (provided 0100 is the contents of IP register) vii) What is the difference between above command and u cs:100 10e Q:3 1) Test the following procedure for saving above code file in hard disk and loading it again (write the proper command format r bx r cx n file name w docsity.com q for exit from debug debug n file name l u 2) Trace the code one by one 3) Use trace command to execute first 5 instructions Q:4 Exit debug mode and load the file again 4) The syntax of go command to execute the code 5) Does the contents of 88 registers are same after using Trace command and Go command. Verify Q:5 i) Copy the code from debugger window to notepad Save the code in txt file ii) Copy the code from the notepad and save it to debugger window (procedure shown) docsity.com
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved