xenix 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #------------------------------------------------------------------------------
  2. # $File: xenix,v 1.11 2017/03/17 21:35:28 christos Exp $
  3. # xenix: file(1) magic for Microsoft Xenix
  4. #
  5. # "Middle model" stuff, and "Xenix 8086 relocatable or 80286 small
  6. # model" lifted from "magic.xenix", with comment "derived empirically;
  7. # treat as folklore until proven"
  8. #
  9. # "small model", "large model", "huge model" stuff lifted from XXX
  10. #
  11. # XXX - "x.out" collides with PDP-11 archives
  12. #
  13. 0 string core core file (Xenix)
  14. # URL: http://www.polarhome.com/service/man/?qf=86rel&tf=2&of=Xenix
  15. # Reference: http://www.azillionmonkeys.com/qed/Omfg.pdf
  16. # Update: Joerg Jenderek
  17. # recordtype~TranslatorHEADerRecord
  18. 0 byte 0x80
  19. # GRR: line above is too general as it catches also Extensible storage engine DataBase
  20. # skip examples like GENA.SND Switch.Snd by looking for record length maximal 1024-3
  21. >1 uleshort <1022
  22. # skip examples like GAME.PICTURE Strange.Pic by looking for positiv record length
  23. >>1 uleshort >0
  24. # skip examples like Xtable.Data FRACTAL.GEN SHR.VIEW by looking for positiv string length
  25. >>>3 ubyte >0
  26. # skip examples like OMBRE.6 with "UUUUUU" by looking for filename like "hello.c"
  27. >>>>4 regex [a-zA-Z_/]{1,8}[.] 8086 relocatable (Microsoft)
  28. #!:mime application/octet-stream
  29. !:mime application/x-object
  30. !:ext o/a
  31. >>>>>3 pstring x \b, "%s"
  32. # checksum
  33. #>>>>>(3.b+4) ubyte x \b, checksum 0x%2.2x
  34. 0 leshort 0xff65 x.out
  35. >2 string __.SYMDEF randomized
  36. >0 byte x archive
  37. 0 leshort 0x206 Microsoft a.out
  38. >8 leshort 1 Middle model
  39. >0x1e leshort &0x10 overlay
  40. >0x1e leshort &0x2 separate
  41. >0x1e leshort &0x4 pure
  42. >0x1e leshort &0x800 segmented
  43. >0x1e leshort &0x400 standalone
  44. >0x1e leshort &0x8 fixed-stack
  45. >0x1c byte &0x80 byte-swapped
  46. >0x1c byte &0x40 word-swapped
  47. >0x10 lelong >0 not-stripped
  48. >0x1e leshort ^0xc000 pre-SysV
  49. >0x1e leshort &0x4000 V2.3
  50. >0x1e leshort &0x8000 V3.0
  51. >0x1c byte &0x4 86
  52. >0x1c byte &0xb 186
  53. >0x1c byte &0x9 286
  54. >0x1c byte &0xa 386
  55. >0x1f byte <0x040 small model
  56. >0x1f byte =0x048 large model
  57. >0x1f byte =0x049 huge model
  58. >0x1e leshort &0x1 executable
  59. >0x1e leshort ^0x1 object file
  60. >0x1e leshort &0x40 Large Text
  61. >0x1e leshort &0x20 Large Data
  62. >0x1e leshort &0x120 Huge Objects Enabled
  63. >0x10 lelong >0 not stripped
  64. 0 leshort 0x140 old Microsoft 8086 x.out
  65. >0x3 byte &0x4 separate
  66. >0x3 byte &0x2 pure
  67. >0 byte &0x1 executable
  68. >0 byte ^0x1 relocatable
  69. >0x14 lelong >0 not stripped
  70. 0 lelong 0x206 b.out
  71. >0x1e leshort &0x10 overlay
  72. >0x1e leshort &0x2 separate
  73. >0x1e leshort &0x4 pure
  74. >0x1e leshort &0x800 segmented
  75. >0x1e leshort &0x400 standalone
  76. >0x1e leshort &0x1 executable
  77. >0x1e leshort ^0x1 object file
  78. >0x1e leshort &0x4000 V2.3
  79. >0x1e leshort &0x8000 V3.0
  80. >0x1c byte &0x4 86
  81. >0x1c byte &0xb 186
  82. >0x1c byte &0x9 286
  83. >0x1c byte &0x29 286
  84. >0x1c byte &0xa 386
  85. >0x1e leshort &0x4 Large Text
  86. >0x1e leshort &0x2 Large Data
  87. >0x1e leshort &0x102 Huge Objects Enabled
  88. 0 leshort 0x580 XENIX 8086 relocatable or 80286 small model