sysroff.info 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  1. ("cs" 0x0
  2. (("size") (1 byte) ("size"))
  3. (("hd") (1 byte) ("hd"))
  4. (("hs") (1 byte) ("hs"))
  5. (("un") (1 byte) ("un"))
  6. (("us") (1 byte) ("us"))
  7. (("sc") (1 byte) ("sc"))
  8. (("ss") (1 byte) ("ss"))
  9. (("er") (1 byte) ("er"))
  10. (("ed") (1 byte) ("ed"))
  11. (("sh") (1 byte) ("sh"))
  12. (("ob") (1 byte) ("ob"))
  13. (("rl") (1 byte) ("rl"))
  14. (("du") (1 byte) ("du"))
  15. (("dps") (1 byte) ("dps"))
  16. (("dsy") (1 byte) ("dsy"))
  17. (("dty") (1 byte) ("dty"))
  18. (("dln") (1 byte) ("dln"))
  19. (("dso") (1 byte) ("dso"))
  20. (("dus") (1 byte) ("dus"))
  21. (("dss") (1 byte) ("dss"))
  22. (("dbt") (1 byte) ("dbt"))
  23. (("dpp") (1 byte) ("dpp"))
  24. (("dfp") (1 byte) ("dfp"))
  25. (("den") (1 byte) ("den"))
  26. (("dds") (1 byte) ("dds"))
  27. (("dar") (1 byte) ("dar"))
  28. (("dpt") (1 byte) ("dpt"))
  29. (("dul") (1 byte) ("dul"))
  30. (("dse") (1 byte) ("dse"))
  31. (("dot") (1 byte) ("dot")))
  32. ("hd" 0x04
  33. (("module type") (4 bits) ("mt")
  34. (("MTYPE_ABS_LM" "0")
  35. ("MTYPE_REL_LM" "1")
  36. ("MTYPE_OMS_OR_LMS" "2")
  37. ("MTYPE_UNSPEC" "0xf")))
  38. (("spare")(4 bits) ("spare1"))
  39. (("creation date")( chars 12 bytes)( "cd"))
  40. (("number of units") (2 bytes) ("nu"))
  41. (("code") (1 byte) ("code"))
  42. (("version") (chars 4 bytes) ("ver"))
  43. (("address update") (1 byte) ("au"))
  44. (("segment identifier") (1 bit) ("si"))
  45. (("address field length") (4 bits) ("afl"))
  46. (("spare")(3 bits) ("spare2"))
  47. (("space size within segment") (1 byte) ("spcsz"))
  48. (("segment size") (1 byte) ("segsz"))
  49. (("segment shift") (1 byte) ("segsh"))
  50. (("entry point") (1 byte) ("ep"))
  51. (cond "ptr->ep"
  52. (cond "ptr->mt != MTYPE_ABS_LM"
  53. (("unit appearance number") (2 bytes) ("uan"))
  54. (("section appearance number") (2 bytes) ("sa")))
  55. (cond "segmented_p"
  56. (("segment address") (segsize bytes) ("sad")))
  57. (("address") (addrsize bytes) ("address")))
  58. (("os name") (chars variable bytes) ("os"))
  59. (("sys name") (chars variable bytes) ("sys"))
  60. (("module name") (chars variable bytes) ("mn"))
  61. (("cpu") (chars variable bytes) ("cpu")))
  62. ("hs" 0x05
  63. (("neg number") (2 bytes) ("neg")))
  64. ("un" 0x06
  65. (("format") (2 bits) ("format")
  66. (("FORMAT_LM" "0")
  67. ("FORMAT_OM" "1")
  68. ("FORMAT_OMS_OR_LMS" "2")))
  69. (("spare") (6 bits) ("spare1"))
  70. (("number of sections") (2 bytes) ("nsections"))
  71. (("number of external refs") (2 bytes) ("nextrefs"))
  72. (("number of external defs") (2 bytes) ("nextdefs"))
  73. (("unit name") (chars variable byte) ("name"))
  74. (("tool name") (chars variable byte) ("tool"))
  75. (("creation date") (chars 12 bytes) ("tcd"))
  76. (("linker name") (chars variable byte) ("linker"))
  77. (("creation date") (chars 12 bytes) ("lcd")))
  78. ("us" 0x07
  79. (("negotiation number") (2 bytes) ("neg")))
  80. ("sc" 0x08
  81. (("format") (2 bits) ("format"))
  82. (("spare") (6 bits) ("spare"))
  83. (("segment address") (segsize bytes) ("segadd"))
  84. (("address") (addrsize bytes) ("addr"))
  85. (("length") (addrsize bytes) ("length"))
  86. (("alignment") (addrsize bytes) ("align"))
  87. (("contents") (4 bits) ("contents")
  88. (("CONTENTS_CODE" "0")
  89. ("CONTENTS_DATA" "1")
  90. ("CONTENTS_STACK" "2")
  91. ("CONTENTS_DUMMY" "3")
  92. ("CONTENTS_SPECIAL" "4")
  93. ("CONTENTS_NONSPEC" "0xf")))
  94. (("concat") (4 bits) ("concat")
  95. (("CONCAT_SIMPLE" "0")
  96. ("CONCAT_SHAREDC" "1")
  97. ("CONCAT_DUMMY" "2")
  98. ("CONCAT_GROUP" "3")
  99. ("CONCAT_SHARED" "4")
  100. ("CONCAT_PRIVATE" "5")
  101. ("CONCAT_UNSPEC" "0xf")))
  102. (("read") (2 bits) ("read"))
  103. (("write") (2 bits) ("write"))
  104. (("exec") (2 bits) ("exec"))
  105. (("initialized") (2 bits) ("init"))
  106. (("mode") (2 bits) ("mode"))
  107. (("spare") (6 bits) ("spare1"))
  108. (("name") (chars variable byte) ("name")))
  109. ("ss" 0x09
  110. (("neg number") (2 bytes) ("neg")))
  111. ("er" 0x0c
  112. (("symbol type") (2 bits) ("type")
  113. (("ER_ENTRY" "0")
  114. ("ER_DATA" "1")
  115. ("ER_NOTDEF" "2")
  116. ("ER_NOTSPEC" "3")))
  117. (("spare") (6 bits) ("spare"))
  118. (("symbol name") (chars variable byte) ("name")))
  119. ("ed" 0x14
  120. (("section appearance number") (2 bytes) ("section"))
  121. (("symbol type") (3 bits) ("type")
  122. (("ED_TYPE_ENTRY" "0")
  123. ("ED_TYPE_DATA" "1")
  124. ("ED_TYPE_CONST" "2")
  125. ("ED_TYPE_NOTSPEC" "7")))
  126. (("spare") (5 bits) ("spare"))
  127. (cond "ptr->type==ED_TYPE_ENTRY || ptr->type==ED_TYPE_DATA"
  128. (("symbol address") (addrsize bytes) ("address")))
  129. (cond "ptr->type==ED_TYPE_CONST"
  130. (("constant value") (addrsize bytes) ("constant")))
  131. (("symbol name") (chars variable byte) ("name")))
  132. ("sh" 0x1a
  133. (("unit appearance number") (2 bytes) ("unit"))
  134. (("section appearance number") (2 bytes) ("section")))
  135. ("ob" 0x1c
  136. (("starting address flag") (1 bit) ("saf"))
  137. (("compression flag") (1 bit) ("cpf"))
  138. (("spare") (6 bits) ("spare"))
  139. (cond "ptr->saf"
  140. ( ("starting address") (addrsize bytes) ("address")))
  141. (cond "ptr->cpf"
  142. (("comp reps") (addrsize bytes) ("compreps")))
  143. (("data") (barray counted byte) ("data")))
  144. ("rl" 0x20
  145. (("boundary of relocatable area") (4 bits) ("boundary"))
  146. (("address polarity") (1 bit) ("apol"))
  147. (("segment number") (1 bit) ("segment"))
  148. (("sign of relocation") (1 bit) ("sign"))
  149. (("check range") (1 bit) ("check"))
  150. (("reloc address") (addrsize bytes) ("addr"))
  151. (("bit loc") (1 byte) ("bitloc"))
  152. (("field length") (1 byte) ("flen"))
  153. (("bcount") (1 byte) ("bcount"))
  154. (("operator") (1 byte) ("op")
  155. (("OP_RELOC_ADDR" "1")
  156. ("OP_SEC_REF" "0")
  157. ("OP_EXT_REF" "2")))
  158. (cond "ptr->op == OP_EXT_REF"
  159. (("symbol number") (2 bytes) ("symn")) )
  160. (cond "ptr->op == OP_SEC_REF"
  161. (("section number") (2 bytes) ("secn"))
  162. (("const opcode") (1 byte) ("copcode_is_3"))
  163. (("addend length") (1 byte) ("alength_is_4"))
  164. (("addend") (4 byte) ("addend"))
  165. (("plus opcode") (1 byte) ("aopcode_is_0x20")))
  166. (cond "ptr->op == OP_RELOC_ADDR"
  167. (("dunno") (2 bytes) ("dunno")))
  168. (("end") (1 byte) ("end")))
  169. ("du" 0x30
  170. (("format") (2 bits) ("format"))
  171. (("optimized") (1 bit) ("optimized"))
  172. (("stackfrmt") (2 bits) ("stackfrmt"))
  173. (("spare") (3 bits) ("spare"))
  174. (("unit number") (2 bytes) ("unit"))
  175. (("sections") (2 bytes) ("sections"))
  176. (repeat "ptr->sections"
  177. (("section appearance number") (2 bytes) ("san"))
  178. (("address") (addrsize bytes) ("address"))
  179. (("section length") (addrsize bytes) ("length")))
  180. (("tool name") (chars variable byte) ("tool"))
  181. (("creation date") (chars 12 bytes) ("date")))
  182. ("dsy" 0x34
  183. (("symbol type") (7 bits) ("type")
  184. (("STYPE_VAR" "0")
  185. ("STYPE_LAB" "1")
  186. ("STYPE_PROC" "2")
  187. ("STYPE_FUNC" "3")
  188. ("STYPE_TYPE" "4")
  189. ("STYPE_CONST" "5")
  190. ("STYPE_ENTRY" "6")
  191. ("STYPE_MEMBER" "7")
  192. ("STYPE_ENUM" "8")
  193. ("STYPE_TAG" "9")
  194. ("STYPE_PACKAGE" "10")
  195. ("STYPE_GENERIC" "11")
  196. ("STYPE_TASK" "12")
  197. ("STYPE_EXCEPTION" "13")
  198. ("STYPE_PARAMETER" "14")
  199. ("STYPE_EQUATE" "15")
  200. ("STYPE_UNSPEC" "0x7f")))
  201. (("assignment info") (1 bit) ("assign"))
  202. (("symbol id") (2 bytes) ("snumber"))
  203. (("symbol name") (chars variable bytes) ("sname"))
  204. (("nesting level") (2 bytes) ("nesting"))
  205. (cond "ptr->assign"
  206. (("assignment type") (1 byte) ("ainfo")
  207. (("AINFO_REG" "1")
  208. ("AINFO_STATIC_EXT_DEF" "2")
  209. ("AINFO_STATIC_EXT_REF" "3")
  210. ("AINFO_STATIC_INT" "4")
  211. ("AINFO_STATIC_COM" "5")
  212. ("AINFO_AUTO" "6")
  213. ("AINFO_CONST" "7")
  214. ("AINFO_UNSPEC" "0xff")))
  215. (("data length") (addrsize bytes) ("dlength"))
  216. (cond "ptr->ainfo == AINFO_STATIC_EXT_DEF
  217. || ptr->ainfo == AINFO_STATIC_INT
  218. || ptr->ainfo == AINFO_STATIC_COM"
  219. (("section number") (2 bytes) ("section")))
  220. (cond "ptr->ainfo == AINFO_STATIC_EXT_DEF
  221. || ptr->ainfo == AINFO_STATIC_INT
  222. || ptr->ainfo == AINFO_STATIC_COM
  223. || ptr->ainfo == AINFO_AUTO"
  224. (("address") (addrsize bytes) ("address")))
  225. (cond "ptr->ainfo == AINFO_REG"
  226. (("register name") (chars variable bytes) ("reg")))
  227. (cond "ptr->ainfo == AINFO_STATIC_EXT_DEF
  228. || ptr->ainfo == AINFO_STATIC_EXT_REF"
  229. (("external name") (chars variable bytes) ("ename")))
  230. (cond "ptr->ainfo == AINFO_CONST"
  231. (("constant") (chars variable bytes) ("constant"))))
  232. (cond "ptr->type == STYPE_MEMBER"
  233. (("assignment unit") (1 bit) ("bitunit"))
  234. (("spare") (7 bits) ("spare2"))
  235. (("field length") (addrsize bytes) ("field_len"))
  236. (("field offset") (addrsize bytes) ("field_off"))
  237. (cond "ptr->bitunit"
  238. (("bit offset") (addrsize bytes) ("field_bitoff"))))
  239. (cond "ptr->type== STYPE_ENUM"
  240. (("value length") (1 byte) ("evallen"))
  241. (("value") (4 bytes) ("evalue")))
  242. (cond "ptr->type == STYPE_CONST"
  243. (("value") (chars variable bytes) ("cvalue")))
  244. (cond "ptr->type == STYPE_EQUATE"
  245. (("value length") (1 byte) ("qvallen"))
  246. (("value") (4 bytes) ("qvalue"))
  247. (("basic type") (1 byte) ("btype"))
  248. (("size information") (addrsize bytes) ("sizeinfo"))
  249. (("sign") (2 bits) ("sign"))
  250. (("floating point type") (6 bits) ("flt_type")))
  251. (("source file number") (2 bytes) ("sfn"))
  252. (("source line number") (2 bytes) ("sln"))
  253. (("negotiation number") (2 bytes) ("neg"))
  254. (cond "ptr->type == STYPE_TAG"
  255. (("magic") (1 byte) ("magic"))))
  256. ("dul" 0x52
  257. (("max declaration type flag") (1 bit) ("max_variable"))
  258. (("max spare") (7 bits) ("maxspare"))
  259. (cond "ptr->max_variable == 0"
  260. (("maximum") (addrsize bytes) ("max"))
  261. (("max mode") (chars variable bytes) ("maxmode")))
  262. (("min declaration type flag") (1 bit) ("min_variable"))
  263. (("min spare") (7 bits) ("minspare"))
  264. (cond "ptr->min_variable == 0"
  265. (("minimum") (addrsize bytes) ("min"))
  266. (("min mode") (chars variable bytes) ("minmode"))))
  267. ("dty" 0x36
  268. (("end flag") (1 bit) ("end"))
  269. (("spare") (7 bits) ("spare"))
  270. (cond "!ptr->end"
  271. (("negotiation") (2 bytes) ("neg"))))
  272. ("dbt" 0x44
  273. (("basic type") (1 byte) ("btype")
  274. (("BTYPE_VOID" "0")
  275. ("BTYPE_UNDEF" "1")
  276. ("BTYPE_CHAR" "2")
  277. ("BTYPE_INT" "3")
  278. ("BTYPE_FLOAT" "4")
  279. ("BTYPE_BIT" "5")
  280. ("BTYPE_STRING" "6")
  281. ("BTYPE_DECIMAL" "7")
  282. ("BTYPE_ENUM" "8")
  283. ("BTYPE_STRUCT" "9")
  284. ("BTYPE_TYPE" "10")
  285. ("BTYPE_TAG" "11")
  286. ("BTYPE_UNSPEC" "0xff")))
  287. (("size info") (addrsize bytes) ("bitsize"))
  288. (("sign") (2 bits) ("sign")
  289. (("SIGN_SIGNED" "0")
  290. ("SIGN_UNSIGNED" "1")
  291. ("SIGN_UNSPEC" "3")))
  292. (("floating point type") (6 bits) ("fptype")
  293. (("FPTYPE_SINGLE" "0")
  294. ("FPTYPE_DOUBLE" "1")
  295. ("FPTYPE_EXTENDED" "2")
  296. ("FPTYPE_NOTSPEC" "0x3f")))
  297. (cond "ptr->btype==BTYPE_TAG || ptr->btype == BTYPE_TYPE"
  298. (("symbol id") (2 bytes) ("sid")))
  299. (("negotiation") (2 bytes) ("neg")))
  300. ("dar" 0x4e
  301. (("element length" ) (addrsize bytes) ("length"))
  302. (("dims") (1 byte) ("dims"))
  303. (repeat "ptr->dims"
  304. (("variable flag") (1 bit) ("variable")
  305. (("VARIABLE_FIXED" "0")
  306. ("VARIABLE_VARIABLE" "1")))
  307. (("subscript type") (1 bit) ("subtype")
  308. (("SUB_INTEGER" "0")
  309. ("SUB_TYPE" "1")))
  310. (("spare") (6 bits) ("spare"))
  311. (cond "ptr->subtype[n] == SUB_TYPE"
  312. (("sub symbol id") (2 bytes) ("sid")))
  313. (cond "ptr->subtype[n] == SUB_INTEGER"
  314. (("max declaration type flag") (1 bit) ("max_variable"))
  315. (("max spare") (7 bits) ("maxspare"))
  316. ;; FIXME: next field should be conditional on max_variable,
  317. (("maximum") (addrsize bytes) ("max"))
  318. (("min declaration type flag") (1 bit) ("min_variable"))
  319. (("min spare") (7 bits) ("minspare"))
  320. ;; FIXME: next field should be conditional on min_variable
  321. (("minimum") (addrsize bytes) ("min"))))
  322. (("negotiation") (2 bytes) ("neg")))
  323. ("dso" 0x3a
  324. (("function name") (2 bytes) ("sid"))
  325. (("sp update count") (4 bytes) ("spupdates"))
  326. (repeat "ptr->spupdates"
  327. (("update address") (addrsize bytes) ("address"))
  328. (("offset") (addrsize bytes) ("offset"))))
  329. ("dln" 0x38
  330. (("number of lines") (2 bytes) ("nln"))
  331. (repeat "ptr->nln"
  332. (("source file number") (2 bytes) ("sfn"))
  333. (("source line number") (2 bytes) ("sln"))
  334. (("section number") (2 bytes) ("section"))
  335. (("from address") (addrsize bytes) ("from_address"))
  336. (("to address") (addrsize bytes) ("to_address"))
  337. (("call count") (2 bytes) ("cc"))
  338. )
  339. (("neg") (2 bytes) ("neg")))
  340. ("dpp" 0x46
  341. (("start/end") (1 bit) ("end"))
  342. (("spare") (7 bits) ("spare"))
  343. (cond "!ptr->end"
  344. (("params") (1 byte) ("params"))
  345. (("neg number") (2 bytes) ("neg"))))
  346. ("den" 0x4a
  347. (("start/end") (1 bit) ("end"))
  348. (("spare") (7 bits) ("spare"))
  349. (cond "!ptr->end"
  350. (("neg number") (2 bytes) ("neg"))))
  351. ("dfp" 0x48
  352. (("start/end flag") (1 bit) ("end"))
  353. (("spare") (7 bits) ("spare"))
  354. (cond "!ptr->end"
  355. (("number of parameters") (1 byte) ("nparams"))
  356. (("neg number") (2 bytes) ("neg"))))
  357. ("dds" 0x4c
  358. (("start/end") (1 bit) ("end"))
  359. (("spare") (7 bits) ("spare"))
  360. (cond "!ptr->end"
  361. (("neg number") (2 bytes) ("neg"))))
  362. ("dpt" 0x50
  363. (("neg number") (2 bytes) ("neg"))
  364. (("dunno") (1 byte) ("dunno")))
  365. ("dse" 0x54
  366. (("neg number") (2 bytes) ("neg"))
  367. (("dunno") (1 byte) ("dunno")))
  368. ("dot" 0x56
  369. (("unknown") (1 byte) ("unknown")))
  370. ; FIXME: unknown field should be repeated symbol number?
  371. ("dss" 0x42
  372. (("type") (1 byte) ("type"))
  373. (("external/internal") (1 bit) ("internal"))
  374. (("spare") (7 bits) ("spare"))
  375. (cond "!ptr->internal"
  376. ( ("package name") (chars variable byte) ("package")))
  377. (cond "ptr->internal"
  378. (("symbol id") (2 bytes) ("id")))
  379. (("record type") (2 bytes) ("record"))
  380. (("rules") (chars variable byte) ("rules"))
  381. (("number of symbols") (2 bytes) ("nsymbols"))
  382. (("unknown" ) (2 bytes) ("fixme")))
  383. ("pss" 0x40
  384. (("negotiation number") (2 bytes) ("efn"))
  385. (("number of source files") (2 bytes) ("ns"))
  386. (repeat "ptr->ns"
  387. (("directory reference bit") (1 bit) ("drb"))
  388. (("spare") (7 bits) ("spare"))
  389. (("completed file name") (chars variable byte) ("fname"))
  390. (cond "ptr->drb[n]"
  391. (("directory apperance number") (2 bytes) ("dan"))))
  392. (("number of directories") (2 bytes) ("ndir"))
  393. (repeat "ptr->ndir"
  394. (("directory name") (chars variable bytes) ("dname"))))
  395. ; FIXME: the tr block has no contents. sysinfo, etc. aren't prepared
  396. ; to deal with that.
  397. ; ("tr" 0x7f)
  398. ("dus" 0x40
  399. (("negotiation number") (2 bytes) ("efn"))
  400. (("number of source files") (2 bytes) ("ns"))
  401. (repeat "ptr->ns"
  402. (("directory reference bit") (1 bit) ("drb"))
  403. (("spare") (7 bits) ("spare"))
  404. (("completed file name") (chars variable byte) ("fname"))
  405. (cond "ptr->drb[n]"
  406. (("directory apperance number") (2 bytes) ("dan"))))
  407. (("number of directories") (2 bytes) ("ndir"))
  408. (repeat "ptr->ndir"
  409. (("directory name") (chars variable bytes) ("dname"))))
  410. ("dps" 0x32
  411. (("start/end flag") (1 bit) ("end"))
  412. (("block type") (7 bits) ("type")
  413. (("BLOCK_TYPE_COMPUNIT" "0")
  414. ("BLOCK_TYPE_PROCEDURE" "2")
  415. ("BLOCK_TYPE_FUNCTION" "3")
  416. ("BLOCK_TYPE_BLOCK" "4")
  417. ("BLOCK_TYPE_BASIC" "9")))
  418. (cond "!ptr->end"
  419. (("optimization") (1 byte) ("opt"))
  420. (("section number") (2 bytes) ("san"))
  421. (("address") (addrsize bytes) ("address"))
  422. (("block size") (addrsize bytes) ("block_size"))
  423. (("nesting") (1 byte) ("nesting"))
  424. (cond "ptr->type == BLOCK_TYPE_PROCEDURE
  425. || ptr->type == BLOCK_TYPE_FUNCTION"
  426. (("return address") (1 bit) ("retaddr"))
  427. (("interrupt function flag") (1 bit) ("intrflag"))
  428. (("stack update flag") (1 bit) ("stackflag"))
  429. (("intra page JMP") (1 bit) ("intrpagejmp"))
  430. (("spare") (4 bits) ("spare")))
  431. (("neg number") (2 bytes) ("neg"))))