Data x word 23 y word 3 Write assembly code for the followin
Data x: word 23 y: word -3 Write assembly code for the following pseudo code and draw flow chard (for both Q1 and Q2): if (x
Solution
Answer:
Assembly Language Code :
1)
.zero 1
main:
push rbp
mov rbp, rsp
cmp DWORD PTR [rbp-4], 4
jg .L2
add DWORD PTR [rbp-8], 1
2)
.zero 1
main:
push rbp
mov rbp, rsp
mov DWORD PTR [rbp-4], 1
mov eax, 1
test al, al
je .L2
mov DWORD PTR [rbp-8], 0
