.code
orderTotal db 0.0
Burger:
fadd dword ptr [orderTotal], 10
jmp Food
Pizza:
fadd dword ptr [orderTotal], 16
jmp Food
ChickenRice:
fadd dword ptr [orderTotal], 8
jmp Food
It is supposed to add value into orderTotal, but I end up with memory operand not allowed in context error.
This is not how you define a real number. Use:
REAL4for single precision floating point values (4 bytes)REAL8for double precision floating point values (8 bytes)REAL10for extended precision floating point values (10 bytes)The arithmetic operations that the FPU (Floating Point Unit) does, all happen within the FPU. You need to load operands from / store results to memory: