CS310 Exercises
Note: type the questions and your answers.
1. Explain the results of the flags (OV/NV, PL/NG, ZR/NZ, CY/NC) and AL after the executions of the code segments in DEBUG.
1) AL: _________ (hex)
MOV AL, 0A
ADD AL, A0
2) AL: _________ (hex)
MOV AL, 0A
SUB AL, A0
3) AL: _________ (hex)
MOV AL, 7A
ADD AL, 10
4) AL: _________ (hex)
MOV AL, 81
AUB AL, 10
5) AL: _________ (hex)
MOV AL, 01
ADD AL, 10
6) AL: _________ (hex)
MOV AL, 10
SUB AL, 1
7) AL: _________ (hex)
MOV AL, 1
SUB AL, 10
2. Convert the following segment-offset address to absolute address: a) 0950:0100; b) 08F1:0200
3. Assemble the following program using Debug: trace the execution process and display the corresponding register/memory contents. Copy/paste the process from DOS console (Command Prompt) to the paper.
- A 100
mov ax, 6BFF
mov [250], ax
mov bx, [250]
inc bx
4. Based on the following data declaration in Debug, create a program to add the three 16-bit values and store the sum in memory location 0206.
- A 200
dw 0102, 0304, 0506, 0