tb0038.pp 905 B

1234567891011121314151617181920212223242526272829303132333435
  1. { Old file: tbs0043.pp }
  2. { shows assembler nasm output fpu opcodes problem OK 0.99.6 (PFV) }
  3. { THE OUTPUT is incorrect but the }
  4. { parsing is correct. }
  5. { under nasm output only. }
  6. { works correctly under tasm/gas }
  7. { other problems occur with other }
  8. { things in math.inc }
  9. { pp -TDOS -Ratt -Anasm bug0043.pp }
  10. procedure frac;
  11. begin
  12. asm
  13. subl $16,%esp
  14. fnstcw -4(%ebp)
  15. fwait { unknown instruction }
  16. movw -4(%ebp),%cx
  17. orw $0x0c3f,%cx
  18. movw %cx,-8(%ebp)
  19. fldcw -8(%ebp)
  20. fwait { unknown instruction }
  21. fldl 8(%ebp)
  22. frndint
  23. fsubl 8(%ebp)
  24. fabsl
  25. fclex
  26. fldcw -4(%ebp)
  27. leave
  28. ret $8
  29. end ['ECX'];
  30. end;
  31. Begin
  32. end.