; ===========================================================================

;UASM 2.49 generates functional identical but different opcode for "and ax,0xf"
;
; can happen with every other assembler - except the original one
; there are several functional identical opcodes - the assembler is free to decide which one to use
;
; example:
; ORG : 25 0F 00 -> and ax, 0xf
; UASM: 83 E0 0F -> and ax, 0xf

EQUAL_TO_ORIGINAL equ 1

; Segment type:	Pure code
seg000		segment	byte public 'CODE'
		assume cs:seg000
		assume es:nothing, ss:nothing, ds:nothing

dummy_entry_point:

		jmp	near ptr tsub0
; ---------------------------------------------------------------------------
		jmp	near ptr tsub1
; ---------------------------------------------------------------------------
		jmp	near ptr tsub2
; ---------------------------------------------------------------------------
		jmp	near ptr tsub3
; ---------------------------------------------------------------------------
		jmp	near ptr tsub4
; ---------------------------------------------------------------------------
		jmp	near ptr tsub5
; ---------------------------------------------------------------------------
		jmp	near ptr tsub6
; ---------------------------------------------------------------------------
		jmp	near ptr tsub7
; ---------------------------------------------------------------------------
		jmp	near ptr tsub8
; ---------------------------------------------------------------------------
		jmp	near ptr tsub9
; ---------------------------------------------------------------------------
		jmp	near ptr tsub10
; ---------------------------------------------------------------------------
		jmp	near ptr tsub11
; ---------------------------------------------------------------------------
		jmp	near ptr tsub12
; ---------------------------------------------------------------------------
		jmp	near ptr tsub13
; ---------------------------------------------------------------------------
		jmp	near ptr tsub14
; ---------------------------------------------------------------------------
		jmp	near ptr tsub15
; ---------------------------------------------------------------------------
		jmp	near ptr tsub16
; ---------------------------------------------------------------------------
		jmp	near ptr tsub17
; ---------------------------------------------------------------------------
		jmp	near ptr tsub18
; ---------------------------------------------------------------------------
		jmp	near ptr tsub19
; ---------------------------------------------------------------------------
		jmp	near ptr tsub20
; ---------------------------------------------------------------------------
		jmp	near ptr tsub21
; ---------------------------------------------------------------------------
		jmp	near ptr tsub22
; ---------------------------------------------------------------------------
byte_45		db 0			; DATA XREF: tsub22+Aw	tsub22+35r ...
byte_46		db 0			; DATA XREF: tsub22+Ew	tsub22+3Dr ...
byte_47		db 0			; DATA XREF: tsub22+12w tsub22+7Dr ...
byte_48		db 0			; DATA XREF: tsub22+16w tsub22+85r
byte_49		db 0			; DATA XREF: tsub22+22w tsub22+AFr ...
byte_4A		db 128h	dup(0)		; DATA XREF: tsub22:tsub22_0o
					; tsub22+4Eo ...
					; --> array with 296 bytes
word_172	dw 0			; DATA XREF: isub2+2Dr	isub2:isub2_5w	...
word_174	dw 0			; DATA XREF: tsub20+4r
					; tsub20:tsub20_0w
display_start_adress db	20h, 0,	0	; DATA XREF: tsub0+17o
display_text	db '    (C) 1990 DSI    '

; unknown 4 bytes
		db  7Fh	; 
		db    0
		db    0
		db    0

; =============== S U B	R O U T	I N E =======================================


; __int16 __usercall isub0<ax>(__int8 mpu_command_value_@<al>)
isub0		proc near		; CODE XREF: tsub0+2p tsub0+Dp
		push	cx
		push	dx
		push	ax
		mov	dx, 331h
		mov	cx, 0FFFFh

isub0_0:				; CODE XREF: isub0+12j
		in	al, dx
		test	al, 40h
		jz	short isub0_1
		dec	cx
		cmp	cx, 1
		jge	short isub0_0
		pop	ax
		mov	ax, 0FFFFh
		jmp	short isub0_5
; ---------------------------------------------------------------------------
		nop

isub0_1:				; CODE XREF: isub0+Cj
		cli
		pop	ax
		out	dx, al
		mov	cx, 0FFFFh

isub0_2:				; CODE XREF: isub0+2Aj
		in	al, dx
		rol	al, 1
		jnb	short isub0_3
		dec	cx
		cmp	cx, 1
		jge	short isub0_2
		mov	ax, 0FFFFh
		jmp	short isub0_5
; ---------------------------------------------------------------------------
		nop

isub0_3:				; CODE XREF: isub0+24j
		mov	dx, 330h
		in	al, dx
		cmp	al, 0FEh ; 'þ'
		jz	short isub0_4
		mov	ax, 0FFFFh
		jmp	short isub0_5
; ---------------------------------------------------------------------------
		nop

isub0_4:				; CODE XREF: isub0+38j
		mov	ax, 0

isub0_5:				; CODE XREF: isub0+18j	isub0+2Fj ...
		sti
		pop	dx
		pop	cx
		retn
isub0		endp


; =============== S U B	R O U T	I N E =======================================


isub1		proc near
		push	cx
		push	dx
		mov	dx, 331h
		mov	cx, 65535

isub1_0:				; CODE XREF: isub1+11j
		in	al, dx
		rol	al, 1
		jnb	short isub1_1
		dec	cx
		cmp	cx, 1
		jge	short isub1_0
		mov	ax, 0FFFFh
		jmp	short isub1_2
; ---------------------------------------------------------------------------
		nop

isub1_1:				; CODE XREF: isub1+Bj
		mov	dx, 330h
		mov	ah, 0
		in	al, dx
		mov	ax, 0

isub1_2:				; CODE XREF: isub1+16j
		pop	dx
		pop	cx
		retn
isub1		endp


; =============== S U B	R O U T	I N E =======================================


; __int16 __usercall isub2<ax>(__int8 mpu_command_@<al>)
isub2		proc near		; CODE XREF: isub3+5p isub3+Ap ...
		push	cx
		push	dx
		push	ax

isub2_0:				; CODE XREF: isub2+12j	isub2+49j
		mov	dx, 331h
		mov	cx, 0FFFFh

isub2_1:				; CODE XREF: isub2+18j
		in	al, dx
		test	al, 40h
		jz	short isub2_2
		rol	al, 1
		jnb	short isub2_4
		jmp	short isub2_0
; ---------------------------------------------------------------------------
		dec	cx
		cmp	cx, 1
		jge	short isub2_1
		pop	ax
		mov	ax, 0FFFFh
		jmp	short isub2_3
; ---------------------------------------------------------------------------
		nop

isub2_2:				; CODE XREF: isub2+Cj
		mov	dx, 330h
		pop	ax
		out	dx, al
		mov	ax, 0

isub2_3:				; CODE XREF: isub2+1Ej
		pop	dx
		pop	cx
		retn
; ---------------------------------------------------------------------------

isub2_4:				; CODE XREF: isub2+10j
		push	si
		mov	si, cs:word_172
		mov	dx, 330h
		in	al, dx
		mov	cs:(byte_4A+100h)[si], al ; -->	array with 296 bytes
		inc	si
		cmp	si, 28h	; '('
		jnz	short isub2_5
		xor	si, si

isub2_5:				; CODE XREF: isub2+3Fj
		mov	cs:word_172, si
		pop	si
		jmp	short isub2_0
isub2		endp ; sp-analysis failed


; =============== S U B	R O U T	I N E =======================================


; __int16 __usercall isub3<ax>(__int8 al_@<al>,	__int8 cl_@<dl>, __int8	dh_@<dh>, __int8 dl_@<dl>)
isub3		proc near		; CODE XREF: tsub11+1Fp
		push	ax
		mov	al, cl
		or	al, 0B0h	; mpu_command_@
		call	isub2
		mov	al, 64h	; 'd'   ; mpu_command_@
		call	isub2
		mov	al, dl		; mpu_command_@
		call	isub2
		mov	al, cl
		or	al, 0B0h	; mpu_command_@
		call	isub2
		mov	al, 65h	; 'e'   ; mpu_command_@
		call	isub2
		mov	al, dh		; mpu_command_@
		call	isub2
		mov	al, cl
		or	al, 0B0h	; mpu_command_@
		call	isub2
		mov	al, 6		; mpu_command_@
		call	isub2
		pop	ax		; mpu_command_@
		call	isub2
		retn
isub3		endp


; =============== S U B	R O U T	I N E =======================================


; void __usercall isub4(__int16	segment_@<es>, __int16 offset_@<bx>, __int16 size_@<cx>)
isub4		proc near		; CODE XREF: tsub21+9p	tsub22+54p ...
		push	si
		mov	si, bx
		mov	al, 0F0h ; 'ð'  ; mpu_command_@
		call	isub2
		mov	al, 41h	; 'A'   ; mpu_command_@
		call	isub2
		mov	al, 10h		; mpu_command_@
		call	isub2
		mov	al, 16h		; mpu_command_@
		call	isub2
		mov	al, 12h		; mpu_command_@
		call	isub2
		mov	dx, 0

isub4_0:				; CODE XREF: isub4+33j
		mov	al, es:[si]	; mpu_command_@
		xor	ah, ah
		add	dx, ax
		call	isub2
		push	cx
		mov	cx, 100

isub4_1:				; CODE XREF: isub4+2Fj
		in	al, 61h		; PC/XT	PPI port B bits:
					; 0: Tmr 2 gate	ÍËÍ OR	03H=spkr ON
					; 1: Tmr 2 data	Í¼  AND	0fcH=spkr OFF
					; 3: 1=read high switches
					; 4: 0=enable RAM parity checking
					; 5: 0=enable I/O channel check
					; 6: 0=hold keyboard clock low
					; 7: 0=enable kbrd
		loop	isub4_1
		pop	cx
		inc	si
		loop	isub4_0
		mov	al, dl
		neg	al
		and	al, 7Fh		; mpu_command_@
		call	isub2
		mov	al, 0F7h ; '÷'  ; mpu_command_@
		call	isub2
		pop	si
		retn
isub4		endp


; =============== S U B	R O U T	I N E =======================================


; int __cdecl __far tsub20()
tsub20		proc far		; CODE XREF: seg000:003Cj
		push	si
		mov	ax, 0FFFFh
		mov	si, cs:word_174
		cmp	si, cs:word_172
		jz	short tsub20_1
		mov	ah, 0
		mov	al, cs:(byte_4A+100h)[si] ; -->	array with 296 bytes
		inc	si
		cmp	si, 28h	; '('
		jnz	short tsub20_0
		mov	si, 0

tsub20_0:				; CODE XREF: tsub20+1Bj
		mov	cs:word_174, si

tsub20_1:				; CODE XREF: tsub20+Ej
		pop	si
		retf
tsub20		endp


; =============== S U B	R O U T	I N E =======================================

; Attributes: bp-based frame

; int __cdecl __far tsub21(__int8 *buffer_, __int16 size_)
tsub21		proc far		; CODE XREF: seg000:003Fj

size_		= word ptr  6
buffer_		= dword	ptr  8

		push	bp
		mov	bp, sp
		les	bx, [bp+buffer_] ; segment_@ + offset_@
		mov	cx, [bp+size_]	; size_@
		call	isub4
		pop	bp
		retf
tsub21		endp


; =============== S U B	R O U T	I N E =======================================

; Attributes: bp-based frame

tsub22		proc far		; CODE XREF: seg000:0042j

arg_0		= dword	ptr  6

		push	bp
		mov	bp, sp
		pushf
		push	si
		push	di
		push	ds
		push	es
		xor	al, al
		mov	cs:byte_45, al
		mov	cs:byte_46, al
		mov	cs:byte_47, al
		mov	cs:byte_48, al
		lds	si, [bp+arg_0]
		push	cs
		pop	es		; segment_@
		mov	al, [si]	; DS is	set
		inc	si
		mov	cs:byte_49, al
		or	al, al
		jnz	short tsub22_0
		jmp	tsub22_4
; ---------------------------------------------------------------------------

tsub22_0:				; CODE XREF: tsub22+28j tsub22+BDj
		mov	di, offset byte_4A ; --> array with 296	bytes
		mov	byte ptr es:[di], 5
		inc	di
		mov	al, cs:byte_45
		mov	es:[di], al
		inc	di
		mov	al, cs:byte_46
		mov	es:[di], al
		inc	di
		mov	al, [si]
		push	ax
		mov	cx, 8
		cld
		rep movsb
		mov	bx, offset byte_4A ; offset_@
		mov	cx, 0Bh		; size_@
		call	isub4
		mov	al, cs:byte_46
		add	al, 8
		mov	cs:byte_46, al
		and	al, 80h
		jz	short tsub22_1
		xor	al, al
		mov	cs:byte_46, al
		inc	cs:byte_45

tsub22_1:				; CODE XREF: tsub22+63j
		pop	ax
		cmp	al, 2
		jnz	short tsub22_2
		mov	di, offset byte_4A ; --> array with 296	bytes
		mov	byte ptr es:[di], 8
		inc	di
		mov	al, cs:byte_47
		mov	es:[di], al
		inc	di
		mov	al, cs:byte_48
		mov	es:[di], al
		inc	di
		mov	cx, 246
		cld
		rep movsb
		mov	bx, offset byte_4A ; offset_@
		mov	cx, 249		; size_@
		call	isub4
		mov	al, cs:byte_47
		add	al, 2
		mov	cs:byte_47, al

tsub22_2:				; CODE XREF: tsub22+73j
		push	cx
		mov	cx, 60000

tsub22_3:				; CODE XREF: tsub22+ACj
		in	al, 61h		; PC/XT	PPI port B bits:
					; 0: Tmr 2 gate	ÍËÍ OR	03H=spkr ON
					; 1: Tmr 2 data	Í¼  AND	0fcH=spkr OFF
					; 3: 1=read high switches
					; 4: 0=enable RAM parity checking
					; 5: 0=enable I/O channel check
					; 6: 0=hold keyboard clock low
					; 7: 0=enable kbrd
		loop	tsub22_3
		pop	cx
		mov	al, cs:byte_49
		dec	al
		mov	cs:byte_49, al
		or	al, al
		jz	short tsub22_4
		jmp	tsub22_0
; ---------------------------------------------------------------------------

tsub22_4:				; CODE XREF: tsub22+2Aj tsub22+BBj
		pop	es
		pop	ds
		pop	di
		pop	si
		popf
		pop	bp
		retf
tsub22		endp


; =============== S U B	R O U T	I N E =======================================

; Attributes: bp-based frame

tsub19		proc far		; CODE XREF: seg000:0039j

arg_0		= word ptr  6
arg_2		= word ptr  8

		push	bp
		mov	bp, sp
		mov	cx, [bp+arg_0]
		mov	bx, [bp+arg_2]

tsub19_0:				; CODE XREF: tsub19+Fj
		mov	al, [bx]	; mpu_command_@
		call	isub2
		inc	bx
		loop	tsub19_0
		pop	bp
		retf
tsub19		endp


; =============== S U B	R O U T	I N E =======================================


tsub0		proc far		; CODE XREF: seg000:loc_0j
		mov	al, 0FFh	; mpu_command_value_@
		call	isub0
		mov	dx, 0

tsub0_0:				; CODE XREF: tsub0+9j
		dec	dx
		jnz	short tsub0_0
		mov	al, 3Fh	; '?'   ; mpu_command_value_@
		call	isub0
		push	cs		; push cs to get a far call on stack
		call	near ptr tsub2	; push cs that this gets "magical" a far call on stack
		mov	cx, 23		; sizeof(display_start_adress +	display_text)
		mov	bx, offset display_start_adress	; offset_@
		push	cs
		pop	es		; segment_@
		call	isub4
		mov	ax, 0FFF6h
		retf
tsub0		endp


; =============== S U B	R O U T	I N E =======================================


tsub1		proc far		; CODE XREF: seg000:0003j
		push	cs
		call	near ptr tsub2	; push cs, make	the next near call a real far-call seen	from stack
		retf
tsub1		endp


; =============== S U B	R O U T	I N E =======================================


tsub2		proc far		; CODE XREF: seg000:0006j tsub0+11p ...
		mov	dh, 0Fh

tsub2_0:				; CODE XREF: tsub2+26j
		mov	al, 0B0h ; '°'
		or	al, dh		; mpu_command_@
		call	isub2
		mov	al, 7Bh	; '{'   ; mpu_command_@
		call	isub2
		mov	al, 0		; mpu_command_@
		call	isub2
		mov	al, 0B0h ; '°'
		or	al, dh		; mpu_command_@
		call	isub2
		mov	al, 79h	; 'y'   ; mpu_command_@
		call	isub2
		mov	al, 0		; mpu_command_@
		call	isub2
		dec	dh
		jg	short tsub2_0
		retf
tsub2		endp


; =============== S U B	R O U T	I N E =======================================

; Attributes: bp-based frame

tsub3		proc far		; CODE XREF: seg000:0009j

arg_0		= word ptr  6
arg_2		= word ptr  8
mpu_command_@	= byte ptr  0Ch
arg_8		= byte ptr  0Eh
arg_A		= dword	ptr  10h

		push	bp
		mov	bp, sp
		mov	bx, [bp+arg_2]
		mov	al, [bp+mpu_command_@]
		mov	[bx+3],	al	; DS access?
		mov	[bx+6],	al	; DS access?
		les	bx, [bp+arg_A]
		cmp	byte ptr es:[bx+15h], 0
		jnz	short tsub3_0
		mov	al, 7Fh	; ''
		jmp	short tsub3_1
; ---------------------------------------------------------------------------

tsub3_0:				; CODE XREF: tsub3+17j
		mov	al, [bp+arg_8]

tsub3_1:				; CODE XREF: tsub3+1Bj
		mov	bx, [bp+arg_2]
		mov	[bx+4],	al	; DS access?
		push	ax
		mov	ax, [bp+arg_0]
		or	al, 90h		; mpu_command_@
		call	isub2
		mov	al, [bp+mpu_command_@] ; mpu_command_@
		call	isub2
		pop	ax		; mpu_command_@
		call	isub2
		pop	bp
		retf
tsub3		endp


; =============== S U B	R O U T	I N E =======================================

; Attributes: bp-based frame

tsub4		proc far		; CODE XREF: seg000:000Cj

arg_0		= word ptr  6
arg_2		= word ptr  8

		push	bp
		mov	bp, sp
		mov	ax, [bp+arg_0]
		or	al, 80h		; mpu_command_@
		call	isub2
		mov	bx, [bp+arg_2]
		mov	al, [bx+6]	; mpu_command_@
		call	isub2
		mov	al, 0		; mpu_command_@
		call	isub2
		pop	bp
		retf
tsub4		endp


; =============== S U B	R O U T	I N E =======================================

; Attributes: bp-based frame

tsub5		proc far		; CODE XREF: seg000:000Fj
		push	bp
		mov	bp, sp
		pop	bp
		retf
tsub5		endp


; =============== S U B	R O U T	I N E =======================================

; Attributes: bp-based frame

tsub6		proc far		; CODE XREF: seg000:0012j

arg_0		= word ptr  6
mpu_command_@	= byte ptr  0Ah

		push	bp
		mov	bp, sp
		mov	ax, [bp+arg_0]
if EQUAL_TO_ORIGINAL    
    db 25h, 0Fh, 00h ; same as "and ax,0Fh" but different encoded
else
		and	ax, 0Fh
endif    
		or	al, 0B0h	; mpu_command_@
		call	isub2
		mov	al, 7		; mpu_command_@
		call	isub2
		mov	al, [bp+mpu_command_@] ; mpu_command_@
		call	isub2
		pop	bp
		retf
tsub6		endp


; =============== S U B	R O U T	I N E =======================================

; Attributes: bp-based frame

tsub7		proc far		; CODE XREF: seg000:0015j

arg_0		= word ptr  6
mpu_command_@	= byte ptr  0Ah
arg_6		= byte ptr  0Ch

		push	bp
		mov	bp, sp
		mov	ax, [bp+arg_0]
		or	al, 0B0h	; mpu_command_@
		call	isub2
		mov	al, [bp+mpu_command_@] ; mpu_command_@
		call	isub2
		mov	al, [bp+arg_6]	; mpu_command_@
		call	isub2
		pop	bp
		retf
tsub7		endp


; =============== S U B	R O U T	I N E =======================================


tsub8		proc far		; CODE XREF: seg000:0018j
		mov	dh, 0Fh

tsub8_0:				; CODE XREF: tsub8+18j
		mov	al, 0B0h ; '°'
		or	al, dh		; mpu_command_@
		call	isub2
		mov	al, 79h	; 'y'   ; mpu_command_@
		call	isub2
		mov	al, 0		; mpu_command_@
		call	isub2
		dec	dh
		cmp	dh, 0FFh
		jnz	short tsub8_0
		retf
tsub8		endp


; =============== S U B	R O U T	I N E =======================================

; Attributes: bp-based frame

tsub9		proc far		; CODE XREF: seg000:001Bj

arg_2		= word ptr  8
arg_4		= word ptr  0Ah

		push	bp
		mov	bp, sp
		mov	ax, [bp+arg_4]
		or	al, 0E0h	; mpu_command_@
		call	isub2
		mov	ax, [bp+arg_2]
		add	ax, 2000h
		push	ax
		and	al, 7Fh		; mpu_command_@
		call	isub2
		pop	ax
		shl	ax, 1
		mov	al, ah
		and	al, 7Fh		; mpu_command_@
		call	isub2
		pop	bp
		retf
tsub9		endp


; =============== S U B	R O U T	I N E =======================================

; Attributes: bp-based frame

tsub12		proc far		; CODE XREF: seg000:0024j

arg_0		= word ptr  6
arg_4		= word ptr  0Ah

		push	bp
		mov	bp, sp
		mov	ax, [bp+arg_0]
		or	al, 0E0h	; mpu_command_@
		call	isub2
		mov	ax, [bp+arg_4]
		mov	bx, 3Ch	; '<'
		mul	bx
		push	ax
		and	al, 7Fh		; mpu_command_@
		call	isub2
		pop	ax
		shl	ax, 1
		mov	al, ah
		and	al, 7Fh		; mpu_command_@
		call	isub2
		pop	bp
		retf
tsub12		endp


; =============== S U B	R O U T	I N E =======================================

; Attributes: bp-based frame

tsub10		proc far		; CODE XREF: seg000:loc_1Ej

arg_0		= word ptr  6

		push	bp
		mov	bp, sp
		mov	ax, [bp+arg_0]
		or	al, 0B0h	; mpu_command_@
		call	isub2
		mov	al, 7Bh	; '{'   ; mpu_command_@
		call	isub2
		mov	al, 0		; mpu_command_@
		call	isub2
		pop	bp
		retf
tsub10		endp


; =============== S U B	R O U T	I N E =======================================

; Attributes: bp-based frame

tsub11		proc far		; CODE XREF: seg000:0021j

arg_0		= word ptr  6
arg_6		= dword	ptr  0Ch

		push	bp
		mov	bp, sp
		mov	ax, [bp+arg_0]
		or	al, 0C0h	; mpu_command_@
		call	isub2
		les	bx, [bp+arg_6]
		mov	al, es:[bx+44h]	; mpu_command_@
		call	isub2
		mov	cx, [bp+arg_0]
		mov	dx, 0		; dl_@ + dh_@
		mov	al, es:[bx+12h]	; al_@
		call	isub3
		mov	al, es:[bx+45h]
		cmp	al, 0
		jz	short tsub11_0
		mov	ax, [bp+arg_0]
		or	al, 0B0h	; mpu_command_@
		call	isub2
		mov	al, 7		; mpu_command_@
		call	isub2
		les	bx, [bp+arg_6]
		mov	al, es:[bx+45h]	; mpu_command_@
		call	isub2

tsub11_0:				; CODE XREF: tsub11+28j
		mov	ax, [bp+arg_0]
		or	al, 0B0h	; mpu_command_@
		call	isub2
		mov	al, 0Ah		; mpu_command_@
		call	isub2
		les	bx, [bp+arg_6]
		mov	al, es:[bx+46h]	; mpu_command_@
		call	isub2
		pop	bp
		retf
tsub11		endp


; =============== S U B	R O U T	I N E =======================================

; Attributes: bp-based frame

tsub13		proc far		; CODE XREF: seg000:loc_27j

arg_0		= word ptr  6
arg_2		= word ptr  8
arg_6		= dword	ptr  0Ch

		push	bp
		mov	bp, sp
		les	bx, [bp+arg_6]
		cmp	byte ptr es:[bx+35h], 1
		jnz	short tsub13_0
		mov	bx, [bp+arg_2]
		mov	al, [bx+22h]	; DS access?
		add	al, [bx+3]	; DS access?
		cmp	al, [bx+6]	; DS access?
		jz	short tsub13_0
		mov	bx, [bp+arg_2]
		mov	al, [bx+6]	; DS access?
		mov	dl, al
		mov	ax, [bp+arg_0]
		or	al, 80h		; mpu_command_@
		call	isub2
		mov	al, dl		; mpu_command_@
		call	isub2
		xor	al, al		; mpu_command_@
		call	isub2
		mov	bx, [bp+arg_2]
		mov	al, [bx+22h]	; DS access?
		add	al, [bx+3]	; DS access?
		mov	[bx+6],	al	; DS access?
		mov	dl, al
		mov	ax, [bp+arg_0]
		or	al, 90h		; mpu_command_@
		call	isub2
		mov	al, dl		; mpu_command_@
		call	isub2
		mov	bx, [bp+arg_2]
		mov	al, [bx+4]	; mpu_command_@, DS access?
		call	isub2

tsub13_0:				; CODE XREF: tsub13+Bj	tsub13+19j
		les	bx, [bp+arg_6]
		cmp	byte ptr es:[bx+28h], 4
		jnz	short tsub13_1
		mov	bx, [bp+arg_2]
		mov	ax, [bx+1Ch]
		push	ax
		mov	ax, [bp+arg_0]
		or	al, 0B0h	; mpu_command_@
		call	isub2
		mov	al, 1		; mpu_command_@
		call	isub2
		pop	ax		; mpu_command_@
		call	isub2
		jmp	short tsub13_2
; ---------------------------------------------------------------------------
		nop

tsub13_1:				; CODE XREF: tsub13+61j
		cmp	byte ptr es:[bx+28h], 2
		jnz	short tsub13_2
		mov	bx, [bp+arg_2]
		mov	ax, [bx+1Ch]
		push	ax
		mov	ax, [bp+arg_0]
		or	al, 0E0h	; mpu_command_@
		call	isub2
		mov	al, 0		; mpu_command_@
		call	isub2
		pop	ax		; mpu_command_@
		call	isub2

tsub13_2:				; CODE XREF: tsub13+7Bj tsub13+83j
		les	bx, [bp+arg_6]
		cmp	byte ptr es:[bx+19h], 4
		jnz	short tsub13_3
		mov	bx, [bp+arg_2]
		mov	ax, [bx+14h]
		push	ax
		mov	ax, [bp+arg_0]
		or	al, 0B0h	; mpu_command_@
		call	isub2
		mov	al, 1		; mpu_command_@
		call	isub2
		pop	ax		; mpu_command_@
		call	isub2
		jmp	short tsub13_4
; ---------------------------------------------------------------------------
		nop

tsub13_3:				; CODE XREF: tsub13+A5j
		cmp	byte ptr es:[bx+19h], 2
		jnz	short tsub13_4
		mov	bx, [bp+arg_2]
		mov	ax, [bx+14h]
		push	ax
		mov	ax, [bp+arg_0]
		or	al, 0E0h	; mpu_command_@
		call	isub2
		mov	al, 0		; mpu_command_@
		call	isub2
		pop	ax		; mpu_command_@
		call	isub2

tsub13_4:				; CODE XREF: tsub13+BFj tsub13+C7j
		pop	bp
		retf
tsub13		endp


; =============== S U B	R O U T	I N E =======================================

; Attributes: bp-based frame

tsub14		proc far		; CODE XREF: seg000:002Aj
		push	bp
		mov	bp, sp
		pop	bp
		retf
tsub14		endp


; =============== S U B	R O U T	I N E =======================================

; Attributes: bp-based frame

tsub15		proc far		; CODE XREF: seg000:002Dj
		push	bp
		mov	bp, sp
		pop	bp
		retf
tsub15		endp


; =============== S U B	R O U T	I N E =======================================

; Attributes: bp-based frame

tsub16		proc far		; CODE XREF: seg000:0030j
		push	bp
		mov	bp, sp
		pop	bp
		retf
tsub16		endp


; =============== S U B	R O U T	I N E =======================================

; Attributes: bp-based frame

; void __cdecl __far tsub17()
tsub17		proc far		; CODE XREF: seg000:0033j
		push	bp
		mov	bp, sp
		pop	bp
		retf
tsub17		endp


; =============== S U B	R O U T	I N E =======================================

; Attributes: bp-based frame

; __int16 __cdecl __far	tsub18()
tsub18		proc far		; CODE XREF: seg000:0036j
		push	bp
		mov	bp, sp
		mov	ax, 0FFh
		pop	bp
		retf
tsub18		endp

seg000		ends


		end dummy_entry_point
