Assuming the variables are declared as sdword write assembly

Assuming the variables are declared as sdword, write assembly language Instructions to implement the following C statement: x = y = 1: Only a single assembly statement should be entered for each fill-in-the-blank answer. A fill-in-the-blank answer can be left blank if an assembly statement is not needed, but you will need to write In the work blank. Please use all lower case characters in your answers and single spaces to separate items, other than commas, on each line. If a register Is needed, please use one of the eax, ax, or al registers. Because of the way Canvas accepts answers, it is not possible to check all of the possible combinations which could be correct If you thank your answer is correct but Canvas marked it wrong, have the instructor review it. Assuming the variables are declared as byte, write assembly language instructions to implement the following C statements: d = \'z\';; a = d; b = a; Only a single assembly statement should be entered for each fill-in-the-blank answer. A fill-in-the-blank answer can be left blank if an assembly statement is not needed, but you will need to write In the work blank. Please use all lower case characters in your answers and single spaces to separate items, other than commas, on each line. If a register is needed, please use one of the eax, ax, or al registers.

Solution

1)

push rbp
line1 mov rbp, rsp
line2 mov DWORD PTR [rbp-4], 1
line3 mov DWORD PTR [rbp-8], 1
mov eax, 0
pop rbp
ret

2)

push rbp
mov rbp, rsp
line1 mov BYTE PTR [rbp-1], 122
movzx eax, BYTE PTR [rbp-1]

line2 mov BYTE PTR [rbp-2], al
movzx eax, BYTE PTR [rbp-2]
line3 mov BYTE PTR [rbp-3], al
mov eax, 0
pop rbp
ret

 Assuming the variables are declared as sdword, write assembly language Instructions to implement the following C statement: x = y = 1: Only a single assembly s

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site