Tutorial Questions
Tutorial Questions
[ ]
1 h ch
7. Given the matrix A = 6 h ah
2 h dh
a) Declare matrix A using 8086
b) Illustrate how matrix A is logically stored in memory.
c) Write 8086 instructions to retrieve element a[2,0] into register AL
8. Write an ALP that uses the stack to modify contents of a register
9. Write an ALP where two registers use the stack for exchanging the values
10. Write 8086 instructions for the following High level language construct
While temperature > 40 Do
Display “abnormal levels of heat, adjust thermostat”
End While
1
11. Determine the contents of the accumulator register after executing each line from lines 5 -
12 from the given code.
1. .DATA
2. NUM DD 324A1234H
3. ARRAY DB 25H, 67H, 0ABH, 0BBH
4. .CODE
5. MOV AL, BYTE PTR NUM ;AL =
6. MOV AX, WORD PTR NUM ;AX =
7. MOV AX, WORD PTR [NUM +2] ;AX =
8. MOV AL, ARRAY[2] ;AL=
9. MOV AX, WORD PTR ARRAY ;AX=
10. MOV AX, WORD PTR ARRAY +2 ;AX =
11. MOV AX, WORD PTR ARRAY ;AX=
12. MOV AX, WORD PTR ARRAY +2 ;AX =
12. Write an ALP to toggle the bits of port address 199 continuously.
13. Write a program to make the stepper motor rotate clockwise, assuming that the port
number of the stepper motor is 07h.
14. Write a program to make the stepper motor rotate anti clockwise, assuming that the port
number of the stepper motor is 07h.