jayhoogl.blogg.se

Opcode 0xed
Opcode 0xed








opcode 0xed opcode 0xed

That is a lot of extra code for a single integer addition, but that's a simple example once more complex floating point operations are involved, it starts to pay off. transfer result from memory location(s) back into registers.transfer result from the FPU stack into memory location(s).do the actual calculations using the FPU (more on this soon).

opcode 0xed

  • transfer values from memory location(s) onto FPU stack.
  • transfer values from CPU registers to memory location(s).
  • Opcode 0xed how to#

    (Obviously that made the program bigger instead of smaller, but the point of this exercise is to illustrate how to work with the FPU.) Looking at our changes, you get a sense of what usual interaction with the FPU is: for ESC jnz X rinse and repeat ret quit program Cwd "clear" DX for perfect alignment mov al, 0x13 X: int 0x10 set video mode AND draw pixel mov ax, cx get "column" in AX fninit init FPU first mov, ax write first addend to a memory location fild word F(pu) I(nteger) L(oad)D a WORD from memory location to the FPU stack mov, di write second addend to a memory location fiadd word Directly add the word in the memory location to the top FPU stack fist word F(pu) I(nteger) ST(ore) the result into a memory location mov ax, Get the word from the memory location into AX xor al, ah the famous XOR pattern and al, 32 + 8 a more interesting variation of it mov ah, 0x0C set subfunction "set pixel" for int 0x10 loop X loop 65536 times inc di increment framecounter in al, 0圆0 check keyboard.










    Opcode 0xed