Question: 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

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 PrintCString

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!