1. consider the following program. interpret the program line by line. Get an idea what the program.
TOS EQU 0FEFEH
CPU 8086
ORG 0400H
SECTION CODE:
MAIN:
MOV SP, TOS
CALL INITIALIZATION
MOV BX, PATTERN
MOV AL, [BX]
JMP $
INITIALIZATION:
MOV WORD[03FCH], COUNTERISR
MOV WORD[03FCH], 0
MOV AX, 0
STI
RET
COUNTERISR:
OUT 0, AL
IRET
SECTION DATA:
PATTERN DB 255, 128, 170, 15, 240
Do the following:
Part a:
a) by following the program as above, determine what would be the pattern that should be displayed on the LEDs.
Answer:
b) change the special instruction in the above [BX+1]. Determine what would be the pattern that should be displayed on the LEDs.
Answer:
c) change the special instruction in the above [BX+2]. Determine what would be the pattern that should be displayed on the LEDs.
Answer:
d) change the special instruction in the above [BX+3]. Determine what would be the pattern that should be displayed on the LEDs.
Answer:
e) change the special instruction in the above [BX+4]. Determine what would be the pattern that should be displayed on the LEDs.
Answer:
1 answer