Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How would I make it so the 4 input are stored in memory and calculate the result using the sub instruction? .intel_syntax noprefix .data Income
How would I make it so the 4 input are stored in memory and calculate the result using the "sub" instruction?
.intel_syntax noprefix .data Income Prompt: .ascii "What is your mothly income? \0" Income: .quad O Rent Prompt: .ascii "How much is your monthy rent? \0" Rent: .quad O Credit Cardprompt: .ascii "How much do you swipe each month? \0" CreditCard: quad o CarPrompt: ascii "How much is your monthly car payment? \0", Car: .quad O Outgo: .ascii "Your total outgo is $\0" NetIncome: .ascii "You're actual net income is $10" .text .global _start start: lea rdx, Income Prompt call PrintCString mova rdx, Income call ScanInt lea rdx, Rent Prompt call PrintCString mova rdx, Rent call ScanInt lea rdx, CreditCardprompt Call PrintCString movq rdx, CreditCard call ScanInt lea rdx, CarPrompt Call PrintCString movq rdx, Car Call ScanInt lea rdx, Outgo Call PrintCString lea rdx, Net Income Call PrintCString .intel_syntax noprefix .data Income Prompt: .ascii "What is your mothly income? \0" Income: .quad O Rent Prompt: .ascii "How much is your monthy rent? \0" Rent: .quad O Credit Cardprompt: .ascii "How much do you swipe each month? \0" CreditCard: quad o CarPrompt: ascii "How much is your monthly car payment? \0", Car: .quad O Outgo: .ascii "Your total outgo is $\0" NetIncome: .ascii "You're actual net income is $10" .text .global _start start: lea rdx, Income Prompt call PrintCString mova rdx, Income call ScanInt lea rdx, Rent Prompt call PrintCString mova rdx, Rent call ScanInt lea rdx, CreditCardprompt Call PrintCString movq rdx, CreditCard call ScanInt lea rdx, CarPrompt Call PrintCString movq rdx, Car Call ScanInt lea rdx, Outgo Call PrintCString lea rdx, Net Income Call PrintCStringStep 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