Question: 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, I attached NASM assembly code. with the errors. wonder if someone could

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

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!