Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Coal Lab 01

22k-4162 Abdul Rafiu BCS-3B

Task 3:
INCLUDE Irvine32.inc
.code
main PROC
mov eax, 10h
mov ebx, 25h
mov eax, 8500h
mov ecx, 30h
call DumpRegs
exit
main ENDP
END main

Output:

Task 5:
TITLE My First Program (Test.asm)
INCLUDE Irvine32.inc
.code
main PROC
mov eax, 47h
it Sets the value of eax with 47 in AL register, EAX 00000047
mov ebx, 39h
it Sets the value of ebx with 39 in AL register, EBX 00000039
mov ecx, 60h
it Sets the value of ecx with 60 in AL register, ECX 00000060
add eax, ebx
Adding the current values of ebx in eax. Value will be 80, EAX 00000080
add eax, ecx
Adding the current values of ecx in eax. Value will be E0, EAX 000000E0
mov ebx, 85h
it replaces the value of ebx which is 39 with 85, EBX 00000085
mov ecx, 64h
it replaces the value of ecx which is 60 with 64, ECX 00000064
add eax, ebx
Adding the current values of ebx in eax. Value will be 165, EAX 00000165
add eax, ecx
Adding the current values of ebx in eax. Value will be 1C9, EAX 000001C9
call DumpRegs
exit
main ENDP
END main

You might also like