Answered step by step
Verified Expert Solution
Question
1 Approved Answer
; 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 ; reserve byte of memory to store the result medsum resw ; reserve word of memory bytes to store the result lgsum resd ; reserve dword of memory bytes to store the result gtsum resq ; reserve qword of menory bytes to store the result section text Blobal start start: mov alsm ; AL smcopy one byte from memory at sm into register AL add alsm ; AL ssmsmadd two numbers mov smSun al ; smSun AL copy the value in AL into memory at smSum mov axmed ; AX medcopy one byte from memory at med into register add med medadd two numbers mov medSum ax ; medSum AX copy the value in into memory at medSum mov eax, g ; EAX gcopy one byte from menory at into register EAx add eax, g ; EAX ggadd two numbers mov gSum eax ; gSum EAX copy the value in EAX into memory at gSum mov rax, gt ; RAX gtcopy one byte from memory at gt into register RAX add rax, gt ; RAX gtgtadd 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 ; reserve byte of memory to store the result
medsum resw ; reserve word of memory bytes to store the result
lgsum resd ; reserve dword of memory bytes to store the result
gtsum resq ; reserve qword of menory bytes to store the result
section text
Blobal start
start:
mov alsm ; AL smcopy one byte from memory at sm into register AL
add alsm ; AL ssmsmadd two numbers
mov smSun al ; smSun AL copy the value in AL into memory at smSum
mov axmed ; AX medcopy one byte from memory at med into register
add med medadd two numbers
mov medSum ax ; medSum AX copy the value in into memory at medSum
mov eax, g ; EAX gcopy one byte from menory at into register EAx
add eax, g ; EAX ggadd two numbers
mov gSum eax ; gSum EAX copy the value in EAX into memory at gSum
mov rax, gt ; RAX gtcopy one byte from memory at gt into register RAX
add rax, gt ; RAX gtgtadd two numbers
mov gtSum rax; gtSum RAX copy the value in RAX into memory at gtSum
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started