Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a complete assembly program code that implements the following algorithm (

ID: 3605591 • Letter: W

Question

Write a complete assembly program code that implements the following algorithm (in pseudo- code). 4. a. Display a greeting to the user. b. Ask for user's Name c. Ask for user's ld d. Display a customized greeting to user, incorporating Name and ld e. Ask user for two integers and store in memory f. Multiply the two integers and store result in memory g. Divide the two integers from each other, store the results in memory h. Display the original integers and the three computations results to the user

Explanation / Answer

section .data

; Declare/store the information

prompt db 'What is your name,userId User? '

helloMsg dq 'Hello Good Day'

name db ' ' ; space characters

endOfLine db '!' ;for exclamation

section .text

global _start

_start:

; Output that information 'What is your name,userId User? '

mov eax, 4

mov ebx, 1

mov ecx, prompt

mov edx, 30

int 0x80 ; invoke an interrupt

; Accept input and store the user's name and userId

mov eax, 3

mov ebx, 1

mov ecx, name

mov edx, 23

int 0x80

; Output that information "Hello…"

mov eax, 4

mov ebx, 1

mov ecx, helloMsg

mov edx, 23 ; according to size of name

int 0x80

; Exit

mov eax, 1

mov ebx, 0

int 0x80

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote