Computer Science, asked by deepakanand26121999, 2 months ago

Write and run a program using 8086 assembly language that clears the upper
4 bits of AL register using BL register and any logic operation. You must decide
the content of BL register yourself.

Answers

Answered by HelloVaibhav
3

Answer:

00000040 WithArgumentPassed PROC argA: BYTE, argB: BYTE, ptrC: PTR BYTE

;

; INVOKE SubWithADDR with three argument addresses

; Receives: Parameters argA, argB in BYTE and ptrC as PTR BYTE

; Returns: The result A-B in DL via ptrC

;-------------------------------------------------------------

00000040 55 * push ebp

00000041 8B EC * mov ebp, esp

INVOKE SubWithADDR, ADDR argA, ADDR argB, ptrC

00000043 FF 75 10 * push dword ptr ss:[ebp]+000000010h

00000046 8D 45 0C * lea eax, byte ptr ss:[ebp]+00Ch

00000049 50 * push eax

0000004A 8D 45 08 * lea eax, byte ptr ss:[ebp]+008h

0000004D 50 * push eax

0000004E E8 FFFFFFAD * call SubWithADDR

00000053 8B 75 10 mov esi, ptrC

00000056 8A 16 mov dl, [esi]

ret

00000058 C9 * leave

00000059 C2 000C * ret 0000Ch

0000005C WithArgumentPassed ENDP

Similar questions