	.286p
	ifndef	??version
?debug	macro
	endm
$comm	macro	name,dist,size,count
	comm	dist name:BYTE:count*size
	endm
	else
$comm	macro	name,dist,size,count
	comm	dist name[size]:BYTE:count
	endm
	endif
	?debug	S "mem.c"
	?debug	C E99298742A056D656D2E63
	?debug	C E90008A41415653A5C62635C696E636C7564655C737464696F2E68
	?debug	C E90008A41416653A5C62635C696E636C7564655C7374646C69622E+
	?debug	C 68
	?debug	C E90008A41413653A5C62635C696E636C7564655C646F732E68
	?debug	C E90008A41413653A5C62635C696E636C7564655C6D656D2E68
	?debug	C E90008A41416653A5C62635C696E636C7564655C737472696E672E+
	?debug	C 68
	?debug	C E90008A41414653A5C62635C696E636C7564655C62696F732E68
_TEXT	segment byte public 'CODE'
_TEXT	ends
DGROUP	group	_DATA,_BSS
	assume	cs:_TEXT,ds:DGROUP
_DATA	segment word public 'DATA'
d@	label	byte
d@w	label	word
_DATA	ends
_BSS	segment word public 'BSS'
b@	label	byte
b@w	label	word
_BSS	ends
_TEXT	segment byte public 'CODE'
	assume	cs:_TEXT
_convert	proc	near
	enter	2,0
	push	si
	push	di
	xor	si,si
	les	bx,dword ptr [bp+8]
	mov	byte ptr es:[bx+si],0
	inc	si
@1@50:
	mov	ax,si
	mov	bx,4
	cwd	
	idiv	bx
	or	dx,dx
	jne	short @1@122
	or	si,si
	jle	short @1@122
	les	bx,dword ptr [bp+8]
	mov	byte ptr es:[bx+si],44
	inc	si
@1@122:
	push	0
	push	10
	push	word ptr [bp+6]
	push	word ptr [bp+4]
	call	near ptr N_LMOD@
	add	al,48
	les	bx,dword ptr [bp+8]
	mov	byte ptr es:[bx+si],al
	inc	si
	push	0
	push	10
	push	word ptr [bp+6]
	push	word ptr [bp+4]
	call	near ptr N_LDIV@
	mov	word ptr [bp+4],ax
	mov	word ptr [bp+6],dx
	or	dx,dx
	jg	short @1@50
	jne	short @1@218
	cmp	word ptr [bp+4],0
	ja	short @1@50
@1@218:
	xor	di,di
	jmp	short @1@290
@1@242:
	les	bx,dword ptr [bp+8]
	mov	al,byte ptr es:[bx+di]
	mov	byte ptr [bp-1],al
	mov	ax,si
	dec	ax
	sub	ax,di
	add	bx,ax
	mov	al,byte ptr es:[bx]
	mov	bx,word ptr [bp+8]
	mov	byte ptr es:[bx+di],al
	mov	ax,si
	dec	ax
	sub	ax,di
	add	bx,ax
	mov	al,byte ptr [bp-1]
	mov	byte ptr es:[bx],al
	inc	di
@1@290:
	mov	ax,si
	dec	ax
	sub	ax,di
	cmp	ax,di
	jg	short @1@242
	pop	di
	pop	si
	leave	
	ret	
_convert	endp
	assume	cs:_TEXT
_get_os	proc	near
	enter	18,0
	push	si
	mov	byte ptr [bp-17],48
	mov	byte ptr [bp-18],0
	push	ss
	lea	ax,word ptr [bp-18]
	push	ax
	push	ss
	push	ax
	call	near ptr _intdos
	add	sp,8
	mov	al,byte ptr [bp-15]
	mov	byte ptr [bp-1],al
	mov	al,byte ptr [bp-18]
	mov	byte ptr [bp-2],al
	or	al,al
	jne	short @2@74
	mov	byte ptr [bp-2],1
@2@74:
	mov	al,byte ptr [bp-1]
	mov	ah,0
	mov	si,ax
	mov	cx,7
	mov	bx,offset @2@C278
@2@122:
	cmp	word ptr cs:[bx],ax
	je	short @2@194
	inc	bx
	inc	bx
	loop	short @2@122
	jmp	short @2@458
@2@194:
	jmp	word ptr cs:[bx+14]
@2@218:
	push	ds
	push	offset DGROUP:s@
	jmp	short @2@482
@2@242:
	cmp	byte ptr [bp-2],6
	ja	short @2@290
	push	ds
	push	offset DGROUP:s@+8
	jmp	short @2@482
@2@290:
	push	ds
	push	offset DGROUP:s@+15
	push	word ptr [bp+6]
	push	word ptr [bp+4]
	call	near ptr _strcpy
	add	sp,8
	jmp	short @2@506
@2@338:
	push	ds
	push	offset DGROUP:s@+23
	jmp	short @2@482
@2@362:
	push	ds
	push	offset DGROUP:s@+30
	jmp	short @2@482
@2@386:
	push	ds
	push	offset DGROUP:s@+37
	jmp	short @2@482
@2@410:
	push	ds
	push	offset DGROUP:s@+44
	jmp	short @2@482
@2@434:
	push	ds
	push	offset DGROUP:s@+52
	jmp	short @2@482
@2@458:
	push	ds
	push	offset DGROUP:s@+58
@2@482:
	push	word ptr [bp+6]
	push	word ptr [bp+4]
	call	near ptr _strcpy
	add	sp,8
@2@506:
	pop	si
	leave	
	ret	
_get_os	endp
@2@C278	label	word
	db	0
	db	0
	db	94
	db	0
	db	102
	db	0
	db	238
	db	0
	db	239
	db	0
	db	253
	db	0
	db	255
	db	0
	dw	@2@338
	dw	@2@434
	dw	@2@410
	dw	@2@362
	dw	@2@386
	dw	@2@218
	dw	@2@242
	assume	cs:_TEXT
ems_error	proc	near
	push	ds
	push	offset DGROUP:s@+86
	call	near ptr _puts
	pop	cx
	pop	cx
	push	1
	call	near ptr _exit
	pop	cx
	ret	
ems_error	endp
	assume	cs:_TEXT
check_ems	proc	near
	enter	28,0
	push	103
	call	near ptr _getvect
	pop	cx
	mov	word ptr [bp-4],ax
	mov	word ptr [bp-2],dx
	mov	ax,word ptr [bp-4]
	or	ax,dx
	jne	short @4@74
@4@50:
	xor	ax,ax
	jmp	@4@482
@4@74:
	push	8
	mov	ax,word ptr [bp+4]
	add	ax,17
	push	word ptr [bp+6]
	push	ax
	push	word ptr [bp-2]
	push	10
	call	near ptr _memcmp
	add	sp,10
	or	ax,ax
	je	short @4@122
	jmp	short @4@50
@4@122:
	mov	byte ptr [bp-27],65
	push	ss
	lea	ax,word ptr [bp-28]
	push	ax
	push	ss
	push	ax
	push	103
	call	near ptr _int86
	add	sp,10
	cmp	byte ptr [bp-27],0
	je	short @4@170
	call	near ptr ems_error
@4@170:
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr [bp-26]
	mov	word ptr es:[bx+7],ax
	mov	byte ptr [bp-27],70
	push	ss
	lea	ax,word ptr [bp-28]
	push	ax
	push	ss
	push	ax
	push	103
	call	near ptr _int86
	add	sp,10
	cmp	byte ptr [bp-27],0
	je	short @4@218
	call	near ptr ems_error
@4@218:
	mov	al,byte ptr [bp-28]
	mov	ah,0
	sar	ax,4
	les	bx,dword ptr [bp+4]
	mov	byte ptr es:[bx+26],al
	mov	al,byte ptr [bp-28]
	and	al,15
	mov	byte ptr es:[bx+27],al
	mov	byte ptr [bp-27],66
	push	ss
	lea	ax,word ptr [bp-28]
	push	ax
	push	ss
	push	ax
	push	103
	call	near ptr _int86
	add	sp,10
	cmp	byte ptr [bp-27],0
	je	short @4@266
	call	near ptr ems_error
@4@266:
	mov	ax,word ptr [bp-22]
	xor	dx,dx
	mov	cl,14
	call	near ptr N_LXLSH@
	les	bx,dword ptr [bp+4]
	mov	word ptr es:[bx+9],ax
	mov	word ptr es:[bx+11],dx
	mov	ax,word ptr [bp-26]
	xor	dx,dx
	mov	cl,14
	call	near ptr N_LXLSH@
	les	bx,dword ptr [bp+4]
	mov	word ptr es:[bx+13],ax
	mov	word ptr es:[bx+15],dx
	mov	ax,word ptr [bp+6]
	mov	dx,word ptr [bp+4]
	add	dx,28
	mov	word ptr [bp-12],ax
	mov	ax,word ptr [bp+4]
	add	ax,28
	mov	word ptr [bp-18],ax
	mov	byte ptr [bp-27],77
	push	ss
	lea	ax,word ptr [bp-12]
	push	ax
	push	ss
	lea	ax,word ptr [bp-28]
	push	ax
	push	ss
	push	ax
	push	103
	call	near ptr _int86x
	add	sp,14
	cmp	byte ptr [bp-27],0
	je	short @4@314
	call	near ptr ems_error
@4@314:
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr [bp-26]
	mov	word ptr es:[bx+5],ax
	cmp	byte ptr es:[bx+26],4
	jb	short @4@410
	mov	word ptr [bp-28],21506
	push	ss
	lea	ax,word ptr [bp-28]
	push	ax
	push	ss
	push	ax
	push	103
	call	near ptr _int86
	add	sp,10
	cmp	byte ptr [bp-27],0
	je	short @4@386
	call	near ptr ems_error
@4@386:
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr [bp-26]
	jmp	short @4@434
@4@410:
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr es:[bx+5]
@4@434:
	mov	word ptr es:[bx+1],ax
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr es:[bx+1]
	sub	ax,word ptr es:[bx+5]
	mov	word ptr es:[bx+3],ax
	mov	ax,1
@4@482:
	leave	
	ret	
check_ems	endp
	assume	cs:_TEXT
check_xms	proc	near
	enter	48,0
	push	di
	mov	word ptr [bp-12],0
	mov	word ptr [bp-10],0
	mov	word ptr [bp-28],17152
	push	ss
	lea	ax,word ptr [bp-28]
	push	ax
	push	ss
	push	ax
	push	47
	call	near ptr _int86
	add	sp,10
	cmp	byte ptr [bp-28],128
	je	short @5@74
	xor	ax,ax
	jmp	@5@1010
@5@74:
	mov	 ax, 7000h
	push	 ax
	popf	
	pushf	
	pop	 ax
	test	 ax, 4000h
	je	short @5@818
	test	 ax, 2000h
	je	short @5@818
	test	 ax, 1000h
	je	short @5@818
	mov	ax,ss
	mov	es,ax
	lea	ax,word ptr [bp-48]
	mov	di,ax
	.386
	xor	     ebx, ebx                        
	xor	     esi, esi
@5@434:
	mov	     eax, 0000e820h                  
	mov	     edx, 0534d4150H                       
	mov	     ecx, 20                         
	int	     15h                             
	jc	short @5@818
	cmp	     eax, 0534d4150H                       
	jne	short @5@818
	cmp		 byte ptr es:[di+10h], 1	
	jne	short @5@722
	cmp	      dword ptr es:[di], 1024*1024   
	jb	short @5@722
	add	      esi, es:[di+8]
@5@722:
	or		 ebx, ebx			 
	jne	short @5@434
	mov		 [bp-12], esi
	.8086                                                      
@5@818:
	mov	word ptr [bp-28],59393
	push	ss
	lea	ax,word ptr [bp-8]
	push	ax
	push	ss
	lea	ax,word ptr [bp-28]
	push	ax
	push	ss
	push	ax
	push	21
	call	near ptr _int86x
	add	sp,14
	test	word ptr [bp-14],1
	jne	short @5@866
	cmp	word ptr [bp-26],0
	jne	short @5@890
@5@866:
	mov	byte ptr [bp-27],136
	push	ss
	lea	ax,word ptr [bp-8]
	push	ax
	push	ss
	lea	ax,word ptr [bp-28]
	push	ax
	push	ss
	push	ax
	push	21
	call	near ptr _int86x
	add	sp,14
	mov	word ptr [bp-26],0
@5@890:
	mov	ax,word ptr [bp-28]
	xor	dx,dx
	mov	cl,10
	call	near ptr N_LXLSH@
	add	ax,0
	adc	dx,word ptr [bp-26]
	les	bx,dword ptr [bp+4]
	mov	word ptr es:[bx+5],ax
	mov	word ptr es:[bx+7],dx
	cmp	word ptr [bp-10],0
	jb	short @5@986
	ja	short @5@962
	cmp	word ptr [bp-12],0
	jbe	short @5@986
@5@962:
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr [bp-10]
	mov	dx,word ptr [bp-12]
	mov	word ptr es:[bx+5],dx
	mov	word ptr es:[bx+7],ax
@5@986:
	mov	word ptr [bp-28],17168
	push	ss
	lea	ax,word ptr [bp-8]
	push	ax
	push	ss
	lea	ax,word ptr [bp-28]
	push	ax
	push	ss
	push	ax
	push	47
	call	near ptr _int86x
	add	sp,14
	mov	ax,word ptr [bp-8]
	mov	dx,word ptr [bp-26]
	les	bx,dword ptr [bp+4]
	mov	word ptr es:[bx+1],dx
	mov	word ptr es:[bx+3],ax
	mov	ah,8
	call	dword ptr es:[bx+1]
	mov	word ptr [bp-28],ax
	mov	word ptr [bp-22],dx
	mov	ax,word ptr [bp-28]
	xor	dx,dx
	mov	cl,10
	call	near ptr N_LXLSH@
	les	bx,dword ptr [bp+4]
	mov	word ptr es:[bx+13],ax
	mov	word ptr es:[bx+15],dx
	mov	ax,word ptr [bp-22]
	xor	dx,dx
	mov	cl,10
	call	near ptr N_LXLSH@
	les	bx,dword ptr [bp+4]
	mov	word ptr es:[bx+9],ax
	mov	word ptr es:[bx+11],dx
	mov	ah,0
	call	dword ptr es:[bx+1]
	mov	word ptr [bp-28],ax
	mov	word ptr [bp-22],dx
	les	bx,dword ptr [bp+4]
	mov	al,byte ptr [bp-27]
	mov	byte ptr es:[bx+21],al
	mov	al,byte ptr [bp-28]
	mov	byte ptr es:[bx+22],al
	mov	al,byte ptr [bp-22]
	mov	byte ptr es:[bx+20],al
	mov	ax,1
@5@1010:
	pop	di
	leave	
	ret	
check_xms	endp
	assume	cs:_TEXT
get_upperlink	proc	near
	enter	16,0
	mov	word ptr [bp-16],22530
	push	ss
	lea	ax,word ptr [bp-16]
	push	ax
	push	ss
	push	ax
	call	near ptr _intdos
	add	sp,8
	mov	al,byte ptr [bp-16]
	leave	
	ret	
get_upperlink	endp
	assume	cs:_TEXT
set_upperlink	proc	near
	enter	16,0
	mov	word ptr [bp-16],22531
	mov	byte ptr [bp-13],0
	mov	al,byte ptr [bp+4]
	mov	byte ptr [bp-14],al
	push	ss
	lea	ax,word ptr [bp-16]
	push	ax
	push	ss
	push	ax
	call	near ptr _intdos
	add	sp,8
	test	word ptr [bp-2],1
	jne	short @7@74
	mov	ax,1
	jmp	short @7@146
@7@74:
	cmp	word ptr [bp-16],1
	jne	short @7@122
	xor	ax,ax
	jmp	short @7@146
@7@122:
	mov	ax,65535
@7@146:
	leave	
	ret	
set_upperlink	endp
	assume	cs:_TEXT
check_upper	proc	near
	enter	2,0
	call	near ptr get_upperlink
	mov	byte ptr [bp-1],al
	push	1
	call	near ptr set_upperlink
	pop	cx
	cmp	ax,65535
	je	short @8@170
	cmp	ax,1
	je	short @8@146
	jmp	short @8@194
@8@146:
	mov	al,byte ptr [bp-1]
	push	ax
	call	near ptr set_upperlink
	pop	cx
	mov	ax,1
	jmp	short @8@218
@8@170:
	push	ds
	push	offset DGROUP:s@+106
	call	near ptr _puts
	pop	cx
	pop	cx
	push	1
	call	near ptr _exit
	pop	cx
@8@194:
	xor	ax,ax
@8@218:
	leave	
	ret	
check_upper	endp
	assume	cs:_TEXT
check_memory	proc	near
	push	bp
	mov	bp,sp
	push	word ptr [bp+6]
	push	word ptr [bp+4]
	call	near ptr check_ems
	pop	cx
	pop	cx
	les	bx,dword ptr [bp+4]
	mov	byte ptr es:[bx],al
	push	word ptr [bp+10]
	push	word ptr [bp+8]
	call	near ptr check_xms
	pop	cx
	pop	cx
	les	bx,dword ptr [bp+8]
	mov	byte ptr es:[bx],al
	pop	bp
	ret	
check_memory	endp
	assume	cs:_TEXT
_convmemfree	proc	near
	enter	16,0
	mov	word ptr [bp-16],0
	mov	word ptr [bp-14],0
	mov	ah,82
	int	33
	mov	ax,bx
	dec	ax
	dec	ax
	mov	word ptr [bp-12],ax
	mov	word ptr [bp-10],es
	les	bx,dword ptr [bp-12]
	mov	ax,word ptr es:[bx]
	mov	word ptr [bp-4],0
	mov	word ptr [bp-2],ax
	mov	dx,word ptr [bp-4]
	mov	word ptr [bp-8],dx
	mov	word ptr [bp-6],ax
@10@50:
	cmp	word ptr [bp-6],40960
	jae	short @10@146
	les	bx,dword ptr [bp-8]
	cmp	word ptr es:[bx+1],0
	je	short @10@122
	push	8
	push	word ptr [bp+6]
	push	word ptr [bp+4]
	mov	ax,word ptr [bp-8]
	add	ax,8
	push	word ptr [bp-6]
	push	ax
	call	near ptr _strncmp
	add	sp,10
	or	ax,ax
	jne	short @10@146
@10@122:
	les	bx,dword ptr [bp-8]
	mov	ax,word ptr es:[bx+3]
	xor	dx,dx
	add	ax,1
	adc	dx,0
	mov	cl,4
	call	near ptr N_LXLSH@
	add	word ptr [bp-16],ax
	adc	word ptr [bp-14],dx
@10@146:
	les	bx,dword ptr [bp-8]
	cmp	byte ptr es:[bx],90
	je	short @10@218
	les	bx,dword ptr [bp-8]
	mov	ax,word ptr [bp-6]
	add	ax,word ptr es:[bx+3]
	inc	ax
	mov	word ptr [bp-8],0
	mov	word ptr [bp-6],ax
	jmp	short @10@50
@10@218:
	mov	dx,word ptr [bp-14]
	mov	ax,word ptr [bp-16]
	leave	
	ret	
_convmemfree	endp
	assume	cs:_TEXT
is_psp	proc	near
	push	bp
	mov	bp,sp
	mov	ax,word ptr [bp+6]
	inc	ax
	mov	bx,word ptr [bp+4]
	mov	es,ax
	cmp	word ptr es:[bx],8397
	jne	short @11@74
	mov	ax,1
	jmp	short @11@98
@11@74:
	xor	ax,ax
@11@98:
	pop	bp
	ret	
is_psp	endp
	assume	cs:_TEXT
env_seg	proc	near
	push	bp
	mov	bp,sp
	push	si
	mov	ax,word ptr [bp+6]
	inc	ax
	mov	es,ax
	mov	si,word ptr es:[44]
	mov	ax,si
	dec	ax
	mov	dx,word ptr [bp+6]
	inc	dx
	mov	es,ax
	cmp	word ptr es:[1],dx
	jne	short @12@74
	mov	ax,si
	jmp	short @12@98
@12@74:
	xor	ax,ax
@12@98:
	pop	si
	pop	bp
	ret	
env_seg	endp
	assume	cs:_TEXT
search_vectors	proc	near
	enter	274,0
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr es:[bx+1]
	inc	ax
	xor	dx,dx
	mov	cl,4
	call	near ptr N_LXLSH@
	mov	word ptr [bp-6],ax
	mov	word ptr [bp-4],dx
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr [bp-4]
	mov	dx,word ptr [bp-6]
	add	dx,word ptr es:[bx+17]
	adc	ax,word ptr es:[bx+19]
	mov	word ptr [bp-10],dx
	mov	word ptr [bp-8],ax
	mov	word ptr [bp-2],0
	jmp	short @13@242
@13@50:
	mov	bx,word ptr [bp-2]
	shl	bx,2
	xor	ax,ax
	mov	es,ax
	mov	ax,word ptr es:[bx+2]
	mov	dx,word ptr es:[bx]
	mov	word ptr [bp-18],dx
	mov	word ptr [bp-16],ax
	mov	ax,word ptr [bp-16]
	inc	ax
	xor	dx,dx
	mov	cl,4
	call	near ptr N_LXLSH@
	add	ax,word ptr [bp-18]
	adc	dx,0
	mov	word ptr [bp-14],ax
	mov	word ptr [bp-12],dx
	mov	ax,word ptr [bp-12]
	mov	dx,word ptr [bp-14]
	cmp	ax,word ptr [bp-4]
	jb	short @13@218
	ja	short @13@122
	cmp	dx,word ptr [bp-6]
	jbe	short @13@218
@13@122:
	mov	ax,word ptr [bp-12]
	mov	dx,word ptr [bp-14]
	cmp	ax,word ptr [bp-8]
	ja	short @13@218
	jb	short @13@194
	cmp	dx,word ptr [bp-10]
	jae	short @13@218
@13@194:
	les	bx,dword ptr [bp+4]
	mov	al,byte ptr es:[bx+21]
	inc	byte ptr es:[bx+21]
	mov	ah,0
	lea	dx,word ptr [bp-274]
	add	ax,dx
	mov	dl,byte ptr [bp-2]
	mov	bx,ax
	mov	byte ptr ss:[bx],dl
@13@218:
	inc	word ptr [bp-2]
@13@242:
	cmp	word ptr [bp-2],256
	jb	short @13@50
	les	bx,dword ptr [bp+4]
	mov	al,byte ptr es:[bx+21]
	mov	ah,0
	push	ax
	call	near ptr _malloc
	pop	cx
	les	bx,dword ptr [bp+4]
	mov	word ptr es:[bx+22],ax
	mov	word ptr es:[bx+24],dx
	mov	al,byte ptr es:[bx+21]
	mov	ah,0
	push	ax
	push	ss
	lea	ax,word ptr [bp-274]
	push	ax
	push	word ptr es:[bx+24]
	push	word ptr es:[bx+22]
	call	near ptr _memcpy
	add	sp,10
	leave	
	ret	
search_vectors	endp
	assume	cs:_TEXT
search_sd	proc	near
	enter	4,0
	push	si
	push	di
	mov	ax,word ptr [bp+6]
	inc	ax
	mov	word ptr [bp-4],0
	mov	word ptr [bp-2],ax
	mov	di,word ptr [bp+6]
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr [bp+6]
	add	ax,word ptr es:[bx+3]
	mov	si,ax
	jmp	@14@362
@14@50:
	push	30
	call	near ptr _malloc
	pop	cx
	les	bx,dword ptr [bp+8]
	mov	word ptr es:[bx+26],ax
	mov	word ptr es:[bx+28],dx
	mov	ax,word ptr es:[bx+28]
	mov	dx,word ptr es:[bx+26]
	mov	word ptr [bp+8],dx
	mov	word ptr [bp+10],ax
	push	30
	push	0
	push	ax
	push	word ptr [bp+8]
	call	near ptr _memset
	add	sp,8
	les	bx,dword ptr [bp-4]
	mov	ax,word ptr es:[bx+1]
	les	bx,dword ptr [bp+8]
	mov	word ptr es:[bx+1],ax
	les	bx,dword ptr [bp-4]
	mov	ax,word ptr es:[bx+3]
	xor	dx,dx
	mov	cl,4
	call	near ptr N_LXLSH@
	les	bx,dword ptr [bp+8]
	mov	word ptr es:[bx+17],ax
	mov	word ptr es:[bx+19],dx
	les	bx,dword ptr [bp-4]
	mov	al,byte ptr es:[bx]
	mov	ah,0
	sub	ax,66
	mov	bx,ax
	cmp	bx,22
	ja	short @14@290
	shl	bx,1
	jmp	word ptr cs:@14@C508[bx]
@14@146:
	les	bx,dword ptr [bp+8]
	mov	byte ptr es:[bx+7],32
	push	8
	mov	ax,word ptr [bp-4]
	add	ax,8
	push	word ptr [bp-2]
	push	ax
	mov	ax,word ptr [bp+8]
	add	ax,8
	push	word ptr [bp+10]
	push	ax
	call	near ptr _strncpy
	add	sp,10
	mov	ax,word ptr [bp+8]
	add	ax,7
	push	word ptr [bp+10]
	push	ax
	call	near ptr _strupr
	pop	cx
	pop	cx
	les	bx,dword ptr [bp+8]
	mov	byte ptr es:[bx],4
	jmp	short @14@338
@14@170:
	push	ds
	push	offset DGROUP:s@+129
	jmp	short @14@314
@14@194:
	push	ds
	push	offset DGROUP:s@+136
	jmp	short @14@314
@14@218:
	push	ds
	push	offset DGROUP:s@+142
	jmp	short @14@314
@14@242:
	push	ds
	push	offset DGROUP:s@+151
	jmp	short @14@314
@14@266:
	push	ds
	push	offset DGROUP:s@+160
	jmp	short @14@314
@14@290:
	push	ds
	push	offset DGROUP:s@+168
@14@314:
	mov	ax,word ptr [bp+8]
	add	ax,7
	push	word ptr [bp+10]
	push	ax
	call	near ptr _strcpy
	add	sp,8
	les	bx,dword ptr [bp+8]
	mov	byte ptr es:[bx],6
@14@338:
	les	bx,dword ptr [bp-4]
	mov	ax,word ptr es:[bx+1]
	add	ax,word ptr es:[bx+3]
	mov	word ptr [bp-4],0
	mov	word ptr [bp-2],ax
@14@362:
	cmp	word ptr [bp-2],di
	jbe	short @14@410
	cmp	word ptr [bp-2],si
	jae	@@0
	jmp	@14@50
@@0:
@14@410:
	mov	dx,word ptr [bp+10]
	mov	ax,word ptr [bp+8]
	pop	di
	pop	si
	leave	
	ret	
search_sd	endp
@14@C508	label	word
	dw	@14@218
	dw	@14@218
	dw	@14@146
	dw	@14@290
	dw	@14@170
	dw	@14@290
	dw	@14@290
	dw	@14@146
	dw	@14@290
	dw	@14@290
	dw	@14@242
	dw	@14@290
	dw	@14@290
	dw	@14@290
	dw	@14@290
	dw	@14@290
	dw	@14@290
	dw	@14@266
	dw	@14@290
	dw	@14@290
	dw	@14@290
	dw	@14@290
	dw	@14@194
	assume	cs:_TEXT
_check_name	proc	near
	push	bp
	mov	bp,sp
	push	si
	xor	si,si
	jmp	short @15@122
@15@50:
	les	bx,dword ptr [bp+4]
	cmp	byte ptr es:[bx+si],32
	jae	short @15@98
	mov	byte ptr es:[bx+si],0
	jmp	short @15@146
@15@98:
	inc	si
@15@122:
	les	bx,dword ptr [bp+4]
	cmp	byte ptr es:[bx+si],0
	jne	short @15@50
@15@146:
	pop	si
	pop	bp
	ret	
_check_name	endp
	assume	cs:_TEXT
register_mcb	proc	near
	push	bp
	mov	bp,sp
	push	30
	push	0
	push	word ptr [bp+10]
	push	word ptr [bp+8]
	call	near ptr _memset
	add	sp,8
	les	bx,dword ptr [bp+8]
	mov	ax,word ptr [bp+6]
	mov	word ptr es:[bx+1],ax
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr es:[bx+1]
	les	bx,dword ptr [bp+8]
	mov	word ptr es:[bx+3],ax
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr es:[bx+3]
	xor	dx,dx
	mov	cl,4
	call	near ptr N_LXLSH@
	les	bx,dword ptr [bp+8]
	mov	word ptr es:[bx+17],ax
	mov	word ptr es:[bx+19],dx
	cmp	word ptr es:[bx+1],40959
	jbe	@@1
	jmp	@16@314
@@1:
	push	word ptr [bp+6]
	push	word ptr [bp+4]
	call	near ptr is_psp
	pop	cx
	pop	cx
	or	ax,ax
	je	short @16@98
	push	8
	mov	ax,word ptr [bp+4]
	add	ax,8
	push	word ptr [bp+6]
	push	ax
	mov	ax,word ptr [bp+8]
	add	ax,7
	push	word ptr [bp+10]
	push	ax
	call	near ptr _strncpy
	add	sp,10
	mov	ax,word ptr [bp+8]
	add	ax,7
	push	word ptr [bp+10]
	push	ax
	call	near ptr _check_name
	pop	cx
	pop	cx
	mov	ax,word ptr [bp+8]
	add	ax,7
	push	word ptr [bp+10]
	push	ax
	call	near ptr _strupr
	pop	cx
	pop	cx
	push	word ptr [bp+6]
	push	word ptr [bp+4]
	call	near ptr env_seg
	pop	cx
	pop	cx
	les	bx,dword ptr [bp+8]
	mov	word ptr es:[bx+5],ax
	mov	byte ptr es:[bx],3
@16@98:
	les	bx,dword ptr [bp+4]
	cmp	word ptr es:[bx+1],0
	jne	short @16@146
@16@122:
	les	bx,dword ptr [bp+8]
	mov	byte ptr es:[bx],7
	jmp	@16@554
@16@146:
	les	bx,dword ptr [bp+4]
	cmp	word ptr es:[bx+1],8
	jbe	@@2
	jmp	@16@554
@@2:
	push	ds
	push	offset DGROUP:s@+4
	mov	ax,word ptr [bp+8]
	add	ax,7
	push	word ptr [bp+10]
	push	ax
	call	near ptr _strcpy
	add	sp,8
	push	2
	push	ds
	push	offset DGROUP:s@+176
	mov	ax,word ptr [bp+4]
	add	ax,8
	push	word ptr [bp+6]
	push	ax
	call	near ptr _strncmp
	add	sp,10
	or	ax,ax
	jne	short @16@218
	les	bx,dword ptr [bp+8]
	mov	byte ptr es:[bx],2
	push	word ptr [bp+10]
	push	bx
	push	word ptr [bp+6]
	push	word ptr [bp+4]
	call	near ptr search_sd
	add	sp,8
	mov	word ptr [bp+8],ax
	mov	word ptr [bp+10],dx
	jmp	@16@554
@16@218:
	push	2
	push	ds
	push	offset DGROUP:s@+179
	mov	ax,word ptr [bp+4]
	add	ax,8
	push	word ptr [bp+6]
	push	ax
	call	near ptr _strncmp
	add	sp,10
	or	ax,ax
	jne	short @16@266
	les	bx,dword ptr [bp+8]
	mov	byte ptr es:[bx],1
	jmp	@16@554
@16@266:
	les	bx,dword ptr [bp+8]
	mov	byte ptr es:[bx],1
	jmp	@16@554
@16@314:
	les	bx,dword ptr [bp+4]
	cmp	word ptr es:[bx+1],0
	jne	short @16@362
	jmp	@16@122
@16@362:
	les	bx,dword ptr [bp+4]
	cmp	word ptr es:[bx+1],8
	ja	short @16@506
	push	ds
	push	offset DGROUP:s@+4
	mov	ax,word ptr [bp+8]
	add	ax,7
	push	word ptr [bp+10]
	push	ax
	call	near ptr _strcpy
	add	sp,8
	push	2
	push	ds
	push	offset DGROUP:s@+176
	mov	ax,word ptr [bp+4]
	add	ax,8
	push	word ptr [bp+6]
	push	ax
	call	near ptr _strncmp
	add	sp,10
	or	ax,ax
	jne	short @16@434
	les	bx,dword ptr [bp+8]
	mov	byte ptr es:[bx],2
	push	word ptr [bp+10]
	push	bx
	push	word ptr [bp+6]
	push	word ptr [bp+4]
	call	near ptr search_sd
	add	sp,8
	jmp	short @16@554
@16@434:
	push	2
	push	ds
	push	offset DGROUP:s@+179
	mov	ax,word ptr [bp+4]
	add	ax,8
	push	word ptr [bp+6]
	push	ax
	call	near ptr _strncmp
	add	sp,10
	or	ax,ax
	jne	short @16@554
	les	bx,dword ptr [bp+8]
	mov	byte ptr es:[bx],1
	jmp	short @16@554
@16@506:
	les	bx,dword ptr [bp+4]
	cmp	word ptr es:[bx+1],8
	jbe	short @16@554
	push	word ptr [bp+6]
	push	bx
	call	near ptr env_seg
	pop	cx
	pop	cx
	les	bx,dword ptr [bp+8]
	mov	word ptr es:[bx+5],ax
	mov	byte ptr es:[bx],3
	push	8
	mov	ax,word ptr [bp+4]
	add	ax,8
	push	word ptr [bp+6]
	push	ax
	mov	ax,word ptr [bp+8]
	add	ax,7
	push	word ptr [bp+10]
	push	ax
	call	near ptr _strncpy
	add	sp,10
	mov	ax,word ptr [bp+8]
	add	ax,7
	push	word ptr [bp+10]
	push	ax
	call	near ptr _strupr
	pop	cx
	pop	cx
@16@554:
	mov	dx,word ptr [bp+10]
	mov	ax,word ptr [bp+8]
	pop	bp
	ret	
register_mcb	endp
_TEXT	ends
_DATA	segment word public 'DATA'
	db	0
	db	0
_DATA	ends
_TEXT	segment byte public 'CODE'
	assume	cs:_TEXT
make_mcb_list	proc	near
	enter	38,0
	push	si
	push	di
	mov	ax,word ptr [bp+6]
	mov	dx,word ptr [bp+4]
	mov	word ptr [bp-22],dx
	mov	word ptr [bp-20],ax
	cmp	word ptr DGROUP:d@w+0,0
	je	@@3
	jmp	@17@1370
@@3:
	mov	word ptr DGROUP:d@w+0,1
	call	near ptr check_upper
	les	bx,dword ptr [bp+8]
	mov	byte ptr es:[bx],al
	mov	byte ptr [bp-37],82
	push	ss
	lea	ax,word ptr [bp-8]
	push	ax
	push	ss
	lea	ax,word ptr [bp-38]
	push	ax
	push	ss
	push	ax
	call	near ptr _intdosx
	add	sp,12
	les	bx,dword ptr [bp+8]
	cmp	byte ptr es:[bx],0
	je	short @17@98
	call	near ptr get_upperlink
	mov	byte ptr [bp-13],al
	push	1
	call	near ptr set_upperlink
	pop	cx
@17@98:
	mov	bx,word ptr [bp-36]
	dec	bx
	dec	bx
	mov	es,word ptr [bp-8]
	mov	ax,word ptr es:[bx]
	mov	word ptr [bp-12],0
	mov	word ptr [bp-10],ax
	jmp	short @17@146
@17@122:
	push	word ptr [bp+6]
	push	word ptr [bp+4]
	push	word ptr [bp-10]
	push	word ptr [bp-12]
	call	near ptr register_mcb
	add	sp,8
	mov	word ptr [bp+4],ax
	mov	word ptr [bp+6],dx
	les	bx,dword ptr [bp-12]
	mov	ax,word ptr [bp-10]
	add	ax,word ptr es:[bx+3]
	inc	ax
	mov	word ptr [bp-12],0
	mov	word ptr [bp-10],ax
	push	30
	call	near ptr _malloc
	pop	cx
	les	bx,dword ptr [bp+4]
	mov	word ptr es:[bx+26],ax
	mov	word ptr es:[bx+28],dx
	mov	ax,word ptr es:[bx+28]
	mov	dx,word ptr es:[bx+26]
	mov	word ptr [bp+4],dx
	mov	word ptr [bp+6],ax
@17@146:
	les	bx,dword ptr [bp-12]
	cmp	byte ptr es:[bx],90
	jne	short @17@122
	push	word ptr [bp+6]
	push	word ptr [bp+4]
	push	word ptr [bp-10]
	push	bx
	call	near ptr register_mcb
	add	sp,8
	mov	word ptr [bp+4],ax
	mov	word ptr [bp+6],dx
	les	bx,dword ptr [bp-12]
	mov	ax,word ptr [bp-10]
	add	ax,word ptr es:[bx+3]
	inc	ax
	mov	word ptr [bp-12],0
	mov	word ptr [bp-10],ax
	les	bx,dword ptr [bp+8]
	cmp	byte ptr es:[bx],0
	jne	@@4
	jmp	@17@602
@@4:
	call	near ptr _biosmemory
	shl	ax,6
	dec	ax
	mov	si,ax
	mov	ax,word ptr [bp-20]
	mov	dx,word ptr [bp-22]
	jmp	short @17@242
@17@218:
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr es:[bx+28]
	mov	dx,word ptr es:[bx+26]
@17@242:
	mov	word ptr [bp+4],dx
	mov	word ptr [bp+6],ax
	mov	ax,word ptr [bp+4]
	or	ax,word ptr [bp+6]
	je	short @17@314
	les	bx,dword ptr [bp+4]
	cmp	word ptr es:[bx+1],si
	jne	short @17@218
@17@314:
	mov	ax,word ptr [bp+4]
	or	ax,word ptr [bp+6]
	jne	short @17@362
	push	ds
	push	offset DGROUP:s@+182
	call	near ptr _printf
	pop	cx
	pop	cx
	push	1
	call	near ptr _exit
	pop	cx
	jmp	short @17@530
@17@362:
	jmp	short @17@530
@17@386:
	les	bx,dword ptr [bp+4]
	cmp	byte ptr es:[bx],7
	jne	short @17@506
	mov	ax,word ptr es:[bx+19]
	mov	dx,word ptr es:[bx+17]
	les	bx,dword ptr [bp+8]
	add	word ptr es:[bx+5],dx
	adc	word ptr es:[bx+7],ax
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr es:[bx+19]
	mov	dx,word ptr es:[bx+17]
	les	bx,dword ptr [bp+8]
	cmp	ax,word ptr es:[bx+11]
	jb	short @17@506
	ja	short @17@482
	cmp	dx,word ptr es:[bx+9]
	jbe	short @17@506
@17@482:
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr es:[bx+19]
	mov	dx,word ptr es:[bx+17]
	les	bx,dword ptr [bp+8]
	mov	word ptr es:[bx+9],dx
	mov	word ptr es:[bx+11],ax
@17@506:
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr es:[bx+19]
	mov	dx,word ptr es:[bx+17]
	add	dx,16
	adc	ax,0
	les	bx,dword ptr [bp+8]
	add	word ptr es:[bx+1],dx
	adc	word ptr es:[bx+3],ax
@17@530:
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr es:[bx+28]
	mov	dx,word ptr es:[bx+26]
	mov	word ptr [bp+4],dx
	mov	word ptr [bp+6],ax
	mov	ax,word ptr [bp+4]
	or	ax,word ptr [bp+6]
	je	@@5
	jmp	@17@386
@@5:
	mov	al,byte ptr [bp-13]
	push	ax
	call	near ptr set_upperlink
	pop	cx
@17@602:
	mov	ax,word ptr [bp-20]
	mov	dx,word ptr [bp-22]
	jmp	@17@962
@17@626:
	les	bx,dword ptr [bp+4]
	cmp	byte ptr es:[bx],3
	jne	short @17@890
	mov	ax,word ptr [bp-20]
	mov	dx,word ptr [bp-22]
	jmp	short @17@842
@17@674:
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr es:[bx+1]
	les	bx,dword ptr [bp-18]
	cmp	ax,word ptr es:[bx+1]
	je	short @17@818
	push	es
	les	di,dword ptr [bp+4]
	mov	ax,word ptr es:[di+1]
	inc	ax
	pop	es
	cmp	word ptr es:[bx+3],ax
	jne	short @17@818
	mov	ax,word ptr [bp+4]
	add	ax,7
	push	word ptr [bp+6]
	push	ax
	mov	ax,word ptr [bp-18]
	add	ax,7
	push	word ptr [bp-16]
	push	ax
	call	near ptr _strcpy
	add	sp,8
	les	bx,dword ptr [bp+4]
	push	es
	les	di,dword ptr [bp-18]
	mov	ax,word ptr es:[di+1]
	inc	ax
	pop	es
	cmp	word ptr es:[bx+5],ax
	jne	short @17@770
	mov	al,5
	jmp	short @17@794
@17@770:
	mov	al,6
@17@794:
	les	bx,dword ptr [bp-18]
	mov	byte ptr es:[bx],al
@17@818:
	les	bx,dword ptr [bp-18]
	mov	ax,word ptr es:[bx+28]
	mov	dx,word ptr es:[bx+26]
@17@842:
	mov	word ptr [bp-18],dx
	mov	word ptr [bp-16],ax
	mov	ax,word ptr [bp-18]
	or	ax,word ptr [bp-16]
	jne	short @17@674
@17@890:
	les	bx,dword ptr [bp+4]
	cmp	byte ptr es:[bx],2
	je	short @17@938
	push	word ptr [bp+6]
	push	bx
	call	near ptr search_vectors
	pop	cx
	pop	cx
@17@938:
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr es:[bx+28]
	mov	dx,word ptr es:[bx+26]
@17@962:
	mov	word ptr [bp+4],dx
	mov	word ptr [bp+6],ax
	mov	ax,word ptr [bp+4]
	or	ax,word ptr [bp+6]
	je	@@6
	jmp	@17@626
@@6:
	mov	ax,word ptr [bp-20]
	mov	dx,word ptr [bp-22]
	jmp	@17@1322
@17@1034:
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr es:[bx+1]
	inc	ax
	cmp	ax,word ptr DGROUP:__psp
	je	@@7
	jmp	@17@1298
@@7:
	mov	ax,word ptr es:[bx+19]
	mov	dx,word ptr es:[bx+17]
	add	dx,16
	adc	ax,0
	les	bx,dword ptr es:[bx+26]
	add	word ptr es:[bx+17],dx
	adc	word ptr es:[bx+19],ax
	les	bx,dword ptr [bp+4]
	mov	byte ptr es:[bx],8
	mov	ax,word ptr [bp-20]
	mov	dx,word ptr [bp-22]
	mov	word ptr [bp-18],dx
	mov	word ptr [bp-16],ax
	jmp	short @17@1250
@17@1082:
	les	bx,dword ptr [bp-18]
	mov	ax,word ptr es:[bx+1]
	inc	ax
	les	bx,dword ptr [bp+4]
	cmp	ax,word ptr es:[bx+5]
	jne	short @17@1226
	les	bx,dword ptr [bp-18]
	mov	ax,word ptr es:[bx+28]
	mov	dx,word ptr es:[bx+26]
	cmp	ax,word ptr [bp+6]
	jne	short @17@1178
	cmp	dx,word ptr [bp+4]
	jne	short @17@1178
	mov	byte ptr es:[bx],8
	jmp	short @17@1370
@17@1178:
	les	bx,dword ptr [bp-18]
	mov	byte ptr es:[bx],7
	mov	byte ptr es:[bx+7],0
	jmp	short @17@1370
@17@1226:
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr es:[bx+28]
	mov	dx,word ptr es:[bx+26]
	mov	word ptr [bp+4],dx
	mov	word ptr [bp+6],ax
@17@1250:
	mov	ax,word ptr [bp+4]
	or	ax,word ptr [bp+6]
	jne	short @17@1082
	jmp	short @17@1370
@17@1298:
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr es:[bx+28]
	mov	dx,word ptr es:[bx+26]
@17@1322:
	mov	word ptr [bp+4],dx
	mov	word ptr [bp+6],ax
	mov	ax,word ptr [bp+4]
	or	ax,word ptr [bp+6]
	je	@@8
	jmp	@17@1034
@@8:
@17@1370:
	pop	di
	pop	si
	leave	
	ret	
make_mcb_list	endp
	assume	cs:_TEXT
make_dev_list	proc	near
	enter	40,0
	push	si
	mov	ax,word ptr [bp+10]
	mov	dx,word ptr [bp+8]
	mov	word ptr [bp-20],dx
	mov	word ptr [bp-18],ax
	mov	ax,word ptr [bp+6]
	mov	dx,word ptr [bp+4]
	mov	word ptr [bp-24],dx
	mov	word ptr [bp-22],ax
	push	word ptr [bp+14]
	push	word ptr [bp+12]
	push	word ptr [bp+6]
	push	word ptr [bp+4]
	call	near ptr make_mcb_list
	add	sp,8
	mov	byte ptr [bp-39],82
	push	ss
	lea	ax,word ptr [bp-8]
	push	ax
	push	ss
	lea	ax,word ptr [bp-40]
	push	ax
	push	ss
	push	ax
	call	near ptr _intdosx
	add	sp,12
	mov	ax,word ptr [bp-38]
	add	ax,34
	mov	dx,word ptr [bp-8]
	mov	word ptr [bp-12],ax
	mov	word ptr [bp-10],dx
	jmp	@18@98
@18@50:
	push	49
	push	0
	push	word ptr [bp+10]
	push	word ptr [bp+8]
	call	near ptr _memset
	add	sp,8
	les	bx,dword ptr [bp+8]
	mov	ax,word ptr [bp-10]
	mov	dx,word ptr [bp-12]
	mov	word ptr es:[bx],dx
	mov	word ptr es:[bx+2],ax
	les	bx,dword ptr [bp-12]
	mov	ax,word ptr es:[bx+4]
	les	bx,dword ptr [bp+8]
	mov	word ptr es:[bx+22],ax
	push	8
	mov	ax,word ptr [bp-12]
	add	ax,10
	push	word ptr [bp-10]
	push	ax
	mov	ax,word ptr [bp+8]
	add	ax,4
	push	word ptr [bp+10]
	push	ax
	call	near ptr _strncpy
	add	sp,10
	mov	ax,word ptr [bp+8]
	add	ax,4
	push	word ptr [bp+10]
	push	ax
	call	near ptr _check_name
	pop	cx
	pop	cx
	mov	ax,word ptr [bp+8]
	add	ax,4
	push	word ptr [bp+10]
	push	ax
	call	near ptr _strupr
	pop	cx
	pop	cx
	les	bx,dword ptr [bp-12]
	mov	ax,word ptr es:[bx+2]
	mov	dx,word ptr es:[bx]
	mov	word ptr [bp-12],dx
	mov	word ptr [bp-10],ax
	cmp	word ptr [bp-12],65535
	je	short @18@122
	push	49
	call	near ptr _malloc
	pop	cx
	les	bx,dword ptr [bp+8]
	mov	word ptr es:[bx+45],ax
	mov	word ptr es:[bx+47],dx
	mov	ax,word ptr es:[bx+47]
	mov	dx,word ptr es:[bx+45]
	mov	word ptr [bp+8],dx
	mov	word ptr [bp+10],ax
@18@98:
	cmp	word ptr [bp-12],65535
	je	@@9
	jmp	@18@50
@@9:
@18@122:
	mov	ax,word ptr [bp-18]
	mov	dx,word ptr [bp-20]
	jmp	short @18@386
@18@146:
	mov	ax,word ptr [bp-22]
	mov	dx,word ptr [bp-24]
	jmp	short @18@314
@18@170:
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr es:[bx+1]
	les	bx,dword ptr [bp+8]
	cmp	ax,word ptr es:[bx+2]
	jne	short @18@290
	les	bx,dword ptr [bp+4]
	cmp	byte ptr es:[bx+7],32
	jne	short @18@242
	mov	dx,word ptr [bp+6]
	mov	ax,word ptr [bp+4]
	add	ax,8
	jmp	short @18@266
@18@242:
	mov	dx,word ptr [bp+6]
	mov	ax,word ptr [bp+4]
	add	ax,7
@18@266:
	push	dx
	push	ax
	mov	ax,word ptr [bp+8]
	add	ax,13
	push	word ptr [bp+10]
	push	ax
	call	near ptr _strcpy
	add	sp,8
	push	1
	call	near ptr _exit
	pop	cx
@18@290:
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr es:[bx+28]
	mov	dx,word ptr es:[bx+26]
@18@314:
	mov	word ptr [bp+4],dx
	mov	word ptr [bp+6],ax
	mov	ax,word ptr [bp+4]
	or	ax,word ptr [bp+6]
	jne	short @18@170
	les	bx,dword ptr [bp+8]
	mov	ax,word ptr es:[bx+47]
	mov	dx,word ptr es:[bx+45]
@18@386:
	mov	word ptr [bp+8],dx
	mov	word ptr [bp+10],ax
	mov	ax,word ptr [bp+8]
	or	ax,word ptr [bp+10]
	je	@@10
	jmp	@18@146
@@10:
	mov	byte ptr [bp-39],82
	push	ss
	lea	ax,word ptr [bp-8]
	push	ax
	push	ss
	lea	ax,word ptr [bp-40]
	push	ax
	push	ss
	push	ax
	call	near ptr _intdosx
	add	sp,12
	mov	es,word ptr [bp-8]
	mov	bx,word ptr [bp-38]
	mov	ax,word ptr es:[bx+2]
	mov	dx,word ptr es:[bx]
	jmp	short @18@650
@18@458:
	mov	ax,word ptr [bp-18]
	mov	dx,word ptr [bp-20]
	jmp	short @18@578
@18@482:
	les	bx,dword ptr [bp+8]
	mov	ax,word ptr es:[bx+2]
	mov	dx,word ptr es:[bx]
	les	bx,dword ptr [bp-16]
	cmp	ax,word ptr es:[bx+21]
	jne	short @18@554
	cmp	dx,word ptr es:[bx+19]
	jne	short @18@554
	les	bx,dword ptr [bp+8]
	mov	al,byte ptr es:[bx+24]
	inc	byte ptr es:[bx+24]
	mov	ah,0
	add	bx,ax
	push	es
	les	si,dword ptr [bp-16]
	mov	al,byte ptr es:[si]
	add	al,65
	pop	es
	mov	byte ptr es:[bx+25],al
	jmp	short @18@626
@18@554:
	les	bx,dword ptr [bp+8]
	mov	ax,word ptr es:[bx+47]
	mov	dx,word ptr es:[bx+45]
@18@578:
	mov	word ptr [bp+8],dx
	mov	word ptr [bp+10],ax
	mov	ax,word ptr [bp+8]
	or	ax,word ptr [bp+10]
	jne	short @18@482
@18@626:
	les	bx,dword ptr [bp-16]
	mov	ax,word ptr es:[bx+27]
	mov	dx,word ptr es:[bx+25]
@18@650:
	mov	word ptr [bp-16],dx
	mov	word ptr [bp-14],ax
	cmp	word ptr [bp-16],65535
	jne	short @18@458
	mov	ax,word ptr [bp-18]
	mov	dx,word ptr [bp-20]
	jmp	@18@890
@18@722:
	les	bx,dword ptr [bp+8]
	test	word ptr es:[bx+22],32768
	jne	short @18@770
	mov	byte ptr es:[bx+4],0
@18@770:
	les	bx,dword ptr [bp+8]
	cmp	byte ptr es:[bx+24],0
	je	short @18@866
	cmp	byte ptr es:[bx+24],1
	jne	short @18@842
	mov	al,byte ptr es:[bx+25]
	mov	ah,0
	push	ax
	push	ds
	push	offset DGROUP:s@+198
	mov	ax,word ptr [bp+8]
	add	ax,4
	push	word ptr [bp+10]
	push	ax
	call	near ptr _sprintf
	add	sp,10
	jmp	short @18@866
@18@842:
	les	bx,dword ptr [bp+8]
	mov	al,byte ptr es:[bx+24]
	mov	ah,0
	add	bx,ax
	mov	al,byte ptr es:[bx+24]
	mov	ah,0
	push	ax
	mov	bx,word ptr [bp+8]
	mov	al,byte ptr es:[bx+25]
	mov	ah,0
	push	ax
	push	ds
	push	offset DGROUP:s@+202
	mov	ax,word ptr [bp+8]
	add	ax,4
	push	word ptr [bp+10]
	push	ax
	call	near ptr _sprintf
	add	sp,12
@18@866:
	les	bx,dword ptr [bp+8]
	mov	ax,word ptr es:[bx+47]
	mov	dx,word ptr es:[bx+45]
@18@890:
	mov	word ptr [bp+8],dx
	mov	word ptr [bp+10],ax
	mov	ax,word ptr [bp+8]
	or	ax,word ptr [bp+10]
	je	@@11
	jmp	@18@722
@@11:
	pop	si
	leave	
	ret	
make_dev_list	endp
	assume	cs:_TEXT
normal_list	proc	near
	enter	188,0
	push	si
	push	di
	push	word ptr [bp+14]
	push	word ptr [bp+12]
	push	word ptr [bp+10]
	push	word ptr [bp+8]
	call	near ptr check_memory
	add	sp,8
	push	word ptr [bp+18]
	push	word ptr [bp+16]
	push	ss
	lea	ax,word ptr [bp-188]
	push	ax
	call	near ptr make_mcb_list
	add	sp,8
	push	ss
	lea	ax,word ptr [bp-46]
	push	ax
	call	near ptr _get_os
	pop	cx
	pop	cx
	call	near ptr _biosmemory
	mov	di,ax
	push	ss
	lea	ax,word ptr [bp-78]
	push	ax
	les	bx,dword ptr [bp+12]
	mov	dx,word ptr es:[bx+11]
	mov	ax,word ptr es:[bx+9]
	add	ax,512
	adc	dx,0
	mov	cl,10
	call	near ptr N_LXURSH@
	push	dx
	push	ax
	call	near ptr _convert
	add	sp,8
	push	ss
	lea	ax,word ptr [bp-110]
	push	ax
	les	bx,dword ptr [bp+12]
	mov	dx,word ptr es:[bx+7]
	mov	ax,word ptr es:[bx+5]
	add	ax,512
	adc	dx,0
	mov	cl,10
	call	near ptr N_LXURSH@
	push	dx
	push	ax
	call	near ptr _convert
	add	sp,8
	push	ss
	lea	ax,word ptr [bp-126]
	push	ax
	les	bx,dword ptr [bp+12]
	mov	dx,word ptr es:[bx+7]
	mov	ax,word ptr es:[bx+5]
	add	ax,512
	adc	dx,0
	mov	cl,10
	call	near ptr N_LXURSH@
	les	bx,dword ptr [bp+12]
	push	ax
	push	dx
	mov	dx,word ptr es:[bx+11]
	mov	ax,word ptr es:[bx+9]
	add	ax,512
	adc	dx,0
	mov	cl,10
	call	near ptr N_LXURSH@
	pop	bx
	pop	cx
	sub	cx,ax
	sbb	bx,dx
	push	bx
	push	cx
	call	near ptr _convert
	add	sp,8
	push	ss
	lea	ax,word ptr [bp-158]
	push	ax
	les	bx,dword ptr [bp+16]
	push	word ptr es:[bx+11]
	push	word ptr es:[bx+9]
	call	near ptr _convert
	add	sp,8
	push	word ptr [bp+6]
	push	word ptr [bp+4]
	call	near ptr _strlen
	pop	cx
	pop	cx
	mov	si,ax
	jmp	short @19@74
@19@50:
	dec	si
@19@74:
	les	bx,dword ptr [bp+4]
	cmp	byte ptr es:[bx+si],92
	je	short @19@170
	cmp	byte ptr es:[bx+si],46
	je	short @19@170
	cmp	byte ptr es:[bx+si],58
	je	short @19@170
	or	si,si
	ja	short @19@50
@19@170:
	les	bx,dword ptr [bp+4]
	cmp	byte ptr es:[bx+si],46
	jne	short @19@338
	mov	byte ptr es:[bx+si],0
	jmp	short @19@242
@19@218:
	dec	si
@19@242:
	les	bx,dword ptr [bp+4]
	cmp	byte ptr es:[bx+si],92
	je	short @19@338
	cmp	byte ptr es:[bx+si],46
	je	short @19@338
	cmp	byte ptr es:[bx+si],58
	je	short @19@338
	or	si,si
	ja	short @19@218
@19@338:
	or	si,si
	jbe	short @19@386
	inc	si
@19@386:
	mov	ax,word ptr [bp+4]
	add	ax,si
	push	word ptr [bp+6]
	push	ax
	call	near ptr _convmemfree
	pop	cx
	pop	cx
	mov	word ptr [bp-6],ax
	mov	word ptr [bp-4],dx
	les	bx,dword ptr [bp+16]
	mov	dx,word ptr es:[bx+7]
	mov	ax,word ptr es:[bx+5]
	add	ax,512
	adc	dx,0
	mov	cl,10
	call	near ptr N_LXURSH@
	les	bx,dword ptr [bp+16]
	mov	word ptr es:[bx+5],ax
	mov	word ptr es:[bx+7],dx
	mov	dx,word ptr es:[bx+11]
	mov	ax,word ptr es:[bx+9]
	add	ax,512
	adc	dx,0
	mov	cl,10
	call	near ptr N_LXURSH@
	les	bx,dword ptr [bp+16]
	mov	word ptr es:[bx+9],ax
	mov	word ptr es:[bx+11],dx
	mov	dx,word ptr es:[bx+3]
	mov	ax,word ptr es:[bx+1]
	add	ax,512
	adc	dx,0
	mov	cl,10
	call	near ptr N_LXURSH@
	les	bx,dword ptr [bp+16]
	mov	word ptr es:[bx+1],ax
	mov	word ptr es:[bx+3],dx
	push	0
	push	1024
	mov	ax,word ptr [bp-4]
	mov	dx,word ptr [bp-6]
	add	dx,512
	adc	ax,0
	push	ax
	push	dx
	call	near ptr N_LDIV@
	mov	dx,di
	sub	dx,ax
	mov	word ptr [bp-2],dx
	push	0
	push	1024
	push	word ptr [bp-4]
	push	word ptr [bp-6]
	call	near ptr N_LDIV@
	push	dx
	push	ax
	push	word ptr [bp-2]
	push	di
	push	ds
	push	offset DGROUP:s@+212
	call	near ptr _printf
	add	sp,12
	push	ss
	lea	ax,word ptr [bp-78]
	push	ax
	push	ss
	lea	ax,word ptr [bp-126]
	push	ax
	push	ss
	lea	ax,word ptr [bp-110]
	push	ax
	les	bx,dword ptr [bp+16]
	push	word ptr es:[bx+7]
	push	word ptr es:[bx+5]
	mov	ax,word ptr es:[bx+3]
	mov	dx,word ptr es:[bx+1]
	sub	dx,word ptr es:[bx+5]
	sbb	ax,word ptr es:[bx+7]
	push	ax
	push	dx
	push	word ptr es:[bx+3]
	push	word ptr es:[bx+1]
	push	ds
	push	offset DGROUP:s@+346
	call	near ptr _printf
	add	sp,28
	push	ss
	lea	ax,word ptr [bp-62]
	push	ax
	les	bx,dword ptr [bp+8]
	push	word ptr es:[bx+11]
	push	word ptr es:[bx+9]
	call	near ptr _convert
	add	sp,8
	push	ss
	lea	ax,word ptr [bp-62]
	push	ax
	les	bx,dword ptr [bp+8]
	mov	dx,word ptr es:[bx+11]
	mov	ax,word ptr es:[bx+9]
	mov	cl,11
	call	near ptr N_LXURSH@
	mov	cl,9
	call	near ptr N_LXURSH@
	push	dx
	push	ax
	push	ds
	push	offset DGROUP:s@+466
	call	near ptr _printf
	add	sp,12
	push	ss
	lea	ax,word ptr [bp-94]
	push	ax
	les	bx,dword ptr [bp+8]
	push	word ptr es:[bx+15]
	push	word ptr es:[bx+13]
	call	near ptr _convert
	add	sp,8
	push	ss
	lea	ax,word ptr [bp-94]
	push	ax
	les	bx,dword ptr [bp+8]
	mov	dx,word ptr es:[bx+15]
	mov	ax,word ptr es:[bx+13]
	mov	cl,11
	call	near ptr N_LXURSH@
	mov	cl,9
	call	near ptr N_LXURSH@
	push	dx
	push	ax
	push	ds
	push	offset DGROUP:s@+506
	call	near ptr _printf
	add	sp,12
	push	ss
	lea	ax,word ptr [bp-142]
	push	ax
	push	word ptr [bp-4]
	push	word ptr [bp-6]
	call	near ptr _convert
	add	sp,8
	push	ss
	lea	ax,word ptr [bp-142]
	push	ax
	push	0
	push	1024
	mov	ax,word ptr [bp-4]
	mov	dx,word ptr [bp-6]
	add	dx,512
	adc	ax,0
	push	ax
	push	dx
	call	near ptr N_LDIV@
	push	dx
	push	ax
	push	ds
	push	offset DGROUP:s@+547
	call	near ptr _printf
	add	sp,12
	push	ss
	lea	ax,word ptr [bp-158]
	push	ax
	les	bx,dword ptr [bp+16]
	push	word ptr es:[bx+11]
	push	word ptr es:[bx+9]
	push	ds
	push	offset DGROUP:s@+597
	call	near ptr _printf
	add	sp,12
	les	bx,dword ptr [bp+12]
	cmp	byte ptr es:[bx+20],0
	je	short @19@434
	push	ss
	lea	ax,word ptr [bp-46]
	push	ax
	push	ds
	push	offset DGROUP:s@+647
	jmp	short @19@458
@19@434:
	push	ss
	lea	ax,word ptr [bp-46]
	push	ax
	push	ds
	push	offset DGROUP:s@+681
@19@458:
	call	near ptr _printf
	add	sp,8
	pop	di
	pop	si
	leave	
	ret	
normal_list	endp
_TEXT	ends
_DATA	segment word public 'DATA'
	dd	DGROUP:s@+7
	dd	DGROUP:s@+723
	dd	DGROUP:s@+735
	dd	DGROUP:s@+747
	dd	DGROUP:s@+755
	dd	DGROUP:s@+769
	dd	DGROUP:s@+781
	dd	DGROUP:s@+791
_DATA	ends
_TEXT	segment byte public 'CODE'
	assume	cs:_TEXT
print_entry	proc	near
	push	bp
	mov	bp,sp
	les	bx,dword ptr [bp+4]
	mov	al,byte ptr es:[bx]
	mov	ah,0
	shl	ax,2
	mov	bx,ax
	push	word ptr DGROUP:d@w+2[bx+2]
	push	word ptr DGROUP:d@w+2[bx]
	mov	ax,word ptr [bp+4]
	add	ax,7
	push	word ptr [bp+6]
	push	ax
	mov	bx,word ptr [bp+4]
	push	word ptr es:[bx+19]
	push	word ptr es:[bx+17]
	push	word ptr es:[bx+1]
	push	ds
	push	offset DGROUP:s@+796
	call	near ptr _printf
	add	sp,18
	pop	bp
	ret	
print_entry	endp
	assume	cs:_TEXT
upper_list	proc	near
	enter	34,0
	push	word ptr [bp+6]
	push	word ptr [bp+4]
	push	ss
	lea	ax,word ptr [bp-34]
	push	ax
	call	near ptr make_mcb_list
	add	sp,8
	lea	ax,word ptr [bp-34]
	mov	word ptr [bp-4],ax
	mov	word ptr [bp-2],ss
	jmp	short @21@218
@21@50:
	les	bx,dword ptr [bp-4]
	cmp	byte ptr es:[bx],1
	je	short @21@170
	cmp	byte ptr es:[bx],2
	je	short @21@170
	cmp	byte ptr es:[bx],7
	je	short @21@170
	cmp	byte ptr es:[bx],3
	je	short @21@170
	cmp	byte ptr es:[bx],4
	jne	short @21@194
@21@170:
	push	word ptr [bp-2]
	push	word ptr [bp-4]
	call	near ptr print_entry
	pop	cx
	pop	cx
@21@194:
	les	bx,dword ptr [bp-4]
	mov	ax,word ptr es:[bx+28]
	mov	dx,word ptr es:[bx+26]
	mov	word ptr [bp-4],dx
	mov	word ptr [bp-2],ax
@21@218:
	mov	ax,word ptr [bp-4]
	or	ax,word ptr [bp-2]
	jne	short @21@50
	leave	
	ret	
upper_list	endp
	assume	cs:_TEXT
full_list	proc	near
	enter	34,0
	push	word ptr [bp+6]
	push	word ptr [bp+4]
	push	ss
	lea	ax,word ptr [bp-34]
	push	ax
	call	near ptr make_mcb_list
	add	sp,8
	push	ds
	push	offset DGROUP:s@+826
	call	near ptr _puts
	pop	cx
	pop	cx
	push	ds
	push	offset DGROUP:s@+865
	call	near ptr _puts
	pop	cx
	pop	cx
	lea	ax,word ptr [bp-34]
	mov	word ptr [bp-4],ax
	mov	word ptr [bp-2],ss
	jmp	short @22@122
@22@50:
	les	bx,dword ptr [bp-4]
	cmp	byte ptr es:[bx],8
	je	short @22@98
	push	word ptr [bp-2]
	push	bx
	call	near ptr print_entry
	pop	cx
	pop	cx
@22@98:
	les	bx,dword ptr [bp-4]
	mov	ax,word ptr es:[bx+28]
	mov	dx,word ptr es:[bx+26]
	mov	word ptr [bp-4],dx
	mov	word ptr [bp-2],ax
@22@122:
	mov	ax,word ptr [bp-4]
	or	ax,word ptr [bp-2]
	jne	short @22@50
	leave	
	ret	
full_list	endp
	assume	cs:_TEXT
device_list	proc	near
	enter	84,0
	push	word ptr [bp+6]
	push	word ptr [bp+4]
	push	ss
	lea	ax,word ptr [bp-84]
	push	ax
	push	ss
	lea	ax,word ptr [bp-34]
	push	ax
	call	near ptr make_dev_list
	add	sp,12
	push	ds
	push	offset DGROUP:s@+909
	call	near ptr _puts
	pop	cx
	pop	cx
	push	ds
	push	offset DGROUP:s@+954
	call	near ptr _puts
	pop	cx
	pop	cx
	lea	ax,word ptr [bp-84]
	mov	word ptr [bp-4],ax
	mov	word ptr [bp-2],ss
	jmp	short @23@98
@23@50:
	mov	ax,word ptr [bp-4]
	add	ax,13
	push	word ptr [bp-2]
	push	ax
	mov	ax,word ptr [bp-4]
	add	ax,4
	push	word ptr [bp-2]
	push	ax
	les	bx,dword ptr [bp-4]
	push	word ptr es:[bx+22]
	push	word ptr es:[bx+2]
	push	word ptr es:[bx]
	push	ds
	push	offset DGROUP:s@+999
	call	near ptr _printf
	add	sp,18
	les	bx,dword ptr [bp-4]
	mov	ax,word ptr es:[bx+47]
	mov	dx,word ptr es:[bx+45]
	mov	word ptr [bp-4],dx
	mov	word ptr [bp-2],ax
@23@98:
	mov	ax,word ptr [bp-4]
	or	ax,word ptr [bp-2]
	jne	short @23@50
	leave	
	ret	
device_list	endp
_TEXT	ends
_DATA	segment word public 'DATA'
	db	32
	db	32
	db	37
	db	45
	db	50
	db	48
	db	115
	db	0
_DATA	ends
_TEXT	segment byte public 'CODE'
	assume	cs:_TEXT
ems_list	proc	near
	enter	42,0
	push	si
	push	ss
	lea	ax,word ptr [bp-26]
	push	ax
	push	ds
	push	offset DGROUP:d@+34
	mov	cx,8
	call	near ptr N_SCOPY@
	push	word ptr [bp+6]
	push	word ptr [bp+4]
	call	near ptr check_ems
	pop	cx
	pop	cx
	les	bx,dword ptr [bp+4]
	mov	byte ptr es:[bx],al
	mov	al,byte ptr es:[bx]
	mov	ah,0
	or	ax,ax
	jne	short @24@74
	push	ds
	push	offset DGROUP:s@+1029
	call	near ptr _puts
	pop	cx
	pop	cx
	jmp	@24@290
@24@74:
	push	ds
	push	offset DGROUP:s@+1069
	push	ss
	lea	ax,word ptr [bp-26]
	push	ax
	call	near ptr _printf
	add	sp,8
	les	bx,dword ptr [bp+4]
	mov	al,byte ptr es:[bx+27]
	mov	ah,0
	push	ax
	mov	al,byte ptr es:[bx+26]
	mov	ah,0
	push	ax
	push	ds
	push	offset DGROUP:s@+1088
	call	near ptr _printf
	add	sp,8
	push	ds
	push	offset DGROUP:s@+1097
	push	ss
	lea	ax,word ptr [bp-26]
	push	ax
	call	near ptr _printf
	add	sp,8
	les	bx,dword ptr [bp+4]
	push	word ptr es:[bx+7]
	push	ds
	push	offset DGROUP:s@+1112
	call	near ptr _printf
	add	sp,6
	push	ds
	push	offset DGROUP:s@+1118
	push	ss
	lea	ax,word ptr [bp-26]
	push	ax
	call	near ptr _printf
	add	sp,8
	les	bx,dword ptr [bp+4]
	push	word ptr es:[bx+11]
	push	word ptr es:[bx+9]
	push	ds
	push	offset DGROUP:s@+1135
	call	near ptr _printf
	add	sp,8
	push	ds
	push	offset DGROUP:s@+1146
	push	ss
	lea	ax,word ptr [bp-26]
	push	ax
	call	near ptr _printf
	add	sp,8
	les	bx,dword ptr [bp+4]
	push	word ptr es:[bx+15]
	push	word ptr es:[bx+13]
	push	ds
	push	offset DGROUP:s@+1135
	call	near ptr _printf
	add	sp,8
	push	ds
	push	offset DGROUP:s@+1162
	push	ss
	lea	ax,word ptr [bp-26]
	push	ax
	call	near ptr _printf
	add	sp,8
	les	bx,dword ptr [bp+4]
	push	word ptr es:[bx+1]
	push	ds
	push	offset DGROUP:s@+1176
	call	near ptr _printf
	add	sp,6
	push	ds
	push	offset DGROUP:s@+1180
	push	ss
	lea	ax,word ptr [bp-26]
	push	ax
	call	near ptr _printf
	add	sp,8
	les	bx,dword ptr [bp+4]
	push	word ptr es:[bx+3]
	push	ds
	push	offset DGROUP:s@+1176
	call	near ptr _printf
	add	sp,6
	push	ds
	push	offset DGROUP:s@+1193
	call	near ptr _puts
	pop	cx
	pop	cx
	push	ds
	push	offset DGROUP:s@+1233
	call	near ptr _puts
	pop	cx
	pop	cx
	push	ds
	push	offset DGROUP:s@+1272
	call	near ptr _puts
	pop	cx
	pop	cx
	xor	si,si
	jmp	@24@266
@24@98:
	push	9
	push	0
	push	ss
	lea	ax,word ptr [bp-10]
	push	ax
	call	near ptr _memset
	add	sp,8
	les	bx,dword ptr [bp+4]
	cmp	byte ptr es:[bx+26],4
	jb	short @24@218
	mov	ax,si
	shl	ax,2
	add	bx,ax
	cmp	word ptr es:[bx+28],0
	jne	short @24@170
	push	ds
	push	offset DGROUP:s@+1311
	push	ss
	lea	ax,word ptr [bp-10]
	push	ax
	call	near ptr _strcpy
	add	sp,8
	jmp	short @24@194
@24@170:
	mov	ax,si
	shl	ax,2
	les	bx,dword ptr [bp+4]
	add	bx,ax
	mov	ax,word ptr es:[bx+28]
	mov	word ptr [bp-36],ax
	mov	word ptr [bp-18],ss
	lea	ax,word ptr [bp-10]
	mov	word ptr [bp-32],ax
	mov	word ptr [bp-42],21248
	push	ss
	lea	ax,word ptr [bp-18]
	push	ax
	push	ss
	lea	ax,word ptr [bp-42]
	push	ax
	push	ss
	push	ax
	push	103
	call	near ptr _int86x
	add	sp,14
@24@194:
	push	ss
	lea	ax,word ptr [bp-10]
	push	ax
	call	near ptr _strupr
	pop	cx
	pop	cx
@24@218:
	push	ss
	lea	ax,word ptr [bp-10]
	push	ax
	mov	ax,si
	shl	ax,2
	les	bx,dword ptr [bp+4]
	add	bx,ax
	mov	ax,word ptr es:[bx+30]
	xor	dx,dx
	mov	cl,14
	call	near ptr N_LXLSH@
	push	dx
	push	ax
	mov	ax,si
	shl	ax,2
	les	bx,dword ptr [bp+4]
	add	bx,ax
	push	word ptr es:[bx+30]
	mov	ax,si
	shl	ax,2
	mov	bx,word ptr [bp+4]
	add	bx,ax
	push	word ptr es:[bx+28]
	push	ds
	push	offset DGROUP:s@+1318
	call	near ptr _printf
	add	sp,16
	inc	si
@24@266:
	les	bx,dword ptr [bp+4]
	cmp	word ptr es:[bx+5],si
	jbe	@@12
	jmp	@24@98
@@12:
@24@290:
	pop	si
	leave	
	ret	
ems_list	endp
_TEXT	ends
_DATA	segment word public 'DATA'
	db	37
	db	45
	db	50
	db	54
	db	115
	db	0
_DATA	ends
_TEXT	segment byte public 'CODE'
	assume	cs:_TEXT
xms_list	proc	near
	enter	58,0
	push	si
	push	di
	push	ss
	lea	ax,word ptr [bp-6]
	push	ax
	push	ds
	push	offset DGROUP:d@+42
	mov	cx,6
	call	near ptr N_SCOPY@
	push	word ptr [bp+6]
	push	word ptr [bp+4]
	call	near ptr check_xms
	pop	cx
	pop	cx
	les	bx,dword ptr [bp+4]
	mov	byte ptr es:[bx],al
	push	word ptr [bp+10]
	push	word ptr [bp+8]
	push	ss
	lea	ax,word ptr [bp-58]
	push	ax
	call	near ptr make_mcb_list
	add	sp,8
	les	bx,dword ptr [bp+4]
	mov	al,byte ptr es:[bx]
	mov	ah,0
	or	ax,ax
	jne	short @25@74
	push	ds
	push	offset DGROUP:s@+1347
	jmp	@25@794
@25@74:
	push	ds
	push	offset DGROUP:s@+1383
	call	near ptr _printf
	pop	cx
	pop	cx
	les	bx,dword ptr [bp+4]
	mov	ax,word ptr es:[bx+3]
	mov	dx,word ptr es:[bx+1]
	mov	word ptr [bp-12],dx
	mov	word ptr [bp-10],ax
	mov	ah,7
	call	dword ptr [bp-12]
	mov	byte ptr [bp-26],bl
	les	bx,dword ptr [bp+4]
	mov	byte ptr es:[bx+23],al
	cmp	byte ptr [bp-26],0
	je	short @25@122
	push	ds
	push	offset DGROUP:s@+1407
	call	near ptr _puts
	pop	cx
	pop	cx
	push	1
	call	near ptr _exit
	pop	cx
@25@122:
	push	2040
	push	0
	mov	ax,word ptr [bp+4]
	add	ax,24
	push	word ptr [bp+6]
	push	ax
	call	near ptr _memset
	add	sp,8
	les	bx,dword ptr [bp+4]
	mov	word ptr es:[bx+17],0
	xor	si,si
	jmp	@25@290
@25@146:
	mov	ah,14
	mov	dx,si
	call	dword ptr [bp-12]
	or	ax,ax
	jne	@@13
	jmp	@25@266
@@13:
	mov	byte ptr [bp-25],bh
	mov	word ptr [bp-22],dx
	mov	byte ptr [bp-7],bl
	les	bx,dword ptr [bp+4]
	cmp	word ptr es:[bx+17],255
	jae	short @25@218
	mov	ax,word ptr es:[bx+17]
	shl	ax,3
	add	bx,ax
	mov	word ptr es:[bx+24],si
	mov	ax,word ptr [bp-22]
	xor	dx,dx
	mov	cl,10
	call	near ptr N_LXLSH@
	les	bx,dword ptr [bp+4]
	mov	bx,word ptr es:[bx+17]
	shl	bx,3
	mov	di,word ptr [bp+4]
	add	di,bx
	mov	word ptr es:[di+26],ax
	mov	word ptr es:[di+28],dx
	mov	bx,word ptr [bp+4]
	mov	ax,word ptr es:[bx+17]
	shl	ax,3
	add	bx,ax
	mov	al,byte ptr [bp-25]
	mov	ah,0
	mov	word ptr es:[bx+30],ax
	mov	bx,word ptr [bp+4]
	mov	ax,word ptr es:[bx+17]
	shl	ax,3
	add	bx,ax
	mov	ax,word ptr es:[bx+28]
	mov	dx,word ptr es:[bx+26]
	mov	bx,word ptr [bp+4]
	add	word ptr es:[bx+5],dx
	adc	word ptr es:[bx+7],ax
	inc	word ptr es:[bx+17]
@25@218:
	les	bx,dword ptr [bp+4]
	mov	al,byte ptr es:[bx+19]
	cmp	al,byte ptr [bp-7]
	jae	short @25@266
	mov	al,byte ptr [bp-7]
	mov	byte ptr es:[bx+19],al
@25@266:
	inc	si
@25@290:
	cmp	si,65535
	jae	@@14
	jmp	@25@146
@@14:
	mov	ah,9
	mov	dx,1
	call	dword ptr [bp-12]
	mov	si,dx
	or	ax,ax
	jne	short @25@362
	mov	ah,9
	xor	dx,dx
	call	dword ptr [bp-12]
@25@362:
	or	ax,ax
	je	short @25@458
	mov	ah,14
	call	dword ptr [bp-12]
	mov	byte ptr [bp-26],bl
	or	ax,ax
	je	short @25@434
	les	bx,dword ptr [bp+4]
	mov	al,byte ptr [bp-26]
	inc	al
	mov	byte ptr es:[bx+19],al
@25@434:
	mov	dx,si
	mov	ah,10
	call	dword ptr [bp-12]
@25@458:
	push	ds
	push	offset DGROUP:s@+1427
	push	ss
	lea	ax,word ptr [bp-6]
	push	ax
	call	near ptr _printf
	add	sp,8
	les	bx,dword ptr [bp+4]
	mov	al,byte ptr es:[bx+22]
	mov	ah,0
	push	ax
	mov	al,byte ptr es:[bx+21]
	mov	ah,0
	push	ax
	push	ds
	push	offset DGROUP:s@+1446
	call	near ptr _printf
	add	sp,8
	push	ds
	push	offset DGROUP:s@+1453
	push	ss
	lea	ax,word ptr [bp-6]
	push	ax
	call	near ptr _printf
	add	sp,8
	les	bx,dword ptr [bp+4]
	cmp	byte ptr es:[bx+20],0
	je	short @25@506
	mov	dx,ds
	mov	ax,offset DGROUP:s@+1467
	jmp	short @25@530
@25@506:
	mov	dx,ds
	mov	ax,offset DGROUP:s@+1474
@25@530:
	push	dx
	push	ax
	push	ds
	push	offset DGROUP:s@+1463
	call	near ptr _printf
	add	sp,8
	push	ds
	push	offset DGROUP:s@+1485
	push	ss
	lea	ax,word ptr [bp-6]
	push	ax
	call	near ptr _printf
	add	sp,8
	les	bx,dword ptr [bp+4]
	cmp	byte ptr es:[bx+23],0
	je	short @25@578
	mov	dx,ds
	mov	ax,offset DGROUP:s@+1500
	jmp	short @25@602
@25@578:
	mov	dx,ds
	mov	ax,offset DGROUP:s@+1508
@25@602:
	push	dx
	push	ax
	push	ds
	push	offset DGROUP:s@+1463
	call	near ptr _printf
	add	sp,8
	push	ds
	push	offset DGROUP:s@+1517
	push	ss
	lea	ax,word ptr [bp-6]
	push	ax
	call	near ptr _printf
	add	sp,8
	les	bx,dword ptr [bp+4]
	push	word ptr es:[bx+11]
	push	word ptr es:[bx+9]
	push	ds
	push	offset DGROUP:s@+1135
	call	near ptr _printf
	add	sp,8
	push	ds
	push	offset DGROUP:s@+1533
	push	ss
	lea	ax,word ptr [bp-6]
	push	ax
	call	near ptr _printf
	add	sp,8
	les	bx,dword ptr [bp+4]
	push	word ptr es:[bx+15]
	push	word ptr es:[bx+13]
	push	ds
	push	offset DGROUP:s@+1135
	call	near ptr _printf
	add	sp,8
	push	ds
	push	offset DGROUP:s@+1180
	push	ss
	lea	ax,word ptr [bp-6]
	push	ax
	call	near ptr _printf
	add	sp,8
	les	bx,dword ptr [bp+4]
	mov	al,byte ptr es:[bx+19]
	mov	ah,0
	push	ax
	push	ds
	push	offset DGROUP:s@+1556
	call	near ptr _printf
	add	sp,6
	les	bx,dword ptr [bp+4]
	cmp	word ptr es:[bx+17],0
	je	short @25@722
	push	ds
	push	offset DGROUP:s@+1561
	call	near ptr _puts
	pop	cx
	pop	cx
	push	ds
	push	offset DGROUP:s@+1596
	call	near ptr _puts
	pop	cx
	pop	cx
	xor	si,si
	jmp	short @25@698
@25@650:
	mov	ax,si
	shl	ax,3
	les	bx,dword ptr [bp+4]
	add	bx,ax
	push	word ptr es:[bx+30]
	mov	ax,si
	shl	ax,3
	mov	bx,word ptr [bp+4]
	add	bx,ax
	push	word ptr es:[bx+28]
	push	word ptr es:[bx+26]
	mov	ax,si
	shl	ax,3
	mov	bx,word ptr [bp+4]
	add	bx,ax
	push	word ptr es:[bx+24]
	push	si
	push	ds
	push	offset DGROUP:s@+1633
	call	near ptr _printf
	add	sp,14
	inc	si
@25@698:
	les	bx,dword ptr [bp+4]
	cmp	word ptr es:[bx+17],si
	ja	short @25@650
@25@722:
	push	ds
	push	offset DGROUP:s@+1659
	call	near ptr _puts
	pop	cx
	pop	cx
	les	bx,dword ptr [bp+8]
	cmp	byte ptr es:[bx],0
	je	short @25@770
	push	ds
	push	offset DGROUP:s@+1702
	push	ss
	lea	ax,word ptr [bp-6]
	push	ax
	call	near ptr _printf
	add	sp,8
	les	bx,dword ptr [bp+8]
	push	word ptr es:[bx+7]
	push	word ptr es:[bx+5]
	push	ds
	push	offset DGROUP:s@+1135
	call	near ptr _printf
	add	sp,8
	push	ds
	push	offset DGROUP:s@+1720
	push	ss
	lea	ax,word ptr [bp-6]
	push	ax
	call	near ptr _printf
	add	sp,8
	les	bx,dword ptr [bp+8]
	push	word ptr es:[bx+11]
	push	word ptr es:[bx+9]
	push	ds
	push	offset DGROUP:s@+1135
	call	near ptr _printf
	add	sp,8
	jmp	short @25@818
@25@770:
	push	ds
	push	offset DGROUP:s@+1740
@25@794:
	call	near ptr _puts
	pop	cx
	pop	cx
@25@818:
	pop	di
	pop	si
	leave	
	ret	
xms_list	endp
	assume	cs:_TEXT
_classify_args	proc	near
	enter	4,0
	push	si
	push	di
	xor	di,di
	xor	cx,cx
	xor	si,si
	jmp	short @26@146
@26@50:
	mov	ax,di
	shl	ax,2
	les	bx,dword ptr [bp+6]
	add	bx,ax
	mov	ax,word ptr es:[bx+2]
	mov	dx,word ptr es:[bx]
	mov	word ptr [bp-4],dx
	mov	word ptr [bp-2],ax
	les	bx,dword ptr [bp-4]
	cmp	byte ptr es:[bx],47
	jne	short @26@98
	inc	word ptr [bp-4]
	mov	ax,si
	shl	ax,2
	les	bx,dword ptr [bp+14]
	add	bx,ax
	mov	ax,word ptr [bp-2]
	mov	dx,word ptr [bp-4]
	mov	word ptr es:[bx],dx
	mov	word ptr es:[bx+2],ax
	inc	si
	jmp	short @26@122
@26@98:
	mov	ax,cx
	shl	ax,2
	les	bx,dword ptr [bp+10]
	add	bx,ax
	mov	ax,word ptr [bp-2]
	mov	dx,word ptr [bp-4]
	mov	word ptr es:[bx],dx
	mov	word ptr es:[bx+2],ax
	inc	cx
@26@122:
	inc	di
@26@146:
	cmp	di,word ptr [bp+4]
	jl	short @26@50
	mov	ax,si
	pop	di
	pop	si
	leave	
	ret	
_classify_args	endp
_TEXT	ends
_DATA	segment word public 'DATA'
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	69
	db	77
	db	77
	db	88
	db	88
	db	88
	db	88
	db	48
	db	1 dup (0)
	db	0
	db	0
	db	1020 dup (0)
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	2043 dup (0)
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
	db	0
_DATA	ends
_TEXT	segment byte public 'CODE'
	assume	cs:_TEXT
_main	proc	near
	enter	516,0
	push	si
	push	di
	xor	di,di
	push	ss
	lea	ax,word ptr [bp-516]
	push	ax
	push	ss
	lea	ax,word ptr [bp-260]
	push	ax
	push	word ptr [bp+8]
	push	word ptr [bp+6]
	push	word ptr [bp+4]
	call	near ptr _classify_args
	add	sp,14
	mov	word ptr [bp-2],ax
	xor	si,si
	jmp	@27@410
@27@50:
	mov	bx,si
	shl	bx,2
	lea	ax,word ptr [bp-516]
	add	bx,ax
	les	bx,dword ptr ss:[bx]
	mov	al,byte ptr es:[bx]
	cbw	
	push	ax
	call	near ptr _toupper
	pop	cx
	mov	word ptr [bp-4],ax
	mov	cx,6
	mov	bx,offset @27@C1152
@27@98:
	mov	ax,word ptr cs:[bx]
	cmp	ax,word ptr [bp-4]
	je	short @27@170
	inc	bx
	inc	bx
	loop	short @27@98
	jmp	short @27@362
@27@170:
	jmp	word ptr cs:[bx+12]
@27@194:
	mov	di,1
	jmp	short @27@386
@27@218:
	push	ds
	push	offset DGROUP:d@w+3160
	call	near ptr upper_list
	jmp	short @27@314
@27@242:
	push	ds
	push	offset DGROUP:d@w+3160
	call	near ptr full_list
	jmp	short @27@314
@27@266:
	push	ds
	push	offset DGROUP:d@w+3160
	call	near ptr device_list
	jmp	short @27@314
@27@290:
	push	ds
	push	offset DGROUP:d@w+48
	call	near ptr ems_list
@27@314:
	pop	cx
	pop	cx
	jmp	short @27@386
@27@338:
	push	ds
	push	offset DGROUP:d@w+3160
	push	ds
	push	offset DGROUP:d@w+1096
	call	near ptr xms_list
	add	sp,8
	jmp	short @27@386
@27@362:
	mov	bx,si
	shl	bx,2
	lea	ax,word ptr [bp-516]
	add	bx,ax
	push	word ptr ss:[bx+2]
	push	word ptr ss:[bx]
	call	near ptr _strupr
	pop	cx
	pop	cx
	push	dx
	push	ax
	push	ds
	push	offset DGROUP:s@+1781
	call	near ptr _printf
	add	sp,8
	push	1
	call	near ptr _exit
	pop	cx
@27@386:
	inc	si
@27@410:
	cmp	si,word ptr [bp-2]
	jge	@@15
	jmp	@27@50
@@15:
	or	di,di
	je	short @27@482
	push	ds
	push	offset DGROUP:s@+1806
	call	near ptr _printf
	pop	cx
	pop	cx
	push	1
	call	near ptr _exit
	pop	cx
@27@482:
	push	ds
	push	offset DGROUP:d@w+3160
	push	ds
	push	offset DGROUP:d@w+1096
	push	ds
	push	offset DGROUP:d@w+48
	les	bx,dword ptr [bp+6]
	push	word ptr es:[bx+2]
	push	word ptr es:[bx]
	call	near ptr normal_list
	add	sp,16
	xor	ax,ax
	pop	di
	pop	si
	leave	
	ret	
_main	endp
@27@C1152	label	word
	db	63
	db	0
	db	68
	db	0
	db	69
	db	0
	db	70
	db	0
	db	85
	db	0
	db	88
	db	0
	dw	@27@194
	dw	@27@266
	dw	@27@290
	dw	@27@242
	dw	@27@218
	dw	@27@338
	?debug	C E9
_TEXT	ends
_DATA	segment word public 'DATA'
s@	label	byte
	db	'FreeDOS'
	db	0
	db	'MS-DOS'
	db	0
	db	'Windows'
	db	0
	db	'PC-DOS'
	db	0
	db	'DR-DOS'
	db	0
	db	'Novell'
	db	0
	db	'PTS-DOS'
	db	0
	db	'RxDOS'
	db	0
	db	'An unknown operating system'
	db	0
	db	'EMS INTERNAL ERROR.'
	db	0
	db	'SYSTEM MEMORY TRASHED!'
	db	0
	db	' FILES'
	db	0
	db	' FCBS'
	db	0
	db	' BUFFERS'
	db	0
	db	' LASTDRV'
	db	0
	db	' STACKS'
	db	0
	db	' ??????'
	db	0
	db	'SD'
	db	0
	db	'SC'
	db	0
	db	'UMB Corruption'
	db	10
	db	0
	db	'%c:'
	db	0
	db	'%c: - %c:'
	db	0
	db	10
	db	'Memory Type        Total        Used        Free'
	db	10
	db	'----------------  --------   ---------    --------'
	db	10
	db	'Conventional %12uK %10uK %10luK'
	db	10
	db	0
	db	'Upper        %12luK %10luK %10luK'
	db	10
	db	'Extended (XMS) %10sK %10sK %10sK'
	db	10
	db	'----------------  --------   ---------    --------'
	db	10
	db	10
	db	0
	db	'Total Expanded (EMS) %18luM (%s bytes)'
	db	10
	db	0
	db	'Free Expanded (EMS)  %18luM (%s bytes)'
	db	10
	db	10
	db	0
	db	'Largest executable program size %8luK (%s bytes)'
	db	10
	db	0
	db	'Largest free upper memory block %8luK (%s bytes)'
	db	10
	db	0
	db	'%s: the high memory area exists.'
	db	10
	db	0
	db	'%s: the high memory area does not exist.'
	db	10
	db	0
	db	'system code'
	db	0
	db	'system data'
	db	0
	db	'program'
	db	0
	db	'device driver'
	db	0
	db	'environment'
	db	0
	db	'data area'
	db	0
	db	'free'
	db	0
	db	'  %04x   %6lu   %-9s   %-13s'
	db	10
	db	0
	db	'segment   size       name         type'
	db	0
	db	'------- --------  ----------  -------------'
	db	0
	db	'   address     attr    name       program   '
	db	0
	db	' -----------  ------ ----------  ---------- '
	db	0
	db	'  %Fp   %04x   %-8s   %-8s  '
	db	10
	db	0
	db	'  EMS driver not installed in system.  '
	db	0
	db	'EMS driver version'
	db	0
	db	'%1i.%1i'
	db	10
	db	0
	db	'EMS page frame'
	db	0
	db	'%04X'
	db	10
	db	0
	db	'Total EMS memory'
	db	0
	db	'%lu bytes'
	db	10
	db	0
	db	'Free EMS memory'
	db	0
	db	'Total handles'
	db	0
	db	'%u'
	db	10
	db	0
	db	'Free handles'
	db	0
	db	'                                       '
	db	0
	db	'  Handle   Pages   Size      Name     '
	db	0
	db	' -------- ------  ------   ---------- '
	db	0
	db	'SYSTEM'
	db	0
	db	'     %-7u %-6u %-9lu %-9s  '
	db	10
	db	0
	db	'XMS driver not installed in system.'
	db	0
	db	'Testing XMS memory ...'
	db	10
	db	0
	db	'XMS INTERNAL ERROR.'
	db	0
	db	'XMS driver version'
	db	0
	db	'%i.%i'
	db	10
	db	0
	db	'HMA state'
	db	0
	db	'%s'
	db	10
	db	0
	db	'exists'
	db	0
	db	'not exists'
	db	0
	db	'A20 line state'
	db	0
	db	'enabled'
	db	0
	db	'disabled'
	db	0
	db	'Free XMS memory'
	db	0
	db	'Largest free XMS block'
	db	0
	db	'%u'
	db	10
	db	10
	db	0
	db	' Block   Handle   Size       Locks'
	db	0
	db	'------- -------- ------    ---------'
	db	0
	db	'   %-6u %-7u %-9lu %-12u'
	db	10
	db	0
	db	'                                          '
	db	0
	db	'Free upper memory'
	db	0
	db	'Largest upper block'
	db	0
	db	'Upper memory            not available   '
	db	0
	db	'Invalid parameter - /%s'
	db	10
	db	0
	db	'Displays the amount of used and free memory in your system.'
	db	10
	db	10
	db	'Syntax: MEM [/E] [/F] [/D] [/U] [/X] [/?]'
	db	10
	db	'  /E  Reports all information about Expanded Memory'
	db	10
	db	'  /F  Full list of memory blocks'
	db	10
	db	'  /D  List of device drivers currently in memory'
	db	10
	db	'  /U  List of programs in conventional and upper memory'
	db	10
	db	'  /X  Reports all information about Extended Memory'
	db	10
	db	'  /?  Displays this help message'
	db	10
	db	0
_DATA	ends
_TEXT	segment byte public 'CODE'
_TEXT	ends
	extrn	_intdosx:near
_device_list	equ	device_list
	extrn	_printf:near
_register_mcb	equ	register_mcb
	extrn	_biosmemory:near
	extrn	_intdos:near
_env_seg	equ	env_seg
_search_sd	equ	search_sd
_full_list	equ	full_list
_ems_error	equ	ems_error
_xms_list	equ	xms_list
_ems_list	equ	ems_list
_check_memory	equ	check_memory
	public	_classify_args
_upper_list	equ	upper_list
	extrn	_memcpy:near
	extrn	_malloc:near
	public	_get_os
	extrn	_memcmp:near
	public	_check_name
_check_upper	equ	check_upper
	extrn	_getvect:near
	extrn	_memset:near
	extrn	_puts:near
_check_xms	equ	check_xms
_check_ems	equ	check_ems
	extrn	_sprintf:near
_normal_list	equ	normal_list
	public	_main
	extrn	_strncpy:near
	extrn	_strncmp:near
	extrn	_int86x:near
	extrn	_strupr:near
	extrn	_strcpy:near
	extrn	_int86:near
	public	_convmemfree
	extrn	_strlen:near
	extrn	N_SCOPY@:far
	extrn	__psp:word
	extrn	__setargv__:far
	extrn	N_LXURSH@:far
_print_entry	equ	print_entry
	extrn	N_LDIV@:far
	public	_convert
	extrn	_exit:near
	extrn	N_LXLSH@:far
_search_vectors	equ	search_vectors
_is_psp	equ	is_psp
	extrn	_toupper:near
_make_dev_list	equ	make_dev_list
_make_mcb_list	equ	make_mcb_list
	extrn	N_LMOD@:far
_set_upperlink	equ	set_upperlink
_get_upperlink	equ	get_upperlink
	end
