shm.s 617 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. .sect .text; .sect .rom; .sect .data; .sect .bss
  2. .sect .text
  3. shm = 52
  4. .define _shmat
  5. .define _shmctl
  6. .define _shmdt
  7. .define _shmget
  8. _shmat:
  9. .data2 0x0000
  10. pushl 12(ap)
  11. pushl 8(ap)
  12. pushl 4(ap)
  13. pushl $0
  14. calls $4,Isys1
  15. ret
  16. _shmdt:
  17. .data2 0x0000
  18. pushl 4(ap)
  19. pushl $2
  20. calls $2,Isys
  21. ret
  22. _shmctl:
  23. .data2 0x0000
  24. pushl 12(ap)
  25. pushl 8(ap)
  26. pushl 4(ap)
  27. pushl $1
  28. calls $4,Isys
  29. ret
  30. _shmget:
  31. .data2 0x0000
  32. pushl 12(ap)
  33. pushl 8(ap)
  34. pushl 4(ap)
  35. pushl $3
  36. calls $4,Isys1
  37. ret
  38. Isys:
  39. .data2 0x0000
  40. chmk $shm
  41. bcc 1f
  42. jmp cerror
  43. 1:
  44. clrl r0
  45. ret
  46. Isys1:
  47. .data2 0x0000
  48. chmk $shm
  49. bcc 1f
  50. jmp cerror
  51. 1:
  52. ret