Professional Documents
Culture Documents
BITF19A005 - COAL Lab 8
BITF19A005 - COAL Lab 8
Lab 8
Task #1
1- Clear the even number bits of AX, leaving the other bits unchanged
AND AX,0AAAAH
2- Set the most and least significant bits of BL, leaving the other bits unchanged
OR BL,81H
3- Complement the msb (most significant bit) of DX, leaving the other bits unchanged
XOR DX,8000H
4- Replace the value of word variable WORD1 by its one’s compliment
NOT WORD1
Task #2
Task #3
Write an assembly code which uses a logic instruction to convert an upper-case letter to lower case.
(10 marks)
.MODEL SMALL
.STACK 100H
.DATA
.CODE
MAIN PROC
MOV AX,@DATA
MOV DS,AX
MOV AH,4CH
INT 21H
MAIN ENDP
END MAIN
Task #4
Write an assembly code which uses a logic instruction to convert decimal digit to its ASCII code. (10
marks)
.MODEL SMALL
.STACK 100H
.DATA
.CODE
MAIN PROC
MOV AX,@DATA
MOV DS,AX
MOV AH,4CH
INT 21H
MAIN ENDP
END MAIN