xref: /freebsd/contrib/file/magic/Magdir/xenix (revision c8e7f78a3d28ff6e6223ed136ada8e1e2f34965e)
1
2#------------------------------------------------------------------------------
3# $File: xenix,v 1.15 2022/10/19 20:15:16 christos Exp $
4# xenix:  file(1) magic for Microsoft Xenix
5#
6# "Middle model" stuff, and "Xenix 8086 relocatable or 80286 small
7# model" lifted from "magic.xenix", with comment "derived empirically;
8# treat as folklore until proven"
9#
10# "small model", "large model", "huge model" stuff lifted from XXX
11#
12# XXX - "x.out" collides with PDP-11 archives
13#
140	string		core		core file (Xenix)
15# URL: http://www.polarhome.com/service/man/?qf=86rel&tf=2&of=Xenix
16#      http://fileformats.archiveteam.org/wiki/OMF
17# Reference: http://www.azillionmonkeys.com/qed/Omfg.pdf
18# Update: Joerg Jenderek
19# recordtype~TranslatorHEADerRecord
200	byte		0x80
21# GRR: line above is too general as it catches also Extensible storage engine DataBase,
22# all lif files like forth.lif hpcc88.lif lex90b.lif ( See ./lif)
23# and all compressed DEGAS low-res bitmaps like: MUNCHIE.PC1 PIDER1.PC1
24# skip examples like GENA.SND Switch.Snd by looking for record length maximal 1024-3
25>1	uleshort	<1022
26# skip examples like GAME.PICTURE Strange.Pic by looking for positive record length
27>>1	uleshort	>0
28# skip examples like Xtable.Data FRACTAL.GEN SHR.VIEW by looking for positive string length
29>>>3	ubyte		>0
30# skip examples like OMBRE.6 with "UUUUUU" name by looking for valid high second record type
31>>>>(1.s+3)	ubyte	>0x6D
32# skip few Atari DEGAS bitmap TPDEMO.PC2 RECIPE.PC2 with invalid "high" second record type FEh FFh
33>>>>>(1.s+3)	ubyte	<0xF2	8086 relocatable (Microsoft)
34#!:mime	application/octet-stream
35!:mime	application/x-object
36!:ext	obj/o/a
37# T-module name often source name like "hello.c" or "jmppm32.asm" in JMPPM32.OBJ or
38# "kbhit" in KBHITS.OBJ or "CAUSEWAY_KERNAL" in CWAPI.OBJ
39>>>>>>3	pstring		x		\b, "%s"
40# data length probably lower 256 according to TrID obj_omf.trid.xml
41>>>>>>1	uleshort	x		\b, 1st record data length %u
42# checksum
43#>>>>>>(3.b+4)	ubyte	x		\b, checksum %#2.2x
44# second recordtype: 96h~LNAMES 88h~COMENT 8CH~EXTDEF
45# highest F1h~Library End Record
46>>>>>>(1.s+3)	ubyte	x		\b, 2nd record type %#x
47>>>>>>(1.s+4)	uleshort x		\b, 2nd record data length %u
480	leshort		0xff65		x.out
49>2	string		__.SYMDEF	 randomized
50>0	byte		x		archive
510	leshort		0x206		Microsoft a.out
52>8	leshort		1		Middle model
53>0x1e	leshort		&0x10		overlay
54>0x1e	leshort		&0x2		separate
55>0x1e	leshort		&0x4		pure
56>0x1e	leshort		&0x800		segmented
57>0x1e	leshort		&0x400		standalone
58>0x1e	leshort		&0x8		fixed-stack
59>0x1c	byte		&0x80		byte-swapped
60>0x1c	byte		&0x40		word-swapped
61>0x10	lelong		>0		not-stripped
62>0x1e	leshort		^0xc000		pre-SysV
63>0x1e	leshort		&0x4000		V2.3
64>0x1e	leshort		&0x8000		V3.0
65>0x1c	byte		&0x4		86
66>0x1c	byte		&0xb		186
67>0x1c	byte		&0x9		286
68>0x1c	byte		&0xa		386
69>0x1f	byte		<0x040		small model
70>0x1f	byte		=0x048		large model
71>0x1f	byte		=0x049		huge model
72>0x1e	leshort		&0x1		executable
73>0x1e	leshort		^0x1		object file
74>0x1e	leshort		&0x40		Large Text
75>0x1e	leshort		&0x20		Large Data
76>0x1e	leshort		&0x120		Huge Objects Enabled
77>0x10	lelong		>0		not stripped
78
790	leshort		0x140		old Microsoft 8086 x.out
80>0x3	byte		&0x4		separate
81>0x3	byte		&0x2		pure
82>0	byte		&0x1		executable
83>0	byte		^0x1		relocatable
84>0x14	lelong		>0		not stripped
85
860	lelong		0x206		b.out
87>0x1e	leshort		&0x10		overlay
88>0x1e	leshort		&0x2		separate
89>0x1e	leshort		&0x4		pure
90>0x1e	leshort		&0x800		segmented
91>0x1e	leshort		&0x400		standalone
92>0x1e	leshort		&0x1		executable
93>0x1e	leshort		^0x1		object file
94>0x1e	leshort		&0x4000		V2.3
95>0x1e	leshort		&0x8000		V3.0
96>0x1c	byte		&0x4		86
97>0x1c	byte		&0xb		186
98>0x1c	byte		&0x9		286
99>0x1c	byte		&0x29		286
100>0x1c	byte		&0xa		386
101>0x1e	leshort		&0x4		Large Text
102>0x1e	leshort		&0x2		Large Data
103>0x1e	leshort		&0x102		Huge Objects Enabled
104
1050	leshort		0x580		XENIX 8086 relocatable or 80286 small model
106# GRR: line above is too general as it catches also all 8086 relocatable (Microsoft) with 1st record data length 5 C0M.OBJ C0T.OBJ C0S.OBJ
107