xref: /freebsd/contrib/file/magic/Magdir/xenix (revision 3c4ba5f55438f7afd4f4b0b56f88f2bb505fd6a6)
1
2#------------------------------------------------------------------------------
3# $File: xenix,v 1.14 2021/04/26 15:56:00 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	8086 relocatable (Microsoft)
32#!:mime	application/octet-stream
33!:mime	application/x-object
34!:ext	obj/o/a
35# T-module name often source name like "hello.c" or "jmppm32.asm" in JMPPM32.OBJ or
36# "kbhit" in KBHITS.OBJ or "CAUSEWAY_KERNAL" in CWAPI.OBJ
37>>>>>3	pstring		x		\b, "%s"
38# data length probably lower 256 according to TrID obj_omf.trid.xml
39>>>>>1	uleshort	x		\b, 1st record data length %u
40# checksum
41#>>>>>(3.b+4)	ubyte	x		\b, checksum %#2.2x
42# second recordtype: 96h~LNAMES 88h~COMENT 8CH~EXTDEF
43>>>>>(1.s+3)	ubyte	x		\b, 2nd record type %#x
44>>>>>(1.s+4)	uleshort x		\b, 2nd record data length %u
450	leshort		0xff65		x.out
46>2	string		__.SYMDEF	 randomized
47>0	byte		x		archive
480	leshort		0x206		Microsoft a.out
49>8	leshort		1		Middle model
50>0x1e	leshort		&0x10		overlay
51>0x1e	leshort		&0x2		separate
52>0x1e	leshort		&0x4		pure
53>0x1e	leshort		&0x800		segmented
54>0x1e	leshort		&0x400		standalone
55>0x1e	leshort		&0x8		fixed-stack
56>0x1c	byte		&0x80		byte-swapped
57>0x1c	byte		&0x40		word-swapped
58>0x10	lelong		>0		not-stripped
59>0x1e	leshort		^0xc000		pre-SysV
60>0x1e	leshort		&0x4000		V2.3
61>0x1e	leshort		&0x8000		V3.0
62>0x1c	byte		&0x4		86
63>0x1c	byte		&0xb		186
64>0x1c	byte		&0x9		286
65>0x1c	byte		&0xa		386
66>0x1f	byte		<0x040		small model
67>0x1f	byte		=0x048		large model
68>0x1f	byte		=0x049		huge model
69>0x1e	leshort		&0x1		executable
70>0x1e	leshort		^0x1		object file
71>0x1e	leshort		&0x40		Large Text
72>0x1e	leshort		&0x20		Large Data
73>0x1e	leshort		&0x120		Huge Objects Enabled
74>0x10	lelong		>0		not stripped
75
760	leshort		0x140		old Microsoft 8086 x.out
77>0x3	byte		&0x4		separate
78>0x3	byte		&0x2		pure
79>0	byte		&0x1		executable
80>0	byte		^0x1		relocatable
81>0x14	lelong		>0		not stripped
82
830	lelong		0x206		b.out
84>0x1e	leshort		&0x10		overlay
85>0x1e	leshort		&0x2		separate
86>0x1e	leshort		&0x4		pure
87>0x1e	leshort		&0x800		segmented
88>0x1e	leshort		&0x400		standalone
89>0x1e	leshort		&0x1		executable
90>0x1e	leshort		^0x1		object file
91>0x1e	leshort		&0x4000		V2.3
92>0x1e	leshort		&0x8000		V3.0
93>0x1c	byte		&0x4		86
94>0x1c	byte		&0xb		186
95>0x1c	byte		&0x9		286
96>0x1c	byte		&0x29		286
97>0x1c	byte		&0xa		386
98>0x1e	leshort		&0x4		Large Text
99>0x1e	leshort		&0x2		Large Data
100>0x1e	leshort		&0x102		Huge Objects Enabled
101
1020	leshort		0x580		XENIX 8086 relocatable or 80286 small model
103