;
;		ish file converter for MS-DOS  Ver 2.00 (90/3/27)
;
;
;		Copyright (c) 1986, 1987, 1989, 1990  by  M. ishizuka
;		All rights reserved.
;



;-----------------------------------------------;
;						;
;	mulate_ext_dl_5				;
;						;
;	emulate		ext	dl, 5		;
;						;
;-----------------------------------------------;

emulate_ext_dl_5:
		push	bx
		push	cx
		mov	bx, 3fh
		mov	cl, 6d
		jmp	emulate_ext_1



;-----------------------------------------------;
;						;
;	mulate_ext_dl_6				;
;						;
;	emulate		ext	dl, 6		;
;						;
;-----------------------------------------------;

emulate_ext_dl_6:
		push	bx
		push	cx
		mov	bx, 7fh
		mov	cl, 7d
emulate_ext_1:	push	dx
		push	si
		cmp	dl, 8
		jc	emulate_ext_2
		sub	dl, 8
		inc	si
emulate_ext_2:	inc	dl
		lodsw
		mov	dh, [si]
		jmp	emulate_ext_4

emulate_ext_3:	shr	dh, 1
		rcr	ax, 1
emulate_ext_4:	dec	dl
		jnz	emulate_ext_3
		and	ax, bx
		pop	si
		pop	dx
		add	dl, cl
		cmp	dl, 10h
		jc	emulate_ext_5
		sub	dl, 10h
		inc	si
		inc	si
emulate_ext_5:	pop	cx
		pop	bx
		ret



;-----------------------------------------------;
;						;
;	mulate_ext_dl_12			;
;						;
;	emulate		ext	dl, 12		;
;						;
;-----------------------------------------------;

emulate_ext_dl_12:
		push	bx
		push	cx
		mov	bx, 1fffh
		mov	cl, 13d
		jmp	emulate_ext_1



;-----------------------------------------------;
;						;
;	mulate_ext_dl_13			;
;						;
;	emulate		ext	dl, 13		;
;						;
;-----------------------------------------------;

emulate_ext_dl_13:
		push	bx
		push	cx
		mov	bx, 3fffh
		mov	cl, 14d
		jmp	emulate_ext_1



;-----------------------------------------------;
;						;
;	mulate_ext_dl_14			;
;						;
;	emulate		ext	dl, 14		;
;						;
;-----------------------------------------------;

emulate_ext_dl_14:
		push	bx
		push	cx
		mov	bx, 7fffh
		mov	cl, 15d
		jmp	emulate_ext_1



;-----------------------------------------------;
;						;
;	mulate_ins_dl_5				;
;						;
;	emulate		ins	dl, 5		;
;						;
;-----------------------------------------------;

emulate_ins_dl_5:
		push	bx
		push	cx
		mov	bx, 3fh
		mov	cl, 6
		jmp	emulate_ins_1



;-----------------------------------------------;
;						;
;	mulate_ins_dl_6				;
;						;
;	emulate		ins	dl, 6		;
;						;
;-----------------------------------------------;

emulate_ins_dl_6:
		push	bx
		push	cx
		mov	bx, 7fh
		mov	cl, 7
emulate_ins_1:	and	ax, bx
		push	dx
		push	di
		xor	dh, dh
		cmp	dl, 8
		jc	emulate_ins_2
		sub	dl, 8
		inc	di
emulate_ins_2:	inc	dl
		jmp	emulate_ins_4

emulate_ins_3:	shl	ax, 1
		rcl	dh, 1
		shl	bx, 1
emulate_ins_4:	dec	dl
		jnz	emulate_ins_3
		not	bx
		and	[di], bx
		or	[di], ax
		mov	[di+2], dh
		pop	di
		pop	dx
		add	dl, cl
		cmp	dl, 10h
		jc	emulate_ins_5
		sub	dl, 10h
		inc	di
		inc	di
emulate_ins_5:	pop	cx
		pop	bx
		ret



;-----------------------------------------------;
;						;
;	mulate_ins_dl_12			;
;						;
;	emulate		ins	dl, 12		;
;						;
;-----------------------------------------------;

emulate_ins_dl_12:
		push	bx
		push	cx
		mov	bx, 1fffh
		mov	cl, 13d
		jmp	emulate_ins_1



;-----------------------------------------------;
;						;
;	mulate_ins_dl_13			;
;						;
;	emulate		ins	dl, 13		;
;						;
;-----------------------------------------------;

emulate_ins_dl_13:
		push	bx
		push	cx
		mov	bx, 3fffh
		mov	cl, 14d
		jmp	emulate_ins_1



;-----------------------------------------------;
;						;
;	mulate_ins_dl_14			;
;						;
;	emulate		ins	dl, 14		;
;						;
;-----------------------------------------------;

emulate_ins_dl_14:
		push	bx
		push	cx
		mov	bx, 7fffh
		mov	cl, 15d
		jmp	emulate_ins_1
