ftell.s 409 B

12345678910111213141516171819202122232425262728293031323334
  1. .file "ftell.c"
  2. #NO_APP
  3. .text
  4. tigcc_compiled.:
  5. #APP
  6. .set _A_LINE,0xA000
  7. #NO_APP
  8. .text
  9. .even
  10. .globl ftell
  11. ftell:
  12. move.w 10(%a0),%d1
  13. move.w %d1,%d0
  14. and.w #16,%d0
  15. moveq.l #-1,%d2
  16. tst.w %d0
  17. jbne .L1
  18. and.w #64,%d1
  19. move.l (%a0),%d0
  20. move.l 4(%a0),%d2
  21. tst.w %d1
  22. jbeq .L3
  23. sub.l %d2,%d0
  24. subq.l #2,%d0
  25. jbra .L4
  26. .even
  27. .L3:
  28. sub.l %d2,%d0
  29. subq.l #5,%d0
  30. .L4:
  31. move.l %d0,%d2
  32. .L1:
  33. move.l %d2,%d0
  34. rts