home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Distributions / ucb / spencer_2bsd.tar.gz / 2bsd.tar / src / pascal / opcodes / makeopc < prev    next >
Encoding:
Text File  |  1980-02-17  |  462 b   |  46 lines

  1. cp opc.d junk
  2. ed - junk >junk2
  3. g/^...[     ]*$/d
  4. =
  5. v/\*/d
  6. =
  7. v/.........../s/$/    /
  8. g/^0*/s//0/
  9. g/\(.*\)\*\(.*\)/s//#define O\2    \1/
  10. 1i
  11. /*
  12.  * operations
  13.  */
  14. .
  15. w opcode.h
  16. q
  17. ed - junk
  18. g/^\(23.\).*/s//\1/
  19. g/_/s/..../    /
  20. v/_/s/.*/    badop/
  21. 1s/^/optab:\
  22. /
  23. 130,$m0
  24. 1i
  25. .data
  26. .
  27. $a
  28. .text
  29. .
  30. /NULL/c
  31.     badop
  32. .
  33. w opcode.s
  34. q
  35. ed - opcode.h >>opcode.s
  36. /WRITC/s/#define //
  37. s/[     ]/ = /p
  38. w /dev/null
  39. q
  40. ed - junk2
  41. -s/$/\/256 opcodes assigned/p
  42. +s/$/\/256 opcodes #defined/p
  43. w
  44. q
  45. rm junk junk2
  46.