Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I attached NASM assembly code. with the errors. wonder if someone could help me rewrite this so I can write the rest of my code.

I attached NASM assembly code. with the errors. wonder if someone could help me rewrite this so I can write the rest of my code. it's supposed to be a calculator. Please post working code if possible.

Thanks, image text in transcribed

segment.data num1 db 4 num2 db 4 button db 2 segment.bss segment.text global asm main asm main: push ebp mov ebp, esp nasm-f elf-F calc.asm:23: error invalid combination of opcode and operands calc.asm: 26: error invalid combination of opcode and operands calc.asm:29: error: invalid combination of opcode and operands calc.asm:31: error: invalid combination of opcode and operands calc.asm:34: error invalid combination of opcode and operands calc.am.: 37: error: invalid combination of opcode and operand calc.asm: 40: error invalid combination of opcode and operands calc.asm: 43: error invalid combination of opcode and operands Makerile:9: recipe for target calc failed make: [calc] Error 1 dwarf-g calc.asm start: call read_int mov numi, eax call read char mov button, eax call read_ int mov num2, eax cmp button, '+ JE addition cmp button, '-' JE subtraction crmp button JE multiplication cmp button, JE division cmp button, % JE modulus addition: JMP start subtraction: JMP start multiplication: JMP start division: JMP start modulus: JMP start stop: segment.data num1 db 4 num2 db 4 button db 2 segment.bss segment.text global asm main asm main: push ebp mov ebp, esp nasm-f elf-F calc.asm:23: error invalid combination of opcode and operands calc.asm: 26: error invalid combination of opcode and operands calc.asm:29: error: invalid combination of opcode and operands calc.asm:31: error: invalid combination of opcode and operands calc.asm:34: error invalid combination of opcode and operands calc.am.: 37: error: invalid combination of opcode and operand calc.asm: 40: error invalid combination of opcode and operands calc.asm: 43: error invalid combination of opcode and operands Makerile:9: recipe for target calc failed make: [calc] Error 1 dwarf-g calc.asm start: call read_int mov numi, eax call read char mov button, eax call read_ int mov num2, eax cmp button, '+ JE addition cmp button, '-' JE subtraction crmp button JE multiplication cmp button, JE division cmp button, % JE modulus addition: JMP start subtraction: JMP start multiplication: JMP start division: JMP start modulus: JMP start stop

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 10g Insider Solutions

Authors: Arun R. Kumar, John Kanagaraj, Richard Stroupe

1st Edition

0672327910, 978-0672327919

More Books

Students also viewed these Databases questions

Question

=+8. Why is productivity important?

Answered: 1 week ago

Question

=+ 9. What is inflation and what causes it?

Answered: 1 week ago

Question

=+6. What does the invisible hand of the marketplace do?

Answered: 1 week ago