ELEN 306 Microprocessor Laboratory Lab 6 Exercises in Programming instructions S
ID: 2080634 • Letter: E
Question
ELEN 306 Microprocessor Laboratory Lab 6 Exercises in Programming instructions Spring 2017 l. Write a programusing the LOOP instructions to sumallthe odd numbers from 3 to 17. (Do the math to check your results). ll. Write a program using the DAA instruction to add the following two BCD numbers 3689 2867 then demonstrate on paper how the computer obtained the result Ill. Write an assembly language program with the following lines placed in the data these lines.) ORG 900H FILE6 DB 8.10, 10H,0AH, 16, 16H,32,32H,100,?,4 DUP(6) DW 1234,ABCDH DD 123456H Run the program. Examine the how the computer stored the data starting at address 900H. In the Results Section, you are to in what was observed IV. Write (or find) an at language program with all the "over head to include ssembly setting up the stack segment (SS)and the data segment (SS) registers. Then include the below set of instructions. Unassemble the program and note the code for the JNZ and the JMP instructions. Show the calculations for the displacement part of the instructions HERE MOV CX9 MOV AL,0 MOV BL,2 ADD AL,BL INC BL DEC CX JNZE HERE JMP THERE MOVALDL. MOV AH,DH THERE: INT 20 V. Results: Provide an analysis of the calculated results of each of the above programs.Explanation / Answer
1) .code
MOV EAX,0 #storing data in register
MOV EBX,#3 # setting starting limit
MOV ECX,#17 #ending limit
HERE: ADD AX,BX
INC EBX #increment 2 times
INC EBX
CMP EBX,ECX
JNZ HERE
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.