Question: ; Author: Your name ; Date written: section . bss snsun resb 1 ; reserve 1 byte of memory to store the result medsum resw

; Author: Your name
; Date written:
section .bss
snsun resb 1 ; reserve 1 byte of memory to store the result
medsum resw 1 ; reserve 1 word of memory (2 bytes) to store the result
lgsum resd 1 ; reserve 1 dword of memory (4 bytes) to store the result
gtsum resq 1 ; reserve 1 qword of menory (8 bytes) to store the result
section .text
Blobal start
-start:
mov al,[sm1] ; AL --[sm1](copy one byte from memory at sm1 into register AL).
add al,[sm2] ; AL s--[sm1]+[sm2](add two numbers)
mov [smSun], al ; [smSun]-- AL (copy the value in AL into memory at smSum)
mov ax,[med1] ; AX --[med1](copy one byte from memory at med1 into register Ax)
add med1]+ med2(add two numbers)
mov [medSum], ax ; [medSum]-- AX (copy the value in Ax into memory at medSum)
mov eax, [1g1] ; EAX --[1g1](copy one byte from menory at 1g1 into register EAx )
add eax, [1g2] ; EAX --[1g1]+[1g2](add two numbers)
mov [1gSum], eax ; [1gSum]-- EAX (copy the value in EAX into memory at 1gSum)
mov rax, [gt1] ; RAX --[gt1](copy one byte from memory at gt1 into register RAX)
add rax, [gt2] ; RAX --[gt1]+[gt2](add two numbers)
mov [gtSum], rax; [gtSum]-- RAX (copy the value in RAX into memory at gtSum)
 ; Author: Your name ; Date written: section .bss snsun resb

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

This is an assembly code snippet written in x86 assembly language Lets go through it step by step Da... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!