Uploaded by hamza.omer.zaki

22i-1218-J Lab03

advertisement
Hamza Omer 22i-1218 Lab03
Data Segment Of Code For All Tasks:
.data
var1 BYTE 10
var2 BYTE 5
str1 BYTE "Hello This is Lab03","0"
result BYTE 0
Task Number 1:
mov ax, 0
mov bx, 0
mov al, var1
mov bl, var2
add al, bl
mov result, al
Task Number 2:
mov ax, 0
mov bx, 0
mov al, var1
mov bl, var2
sub al, bl
mov result, al
Hamza Omer 22i-1218 Lab03
Task Number 3:
mov ax, 0
mov bx, 0
mov al, var1
mov bl, var2
mul bl
mov result, al
Task Number 4:
mov ax, 0
mov bx, 0
mov al, var1
mov bl, var2
div bl
mov result, al
Task Number 5:
mov ax, 0 mov bx, 0 mov cx, 0 mov dx, 0
mov al, lengthof str1
mov lengthvar, al
mov bl, sizeof str1
mov sizevar, bl
mov eax, offset str1
mov offsetvar, eax
Hamza Omer 22i-1218 Lab03
mov dl, type str1
mov typevar, dl
Download