Index: trunk/minix/lib/i86/em/em_adi.s
===================================================================
--- trunk/minix/lib/i86/em/em_adi.s	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-.define .adi
-
-	.text
-.adi:
-	pop     bx 
-	cmp     cx,#2
-	jne     1f
-	pop     cx
-	add     ax,cx
-	jmp     (bx)
-1:
-	cmp     cx,#4
-	jne     9f
-	pop     dx
-	pop     cx
-	add     ax,cx
-	pop     cx
-	adc     dx,cx
-	push    dx
-	jmp     (bx)
-9:
-.extern .trpilin
-	push	bx
-	jmp     .trpilin
Index: trunk/minix/lib/i86/em/em_and.s
===================================================================
--- trunk/minix/lib/i86/em/em_and.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-.define	.and
-
-	! #bytes in cx
-	! save di; it might be a register variable
-
-	.text
-.and:
-	pop	bx		! return address
-	mov	dx,di
-	mov	di,sp
-	add	di,cx
-	sar	cx,#1
-1:
-	pop	ax
-	and	ax,(di)
-	stos
-	loop	1b
-	mov	di,dx
-	jmp	(bx)
Index: trunk/minix/lib/i86/em/em_blm.s
===================================================================
--- trunk/minix/lib/i86/em/em_blm.s	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-.define .blm
-.text
-
-	! cx: count in words
-.blm:
-	mov	bx,sp
-	mov	ax,si
-	mov	dx,di
-	mov	di,2(bx)
-	mov	si,4(bx)
-	rep
-	mov
-	mov	si,ax
-	mov	di,dx
-	ret	4
Index: trunk/minix/lib/i86/em/em_cii.s
===================================================================
--- trunk/minix/lib/i86/em/em_cii.s	(revision 9)
+++ 	(revision )
@@ -1,37 +1,0 @@
-.define .cii
-
-.text
-.cii:
-	pop     bx              ! return address
-				! pop     cx, dest. size
-				! pop     dx, src. size
-				! ax is first word of source
-	cmp	dx,#1
-	jne	2f
-	cbw
-	mov	dx,#2
-2:
-	cmp     dx,cx
-	je      8f
-	cmp     dx,#2
-	je      1f
-	cmp     dx,#4
-	jne     9f
-	cmp     cx,#2
-	jne     9f
-	pop     dx
-8:
-	jmp     (bx)
-1:
-	cmp     cx,#4
-	jne     9f
-	cwd
-	push    dx
-	jmp     (bx)
-9:
-	push    ax              ! push low source
-EILLINS = 18
-.extern .fat
-	mov     ax,#EILLINS
-	push    ax
-	jmp     .fat
Index: trunk/minix/lib/i86/em/em_cmi4.s
===================================================================
--- trunk/minix/lib/i86/em/em_cmi4.s	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-.define .cmi4
-
-.text
-.cmi4:
-	pop     bx              ! return address
-	pop     cx
-	pop     dx
-	pop     ax
-	push	si
-	mov	si,sp
-	xchg	bx,2(si)
-	pop	si
-	cmp     bx,dx
-	jg      1f
-	jl      2f
-	cmp     ax,cx
-	ja      1f
-	je      3f
-2:
-	mov	ax,#-1
-	ret
-3:
-	xor	ax,ax
-	ret
-1:
-	mov	ax,#1
-	ret
Index: trunk/minix/lib/i86/em/em_cms.s
===================================================================
--- trunk/minix/lib/i86/em/em_cms.s	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-.define .cms
-
-	! #bytes in cx
-	.text
-.cms:
-	pop     bx              ! return address
-	mov     dx,sp
-	push	si
-	push	di
-	mov     si,dx
-	add     dx,cx
-	mov     di,dx
-	add     dx,cx
-	sar     cx,#1
-	repe
-	cmp
-	je      1f
-	inc     cx
-1:
-	pop	di
-	pop	si
-	mov     sp,dx
-	jmp     (bx)
Index: trunk/minix/lib/i86/em/em_cmu4.s
===================================================================
--- trunk/minix/lib/i86/em/em_cmu4.s	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-.define .cmu4
-
-.text
-.cmu4:
-	pop     bx              ! return address
-	pop     cx
-	pop     dx
-	pop     ax
-	push	si
-	mov	si,sp
-	xchg	bx,2(si)
-	pop	si
-	cmp     bx,dx
-	ja      1f
-	jb      2f
-	cmp     ax,cx
-	ja      1f
-	je      3f
-2:
-	mov	ax,#-1
-	ret
-3:
-	xor	ax,ax
-	ret
-1:
-	mov	ax,#1
-	ret
Index: trunk/minix/lib/i86/em/em_com.s
===================================================================
--- trunk/minix/lib/i86/em/em_com.s	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-.define	.com
-
-	! #bytes in cx
-	.text
-.com:
-	mov	bx,sp
-	inc	bx
-	inc	bx
-	sar	cx,#1
-1:
-	not	(bx)
-	inc	bx
-	inc	bx
-	loop	1b
-	ret
Index: trunk/minix/lib/i86/em/em_csa2.s
===================================================================
--- trunk/minix/lib/i86/em/em_csa2.s	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-.define .csa2
-
-.text
-.csa2:
-				! bx, descriptor address
-				! ax, index
-	mov     dx,(bx)         ! default
-	sub     ax,2(bx)
-	cmp     ax,4(bx)
-	ja      1f
-	sal     ax,#1
-	add	bx,ax
-	mov     bx,6(bx)
-	test    bx,bx
-	jnz     2f
-1:
-	mov     bx,dx
-	test    bx,bx
-	jnz     2f
-ECASE = 20
-.extern .fat
-	mov     ax,#ECASE
-	push    ax
-	jmp     .fat
-2:
-	jmp     (bx)
Index: trunk/minix/lib/i86/em/em_csa4.s
===================================================================
--- trunk/minix/lib/i86/em/em_csa4.s	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .csa4
-
-.sect .text
-.csa4:
-				! bx, descriptor address
-				! ax, dx: index
-	mov	cx,(bx)         ! default
-	sub     ax,2(bx)
-				! ignore high order word; if non-zero, the
-				! case descriptor would not fit anyway
-	cmp	ax,6(bx)
-	ja	1f
-2:
-	sal     ax,#1
-	add	bx,ax
-	mov     bx,10(bx)
-	test    bx,bx
-	jnz     2f
-1:
-	mov	bx,cx
-	test    bx,bx
-	jnz     2f
-ECASE = 20
-.extern .fat
-	mov     ax,#ECASE
-	push    ax
-	jmp     .fat
-2:
-	jmp     (bx)
Index: trunk/minix/lib/i86/em/em_csb2.s
===================================================================
--- trunk/minix/lib/i86/em/em_csb2.s	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-.define .csb2
-
-.text
-.csb2:
-				!bx, descriptor address
-				!ax,  index
-	mov	dx,(bx)
-	mov	cx,2(bx)
-1:
-	add	bx,#4
-	dec     cx
-	jl      4f
-	cmp     ax,(bx)
-	jne     1b
-	mov	bx,2(bx)
-2:
-	test    bx,bx
-	jnz     3f
-ECASE = 20
-.extern .fat
-	mov     ax,#ECASE
-	push    ax
-	jmp     .fat
-3:
-	jmp     (bx)
-4:
-	mov	bx,dx
-	jmp	2b
Index: trunk/minix/lib/i86/em/em_csb4.s
===================================================================
--- trunk/minix/lib/i86/em/em_csb4.s	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .csb4
-
-.sect .text
-.csb4:
-				!bx: descriptor address
-				!ax, dx:  index
-	push	(bx)		! default
-	mov	cx,2(bx)	! count (ignore high order word, the descriptor
-				! would not fit anyway)
-1:
-	add	bx,#6
-	dec     cx
-	jl      4f
-	cmp     ax,(bx)
-	jne     1b
-	cmp	dx,2(bx)
-	jne     1b
-	pop	bx
-	mov	bx,4(bx)
-2:
-	test    bx,bx
-	jnz     3f
-ECASE = 20
-.extern .fat
-	mov     ax,#ECASE
-	push    ax
-	jmp     .fat
-3:
-	jmp	(bx)
-4:
-	pop	bx
-	jmp	2b
Index: trunk/minix/lib/i86/em/em_cuu.s
===================================================================
--- trunk/minix/lib/i86/em/em_cuu.s	(revision 9)
+++ 	(revision )
@@ -1,36 +1,0 @@
-.define .ciu
-.define .cui
-.define .cuu
-
-.text
-.ciu:
-.cui:
-.cuu:
-	pop     bx              ! return address
-				! pop     cx, dest. size
-				! pop     dx, source size
-				! ax is low word of source
-	cmp     dx,cx
-	je      8f
-	cmp     dx,#2
-	je      1f
-	cmp     dx,#4
-	jne     9f
-	cmp     cx,#2
-	jne     9f
-	pop     dx
-8:
-	jmp     (bx)
-1:
-	cmp     cx,#4
-	jne     9f
-	xor     dx,dx
-	push    dx
-	jmp     (bx)
-9:
-	push    ax              ! to help debugging ?
-EILLINS = 18
-.extern .fat
-	mov     ax,#EILLINS
-	push    ax
-	jmp     .fat
Index: trunk/minix/lib/i86/em/em_dup.s
===================================================================
--- trunk/minix/lib/i86/em/em_dup.s	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-.define	.dup
-
-	! #bytes in cx
-	.text
-.dup:
-	pop	bx		! return address
-	mov	ax,si
-	mov	dx,di
-	mov	si,sp
-	sub	sp,cx
-	mov	di,sp
-	sar	cx,#1
-	rep
-	mov
-	mov	si,ax
-	mov	di,dx
-	jmp	(bx)
Index: trunk/minix/lib/i86/em/em_dvi4.s
===================================================================
--- trunk/minix/lib/i86/em/em_dvi4.s	(revision 9)
+++ 	(revision )
@@ -1,90 +1,0 @@
-.define .dvi4
-
-yl=6
-yh=8
-xl=10
-xh=12
-
-.text
-.dvi4:
-	push	si
-	push	di
-	mov     si,sp           ! copy of sp
-	mov     bx,yl(si)
-	mov     ax,yh(si)
-	cwd
-	mov     di,dx
-	cmp     dx,ax
-	jne     7f
-	and     dx,dx
-	jge     1f
-	neg     bx
-	je      7f
-1:
-	xor     dx,dx
-	mov     cx,xl(si)
-	mov     ax,xh(si)
-	and     ax,ax
-	jge     2f
-	neg     ax
-	neg     cx
-	sbb     ax,dx
-	not     di
-2:
-	div     bx
-	xchg    ax,cx
-	div     bx              ! cx = high abs(result), ax=low abs(result)
-9:
-	and     di,di
-	jge     1f
-	neg     cx
-	neg     ax
-	sbb     cx,#0
-1:
-			! cx is high order result
-			! ax is low order result
-	mov	dx,cx
-	pop	di
-	pop	si
-	ret	8	! result in ax/dx
-
-7:
-	push    dx              ! sign of y
-	mov     di,ax
-	xor     bx,bx
-	and     di,di
-	jge     1f
-	neg     di
-	neg     yl(si)
-	sbb     di,bx
-1:
-	mov     ax,xl(si)
-	mov     dx,xh(si)
-	and     dx,dx
-	jge     1f
-	neg     dx
-	neg     ax
-	sbb     dx,bx
-	not     -2(si)
-1:
-	mov     cx,#16
-1:
-	shl     ax,#1
-	rcl     dx,#1
-	rcl     bx,#1
-	cmp     di,bx
-	ja      3f
-	jb      2f
-	cmp     yl(si),dx
-	jbe     2f
-3:
-	loop    1b
-	jmp     1f
-2:
-	sub     dx,yl(si)
-	sbb     bx,di
-	inc     ax
-	loop    1b
-1:
-	pop     di              ! di=sign of result,ax= result
-	jmp     9b
Index: trunk/minix/lib/i86/em/em_dvu4.s
===================================================================
--- trunk/minix/lib/i86/em/em_dvu4.s	(revision 9)
+++ 	(revision )
@@ -1,54 +1,0 @@
-.define .dvu4
-
-yl=6
-yh=8
-xl=10
-xh=12
-
-.text
-.dvu4:
-	push	si
-	push	di
-	mov     si,sp           ! copy of sp
-	mov     bx,yl(si)
-	mov     ax,yh(si)
-	or      ax,ax
-	jne     7f
-	xor     dx,dx
-	mov     cx,xl(si)
-	mov     ax,xh(si)
-	div     bx
-	xchg    ax,cx
-	div     bx
-9:
-			! cx is high order result
-			! ax is low order result
-	mov	dx,cx
-	pop	di
-	pop	si
-	ret	8	! result in ax/dx
-
-7:
-	mov     di,ax
-	xor     bx,bx
-	mov     ax,xl(si)
-	mov     dx,xh(si)
-	mov     cx,#16
-1:
-	shl     ax,#1
-	rcl     dx,#1
-	rcl     bx,#1
-	cmp     di,bx
-	ja      3f
-	jb      2f
-	cmp     yl(si),dx
-	jbe     2f
-3:
-	loop    1b
-	jmp     9b
-2:
-	sub     dx,yl(si)
-	sbb     bx,di
-	inc     ax
-	loop    1b
-	jmp     9b
Index: trunk/minix/lib/i86/em/em_error.s
===================================================================
--- trunk/minix/lib/i86/em/em_error.s	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-.define .error
-.define .Xtrp
-
-	! ax is trap number
-	! all registers must be saved
-	! because return is possible
-	! May only be called with error no's <16
-.text
-.error:
-	push bp
-	push si
-	push di
-	push dx
-	push cx
-	push bx
-	push ax
-	mov  cx,ax
-	mov  bx,#1
-	sal  bx,cl
-.extern .ignmask
-.extern .trp
-	test bx,.ignmask
-	jne  2f
-	call    .trp
-2:
-	pop  ax
-	pop  bx
-	pop  cx
-	pop  dx
-	pop  di
-	pop  si
-	pop  bp
-	ret
-
-.Xtrp:
-	cmp	ax,#16
-	jge	1f
-	call	.error
-	ret
-1:
-	jmp	.trp
Index: trunk/minix/lib/i86/em/em_exg.s
===================================================================
--- trunk/minix/lib/i86/em/em_exg.s	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-.define .exg
-
-	! #bytes in cx
-.text
-.exg:
-	push	di
-	mov	sp,di
-	add	di,#4
-	mov	bx,di
-	add	bx,cx
-	sar     cx,#1
-1:
-	mov	ax,(bx)
-	xchg	ax,(di)
-	mov	(bx),ax
-	add	di,#2
-	add	bx,#2
-	loop	1b
-2:
-	pop	di
-	ret
Index: trunk/minix/lib/i86/em/em_fat.s
===================================================================
--- trunk/minix/lib/i86/em/em_fat.s	(revision 9)
+++ 	(revision )
@@ -1,9 +1,0 @@
-.define .fat
-.text
-
-.fat:
-.extern .trp
-.extern .stop
-	call    .trp
-	call    .stop
-	! no return
Index: trunk/minix/lib/i86/em/em_fp8087.s
===================================================================
--- trunk/minix/lib/i86/em/em_fp8087.s	(revision 9)
+++ 	(revision )
@@ -1,615 +1,0 @@
-.define .adf4, .adf8, .sbf4, .sbf8, .mlf4, .mlf8, .dvf4, .dvf8
-.define .ngf4, .ngf8, .fif4, .fif8, .fef4, .fef8
-.define .cif4, .cif8, .cuf4, .cuf8, .cfi, .cfu, .cff4, .cff8
-.define .cmf4, .cmf8
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-!	$Header: /cvsup/minix/src/lib/i86/em/em_fp8087.s,v 1.1.1.1 2005/04/21 14:56:13 beng Exp $
-
-!	Implement interface to floating point package for Intel 8087
-
-	.sect .rom
-one:
-	.data2	1
-two:
-	.data2	2
-bigmin:
-	.data2	0, -32768
-
-	.sect .text
-.adf4:
-	mov	bx,sp
-	wait
-	flds	2(bx)
-	wait
-	fadds	6(bx)
-	wait
-	fstps	6(bx)
-	wait
-	ret
-.adf8:
-	mov	bx,sp
-	wait
-	fldd	2(bx)
-	wait
-	faddd	10(bx)
-	wait
-	fstpd	10(bx)
-	wait
-	ret
-
-.sbf4:
-	mov	bx,sp
-	wait
-	flds	6(bx)
-	wait
-	fsubs	2(bx)
-	wait
-	fstps	6(bx)
-	wait
-	ret
-
-.sbf8:
-	mov	bx,sp
-	wait
-	fldd	10(bx)
-	wait
-	fsubd	2(bx)
-	wait
-	fstpd	10(bx)
-	wait
-	ret
-
-.mlf4:
-	mov	bx,sp
-	wait
-	flds	2(bx)
-	wait
-	fmuls	6(bx)
-	wait
-	fstps	6(bx)
-	wait
-	ret
-.mlf8:
-	mov	bx,sp
-	wait
-	fldd	2(bx)
-	wait
-	fmuld	10(bx)
-	wait
-	fstpd	10(bx)
-	wait
-	ret
-
-.dvf4:
-	mov	bx,sp
-	wait
-	flds	6(bx)
-	wait
-	fdivs	2(bx)
-	wait
-	fstps	6(bx)
-	wait
-	ret
-
-.dvf8:
-	mov	bx,sp
-	wait
-	fldd	10(bx)
-	wait
-	fdivd	2(bx)
-	wait
-	fstpd	10(bx)
-	wait
-	ret
-
-.ngf4:
-	mov	bx,sp
-	wait
-	flds	2(bx)
-	wait
-	fchs
-	wait
-	fstps	2(bx)
-	wait
-	ret
-
-.ngf8:
-	mov	bx,sp
-	wait
-	fldd	2(bx)
-	wait
-	fchs
-	wait
-	fstpd	2(bx)
-	wait
-	ret
-
-.fif4:
-	mov	bx,sp
-	push	bx		! make room for FP status word
-	wait
-	flds	4(bx)
-	wait
-	fmuls	8(bx)		! multiply
-	wait
-	fld	st		! copy result
-	wait
-	ftst			! test sign; handle negative separately
-	wait
-	fstsw	-2(bx)
-	wait
-	mov	ax,-2(bx)
-	sahf			! result of test in condition codes
-	jb	1f
-	frndint			! this one rounds (?)
-	wait
-	fcom	st(1)		! compare with original; if <=, then OK
-	wait
-	fstsw	-2(bx)
-	wait
-	mov	ax,-2(bx)
-	sahf
-	jbe	2f
-	fisubs	one		! else subtract 1
-	wait
-	jmp	2f
-1:				! here, negative case
-	frndint			! this one rounds (?)
-	wait
-	fcom	st(1)		! compare with original; if >=, then OK
-	wait
-	fstsw	-2(bx)
-	wait
-	mov	ax,-2(bx)
-	sahf
-	jae	2f
-	fiadds	one		! else add 1
-	wait
-2:
-	fsub	st(1),st	! subtract integer part
-	wait
-	mov	bx,2(bx)
-	fstps	(bx)
-	wait
-	fstps	4(bx)
-	wait
-	pop	bx
-	ret
-
-.fif8:
-	mov	bx,sp
-	push	bx		! make room for FP status word
-	wait
-	fldd	4(bx)
-	wait
-	fmuld	12(bx)		! multiply
-	wait
-	fld	st		! and copy result
-	wait
-	ftst			! test sign; handle negative separately
-	wait
-	fstsw	-2(bx)
-	wait
-	mov	ax,-2(bx)
-	sahf			! result of test in condition codes
-	jb	1f
-	frndint			! this one rounds (?)
-	wait
-	fcom	st(1)		! compare with original; if <=, then OK
-	wait
-	fstsw	-2(bx)
-	wait
-	mov	ax,-2(bx)
-	sahf
-	jbe	2f
-	fisubs	one		! else subtract 1
-	wait
-	jmp	2f
-1:				! here, negative case
-	frndint			! this one rounds (?)
-	wait
-	fcom	st(1)		! compare with original; if >=, then OK
-	wait
-	fstsw	-2(bx)
-	wait
-	mov	ax,-2(bx)
-	sahf
-	jae	2f
-	fiadds	one		! else add 1
-	wait
-2:
-	fsub	st(1),st	! subtract integer part
-	mov	bx,2(bx)
-	fstpd	(bx)
-	wait
-	fstpd	8(bx)
-	wait
-	pop	bx
-	ret
-
-.fef4:
-				! this could be simpler, if only the
-				! fxtract instruction was emulated properly
-	mov	bx,sp
-	mov	ax,6(bx)
-	and	ax,#077600
-	je	1f		! zero exponent
-	mov	cx,#7
-	shr	ax,cl
-	sub	ax,#126
-	mov	cx,ax		! exponent in cx
-	mov	ax,6(bx)
-	and	ax,#0100177
-	or	ax,#0037400	! load -1 exponent
-	mov	dx,4(bx)
-	mov	bx,2(bx)
-	mov	4(bx),ax
-	mov	2(bx),dx
-	mov	(bx),cx
-	ret
-1:				! we get here on zero exp
-	mov	ax,6(bx)
-	and	ax,#0177
-	or	ax,4(bx)
-	jne	1f		! zero result
-	xor	ax,ax
-	mov	bx,2(bx)
-	mov	(bx),ax
-	mov	2(bx),ax
-	mov	4(bx),ax
-	ret
-1:				! otherwise unnormalized number
-	mov	cx,6(bx)
-	and	cx,#0100177
-	mov	dx,cx
-	and	cx,#0x8000
-	mov	ax,#-125
-2:
-	test	dx,#0x80
-	jne	1f
-	dec	ax
-	shl	4(bx),#1
-	rcl	dx,#1
-	or	dx,cx
-	jmp	2b
-1:
-	mov	cx,4(bx)
-	mov	bx,2(bx)
-	mov	(bx),ax
-	mov	2(bx),cx
-	and	dx,#0100177
-	or	dx,#0037400	! load -1 exponent
-	mov	4(bx),dx
-	ret
-
-.fef8:
-				! this could be simpler, if only the
-				! fxtract instruction was emulated properly
-	mov	bx,sp
-	mov	ax,10(bx)
-	and	ax,#077760
-	je	1f		! zero exponent
-	mov	cx,#4
-	shr	ax,cl
-	sub	ax,#1022
-	mov	cx,ax		! exponent in cx
-	mov	ax,10(bx)
-	and	ax,#0100017
-	or	ax,#0037740	! load -1 exponent
-	push	8(bx)
-	push	6(bx)
-	push	4(bx)
-	mov	bx,2(bx)
-	pop	2(bx)
-	pop	4(bx)
-	pop	6(bx)
-	mov	8(bx),ax
-	mov	(bx),cx
-	ret
-1:				! we get here on zero exp
-	mov	ax,10(bx)
-	and	ax,#017
-	or	ax,8(bx)
-	or	ax,6(bx)
-	or	ax,4(bx)
-	jne	1f		! zero result
-	xor	ax,ax
-	mov	bx,2(bx)
-	mov	(bx),ax
-	mov	2(bx),ax
-	mov	4(bx),ax
-	mov	6(bx),ax
-	mov	8(bx),ax
-	ret
-1:				! otherwise unnormalized number
-	mov	cx,10(bx)
-	and	cx,#0100017
-	mov	dx,cx
-	and	cx,#0x8000
-	mov	ax,#-1021
-2:
-	test	dx,#0x10
-	jne	1f
-	dec	ax
-	shl	4(bx),#1
-	rcl	6(bx),#1
-	rcl	8(bx),#1
-	rcl	dx,#1
-	or	dx,cx
-	jmp	2b
-1:
-	and	dx,#0100017
-	or	dx,#0037740	! load -1 exponent
-	mov	cx,8(bx)
-	push	6(bx)
-	push	4(bx)
-	mov	bx,2(bx)
-	mov	(bx),ax
-	mov	8(bx),dx
-	mov	6(bx),cx
-	pop	2(bx)
-	pop	4(bx)
-	ret
-
-.cif4:
-	mov	bx,sp
-	cmp	2(bx),#2
-	jne	1f
-	wait
-	filds	4(bx)
-	wait
-	fstps	2(bx)
-	wait
-	ret
-1:
-	wait
-	fildl	4(bx)
-	wait
-	fstps	4(bx)
-	wait
-	ret
-
-.cif8:
-	mov	bx,sp
-	cmp	2(bx),#2
-	jne	1f
-	wait
-	filds	4(bx)
-	wait
-	fstpd	2(bx)
-	wait
-	ret
-1:
-	wait
-	fildl	4(bx)
-	wait
-	fstpd	2(bx)
-	wait
-	ret
-
-.cuf4:
-	mov	bx,sp
-	cmp	2(bx),#2
-	jne	1f
-	mov	ax,4(bx)
-	mov	2(bx),ax
-	mov	4(bx),#0
-	wait
-	fildl	2(bx)
-	wait
-	fstps	2(bx)
-	wait
-	ret
-1:
-	wait
-	fildl	4(bx)
-	wait
-	cmp	6(bx),#0
-	jge	1f
-2:
-	wait
-	fisubl	bigmin
-	wait
-	fisubl	bigmin
-1:
-	wait
-	fstps	4(bx)
-	wait
-	ret
-
-.cuf8:
-	mov	bx,sp
-	cmp	2(bx),#2
-	jne	1f
-	mov	6(bx),#0
-1:
-	wait
-	fildl	4(bx)
-	wait
-	cmp	6(bx),#0
-	jge	1f
-2:
-	wait
-	fisubl	bigmin
-	wait
-	fisubl	bigmin
-1:
-	wait
-	fstpd	2(bx)
-	wait
-	ret
-
-.cfi:
-	mov	bx,sp
-	push	bx
-	wait
-	fstcw	-2(bx)
-	wait
-	mov	dx,-2(bx)
-	or	-2(bx),#0xc00	! truncating mode
-	wait
-	fldcw	-2(bx)
-	pop	ax
-	cmp	4(bx),#4
-	jne	2f
-				! loc 4 loc ? cfi
-	wait
-	flds	6(bx)
-	wait
-	fistpl	6(bx)
-	wait
-	cmp	2(bx),#2
-	jne	1f
-	mov	ax,6(bx)
-1:
-	mov	4(bx),dx
-	wait
-	fldcw	4(bx)
-	wait
-	ret
-2:
-				! loc 8 loc ? cfi
-	wait
-	fldd	6(bx)
-	wait
-	fistpl	10(bx)
-	wait
-	cmp	2(bx),#2
-	jne	1b
-	mov	ax,10(bx)
-	jmp	1b
-
-.cfu:
-	mov	bx,sp
-	push	bx
-	wait
-	fstcw	-2(bx)
-	wait
-	mov	dx,-2(bx)
-	and	-2(bx),#0xf3ff
-	or	-2(bx),#0x400	! to -infinity
-	wait
-	fldcw	-2(bx)
-	wait
-	pop	ax
-	cmp	4(bx),#4
-	jne	2f
-				! loc 4 loc ? cfu
-	flds	6(bx)
-	wait
-	fabs			! ???
-	wait
-	fiaddl	bigmin
-	fistpl	6(bx)
-	wait
-	mov	ax,8(bx)
-	sub	ax,bigmin+2
-	mov	8(bx),ax
-	cmp	2(bx),#2
-	jne	1f
-	mov	ax,6(bx)
-1:
-	mov	4(bx),dx
-	wait
-	fldcw	4(bx)
-	wait
-	ret
-2:
-	wait
-				! loc 8 loc ? cfu
-	fldd	6(bx)
-	wait
-	fabs			! ???
-	wait
-	fiaddl	bigmin
-	fistpl	10(bx)
-	wait
-	mov	ax,12(bx)
-	sub	ax,bigmin+2
-	mov	12(bx),ax
-	cmp	2(bx),#2
-	jne	1b
-	mov	ax,10(bx)
-	jmp	1b
-
-.cff4:
-	mov	bx,sp
-	wait
-	fldd	2(bx)
-	wait
-	fstcw	2(bx)
-	wait
-	mov	dx,2(bx)
-	and	2(bx),#0xf3ff	! set to rounding mode
-	wait
-	fldcw	2(bx)
-	wait
-	fstps	6(bx)
-	mov	2(bx),dx
-	wait
-	fldcw	2(bx)
-	wait
-	ret
-
-.cff8:
-	mov	bx,sp
-	wait
-	flds	2(bx)
-	wait
-	fstpd	2(bx)
-	wait
-	ret
-
-.cmf4:
-	mov	bx,sp
-	push	bx		! room for 8087 status word
-	xor	cx,cx
-	wait
-	flds	6(bx)
-	wait
-	flds	2(bx)
-	wait
-	fcompp			! compare and pop operands
-	wait
-	fstsw	-2(bx)
-	wait
-	mov	ax,-2(bx)
-	sahf
-	je	1f
-	jb	2f
-	dec	cx
-	jmp	1f
-2:
-	inc	cx
-1:
-	mov	ax,cx
-	pop	bx
-	ret
-
-
-.cmf8:
-	mov	bx,sp
-	push	bx		! room for 8087 status word
-	xor	cx,cx
-	wait
-	fldd	10(bx)
-	wait
-	fldd	2(bx)
-	wait
-	fcompp			! compare and pop operands
-	wait
-	fstsw	-2(bx)
-	wait
-	mov	ax,-2(bx)
-	sahf
-	je	1f
-	jb	2f
-	dec	cx
-	jmp	1f
-2:
-	inc	cx
-1:
-	mov	ax,cx
-	pop	bx
-	ret
Index: trunk/minix/lib/i86/em/em_gto.s
===================================================================
--- trunk/minix/lib/i86/em/em_gto.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.define .gto
-.text
-
-.gto:
-	mov     bp,4(bx)
-	mov     sp,2(bx)
-	jmp     @(bx)
Index: trunk/minix/lib/i86/em/em_hol0.s
===================================================================
--- trunk/minix/lib/i86/em/em_hol0.s	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-.define hol0
-.data
-hol0:
-	.data2	0, 0
-	.data2	0, 0
Index: trunk/minix/lib/i86/em/em_iaar.s
===================================================================
--- trunk/minix/lib/i86/em/em_iaar.s	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-.define .iaar
-.text
-
-.iaar:
-	pop     cx
-	pop     dx
-	cmp     dx,#2
-.extern .unknown
-	jne     .unknown
-	pop     bx      ! descriptor address
-	pop     ax      ! index
-	sub     ax,(bx)
-	mul     4(bx)
-	pop     bx      ! array base
-	add     bx,ax
-	push	cx
-	ret
Index: trunk/minix/lib/i86/em/em_ilar.s
===================================================================
--- trunk/minix/lib/i86/em/em_ilar.s	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-.define .ilar
-.text
-
-.ilar:
-	pop     cx
-	pop     dx
-.extern .unknown
-	cmp     dx,#2
-	jne     .unknown
-	pop     bx      ! descriptor address
-	pop     ax      ! index
-	push    cx
-.extern .lar2
-	jmp    .lar2
Index: trunk/minix/lib/i86/em/em_inn.s
===================================================================
--- trunk/minix/lib/i86/em/em_inn.s	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-.define .inn
-.text
-
-	! #bytes in cx
-	! bit # in ax
-.inn:
-	xor     dx,dx
-	mov     bx,#8
-	div     bx
-	mov     bx,sp
-	add	bx,#2
-	add     bx,ax
-	cmp     ax,cx
-	jae     1f
-	movb	al,(bx)
-	mov	bx,dx
-	testb   al,bits(bx)
-	jz      1f
-	mov	ax,#1
-	jmp	2f
-1:
-	xor	ax,ax
-2:
-	pop	bx
-	add     sp,cx
-	! ax is result
-	jmp     (bx)
-
-	.data
-bits:
-	.data1 1,2,4,8,16,32,64,128
Index: trunk/minix/lib/i86/em/em_ior.s
===================================================================
--- trunk/minix/lib/i86/em/em_ior.s	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-.define	.ior
-.text
-
-	! #bytes in cx
-.ior:
-	pop	bx		! return address
-	mov	dx,di
-	mov	di,sp
-	add	di,cx
-	sar	cx,#1
-1:
-	pop	ax
-	or	ax,(di)
-	stos
-	loop	1b
-	mov	di,dx
-	jmp	(bx)
Index: trunk/minix/lib/i86/em/em_isar.s
===================================================================
--- trunk/minix/lib/i86/em/em_isar.s	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-.define .isar
-.text
-
-.isar:
-	pop     cx
-	pop     ax
-	cmp     ax,#2
-.extern .unknown
-	jne     .unknown
-	pop     bx      ! descriptor address
-	pop     ax      ! index
-	push    cx
-.extern .sar2
-	jmp    .sar2
Index: trunk/minix/lib/i86/em/em_lar2.s
===================================================================
--- trunk/minix/lib/i86/em/em_lar2.s	(revision 9)
+++ 	(revision )
@@ -1,35 +1,0 @@
-.define .lar2
-.text
-
-.lar2:
-				! bx, descriptor address
-				! ax, index
-	pop	cx
-	pop	dx		! base address
-	push	cx
-	push	si
-	mov	si,dx
-	sub     ax,(bx)
-	mov     cx,4(bx)
-	imul    cx
-	add     si,ax
-	sar     cx,#1
-	jnb     1f
-	xorb    ah,ah
-	lodsb
-	pop	si
-	pop	bx
-	push    ax
-	jmp     (bx)
-1:
-	pop	dx		! saved si
-	mov	ax,4(bx)
-	pop	bx		! return address
-	sub     sp,ax
-	mov	ax,di		! save di
-	mov     di,sp
-	rep
-	mov
-	mov	di,ax
-	mov	si,dx
-	jmp     (bx)
Index: trunk/minix/lib/i86/em/em_lfr6.s
===================================================================
--- trunk/minix/lib/i86/em/em_lfr6.s	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-.define .lfr6
-.text
-.extern .retarea
-
-.lfr6:
-	pop	bx
-	push	.retarea+4
-	push	.retarea+2
-	push	.retarea
-	jmp	(bx)
Index: trunk/minix/lib/i86/em/em_lfr8.s
===================================================================
--- trunk/minix/lib/i86/em/em_lfr8.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.define .lfr8
-.text
-.extern .retarea
-
-.lfr8:
-	pop	bx
-	push	.retarea+6
-	push	.retarea+4
-	push	.retarea+2
-	push	.retarea
-	jmp	(bx)
Index: trunk/minix/lib/i86/em/em_loi.s
===================================================================
--- trunk/minix/lib/i86/em/em_loi.s	(revision 9)
+++ 	(revision )
@@ -1,38 +1,0 @@
-.define .loi
-.define .los
-.text
-
-	! #bytes in cx
-	! address in bx
-	! save si/di. they might be register variables
-.los:
-	mov	dx,si
-	mov	si,bx
-	pop	bx
-	mov	ax,cx
-	sar	cx,#1
-	jnb	1f
-	xorb	ah,ah
-	lodsb
-	mov	si,dx
-	push	ax
-	jmp	(bx)
-1:
-	sub	sp,ax
-	jmp	1f
-
-.loi:
-	! only called with size > 4
-	mov	dx,si
-	mov	si,bx
-	pop     bx
-	sub     sp,cx
-	sar     cx,#1
-1:
-	mov	ax,di
-	mov     di,sp
-	rep
-	mov
-	mov	si,dx
-	mov	di,ax
-	jmp     (bx)
Index: trunk/minix/lib/i86/em/em_mli4.s
===================================================================
--- trunk/minix/lib/i86/em/em_mli4.s	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-.define .mli4
-.text
-
-yl=2
-yh=4
-	! x * y
-	! xl in ax
-	! xh in dx
-
-.mli4:
-	mov	bx,sp
-	push	dx
-	mov	cx,ax
-	mul	yh(bx)           ! xl*yh
-	pop	dx
-	push	ax
-	mov	ax,dx
-	mul	yl(bx)		! xh * yl
-	pop	dx
-	add     dx,ax           ! xh*yl+xl*yh
-	mov     ax,cx
-	mov	cx,dx
-	mul     yl(bx)           ! xl*yl
-	add     dx,cx
-	ret	4
Index: trunk/minix/lib/i86/em/em_mon.s
===================================================================
--- trunk/minix/lib/i86/em/em_mon.s	(revision 9)
+++ 	(revision )
@@ -1,6 +1,0 @@
-.define .mon
-.text
-
-.mon:
-.extern .stop
-	call    .stop
Index: trunk/minix/lib/i86/em/em_nop.s
===================================================================
--- trunk/minix/lib/i86/em/em_nop.s	(revision 9)
+++ 	(revision )
@@ -1,4 +1,0 @@
-.define .nop
-.text
-.nop:
-	ret
Index: trunk/minix/lib/i86/em/em_rck.s
===================================================================
--- trunk/minix/lib/i86/em/em_rck.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-.define .rck
-.text
-
-	! descriptor address in bx
-	! value in ax, must be left there
-.rck:
-	cmp     ax,(bx)
-	jl      2f
-	cmp     ax,2(bx)
-	jg      2f
-	ret
-2:
-	push    ax
-ERANGE = 1
-.extern .error
-	mov     ax,#ERANGE
-	call    .error
-	pop     ax
-	ret
Index: trunk/minix/lib/i86/em/em_ret6.s
===================================================================
--- trunk/minix/lib/i86/em/em_ret6.s	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-.define .ret6
-.text
-.extern .retarea
-
-.ret6:
-	pop	bx
-	pop	.retarea
-	pop	.retarea+2
-	pop	.retarea+4
-	jmp	(bx)
Index: trunk/minix/lib/i86/em/em_ret8.s
===================================================================
--- trunk/minix/lib/i86/em/em_ret8.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.define .ret8
-.text
-.extern .retarea
-
-.ret8:
-	pop	bx
-	pop	.retarea
-	pop	.retarea+2
-	pop	.retarea+4
-	pop	.retarea+6
-	jmp	(bx)
Index: trunk/minix/lib/i86/em/em_retarea.s
===================================================================
--- trunk/minix/lib/i86/em/em_retarea.s	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-.define .retarea
-
-.bss
-.retarea:
-	.zerow 8/2
Index: trunk/minix/lib/i86/em/em_return.s
===================================================================
--- trunk/minix/lib/i86/em/em_return.s	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-.define .sdret, .dsret, .sret, .dret, .cret 
-.text
-
-.dsret:
-	pop	di
-.sret:
-	pop	si
-.cret:
-	mov	sp,bp
-	pop	bp
-	ret
-
-.sdret:
-	pop	si
-.dret:
-	pop	di
-	jmp	.cret
Index: trunk/minix/lib/i86/em/em_rmi4.s
===================================================================
--- trunk/minix/lib/i86/em/em_rmi4.s	(revision 9)
+++ 	(revision )
@@ -1,89 +1,0 @@
-.define .rmi4
-.text
-
-yl=6
-yh=8
-xl=10
-xh=12
-
-.rmi4:
-	push	si
-	push	di
-	mov     si,sp           ! copy of sp
-	mov     bx,yl(si)
-	mov     ax,yh(si)
-	cwd
-	cmp     dx,ax
-	jne     7f
-	and     dx,dx
-	jge     1f
-	neg     bx
-	je      7f
-1:
-	xor     dx,dx
-	mov     cx,xl(si)
-	mov     ax,xh(si)
-	and     ax,ax
-	jge     2f
-	neg     ax
-	neg     cx
-	sbb     ax,dx
-2:
-	div     bx
-	xchg    ax,cx
-	div     bx              ! dx= result(low), 0=result(high)
-	xor     bx,bx
-9:
-	cmp     xh(si),#0
-	jge     1f
-	neg     bx
-	neg     dx
-	sbb     bx,#0
-1:
-			! bx is high order result
-			! dx is low order result
-	mov	ax,dx
-	mov	dx,bx	! result in ax/dx
-	pop	di
-	pop	si
-	ret	8
-
-7:
-	mov     di,ax
-	xor     bx,bx
-	and     di,di
-	jge     1f
-	neg     di
-	neg     yl(si)
-	sbb     di,bx
-1:
-	mov     ax,xl(si)
-	mov     dx,xh(si)
-	and     dx,dx
-	jge     1f
-	neg     dx
-	neg     ax
-	sbb     dx,bx
-1:
-	mov     cx,#16
-1:
-	shl     ax,#1
-	rcl     dx,#1
-	rcl     bx,#1
-	cmp     di,bx
-	ja      3f
-	jb      2f
-	cmp     yl(si),dx
-	jbe     2f
-3:
-	loop    1b
-		! dx=result(low), bx=result(high)
-	jmp     9b
-2:
-	sub     dx,yl(si)
-	sbb     bx,di
-	inc     ax
-	loop    1b
-1:
-		! dx=result(low), bx=result(high)
-	jmp     9b
Index: trunk/minix/lib/i86/em/em_rmu4.s
===================================================================
--- trunk/minix/lib/i86/em/em_rmu4.s	(revision 9)
+++ 	(revision )
@@ -1,61 +1,0 @@
-.define .rmu4
-.text
-
-yl=6
-yh=8
-xl=10
-xh=12
-
-.rmu4:
-	push	si
-	push	di
-	mov     si,sp           ! copy of sp
-	mov     bx,yl(si)
-	mov     ax,yh(si)
-	or      ax,ax
-	jne     7f
-1:
-	xor     dx,dx
-	mov     cx,xl(si)
-	mov     ax,xh(si)
-2:
-	div     bx
-	xchg    ax,cx
-	div     bx
-	xor     bx,bx
-9:
-			! bx is high order result
-			! dx is low order result
-	mov	ax,dx
-	mov	dx,bx
-	pop	di
-	pop	si
-	ret	8	! result in ax/dx
-
-7:
-	mov     di,ax
-	xor     bx,bx
-	mov     ax,xl(si)
-	mov     dx,xh(si)
-	mov     cx,#16
-1:
-	shl     ax,#1
-	rcl     dx,#1
-	rcl     bx,#1
-	cmp     di,bx
-	ja      3f
-	jb      2f
-	cmp     yl(si),dx
-	jbe     2f
-3:
-	loop    1b
-		! dx=result(low), bx=result(high)
-	jmp     9b
-2:
-	sub     dx,yl(si)
-	sbb     bx,di
-	inc     ax
-	loop    1b
-1:
-		! dx=result(low), bx=result(high)
-	jmp     9b
Index: trunk/minix/lib/i86/em/em_sar2.s
===================================================================
--- trunk/minix/lib/i86/em/em_sar2.s	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-.define .sar2
-.text
-
-.sar2:
-				! bx, descriptor address
-				! ax, index
-	pop	cx
-	pop	dx		! base address
-	push	cx
-	xchg	di,dx		! di = base address, dx is saved di
-	sub     ax,(bx)
-	mov     cx,4(bx)
-	push	dx
-	imul    cx
-	pop	dx
-	add     di,ax
-	sar     cx,#1
-	jnb     1f
-	pop	bx
-	pop     ax
-	stosb
-	mov	di,dx
-	jmp     (bx)
-1:
-	pop	bx
-	mov	ax,si
-	mov     si,sp
-	rep
-	mov
-	mov     sp,si
-	mov	si,ax
-	mov	di,dx
-	jmp     (bx)
Index: trunk/minix/lib/i86/em/em_sbi.s
===================================================================
--- trunk/minix/lib/i86/em/em_sbi.s	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-.define .sbi
-.text
-
-	! #bytes in cx , top of stack in ax
-.sbi:
-	pop     bx              ! return subress
-	cmp     cx,#2
-	jne     1f
-	pop     cx
-	sub     ax,cx
-	neg     ax
-	jmp     (bx)
-1:
-	cmp     cx,#4
-	jne     9f
-	pop     dx
-	pop     cx
-	sub     cx,ax
-	mov     ax,cx
-	pop     cx
-	sbb     cx,dx
-	push    cx
-	jmp     (bx)
-9:
-.extern .trpilin
-	push    bx
-	jmp     .trpilin
Index: trunk/minix/lib/i86/em/em_set.s
===================================================================
--- trunk/minix/lib/i86/em/em_set.s	(revision 9)
+++ 	(revision )
@@ -1,43 +1,0 @@
-.define .set
-.text
-
-	! #bytes in cx
-	! bit # in ax
-.set:
-	pop     bx              ! return address
-	xor     dx,dx
-!ifdef create set
-	sub	sp,cx
-	push	bx
-	push	di
-	mov     bx,sp
-	xor	di,di
-	sar	cx,#1
-1:
-	mov     4(bx)(di),dx
-	inc	di
-	inc	di
-	loop	1b
-!endif
-	mov     bx,#8
-	div     bx
-	cmp     ax,di
-	jae     2f
-	mov	di,dx
-	movb	dl,bits(di)
-	mov     di,sp
-	add     di,ax
-	orb     4(di),dl
-	pop	di
-	ret
-2:
-ESET = 2
-.extern .error
-	pop	di
-	mov     ax,#ESET
-	call	.error
-	ret
-
-	.data
-bits:
-	.data1   1,2,4,8,16,32,64,128
Index: trunk/minix/lib/i86/em/em_stb.s
===================================================================
--- trunk/minix/lib/i86/em/em_stb.s	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-.define ___stb
-.text
-
-	! Routine for copying structs.
-___stb:
-	mov	bx,sp
-	push	si
-	push	di
-	mov	cx,2(bx)
-	mov	si,4(bx)
-	mov	di,6(bx)
-	rep
-	movb
-	pop	di
-	pop	si
-	ret
Index: trunk/minix/lib/i86/em/em_sti.s
===================================================================
--- trunk/minix/lib/i86/em/em_sti.s	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-.define .sti
-.define .sts
-.text
-
-	! #bytes in cx
-	! address in bx
-	! save di/si. they might be register variables
-.sts:
-	mov	dx,di		! save di
-	mov	di,bx
-	pop     bx              ! return address
-	sar     cx,#1
-	jnb     1f
-	pop     ax
-	stosb
-	mov	di,dx
-	jmp     (bx)
-.sti:
-	! only called with count > 4
-	mov	dx,di
-	mov	di,bx
-	pop	bx
-	sar	cx,#1
-1:
-	mov	ax,si
-	mov     si,sp
-	rep
-	mov
-	mov     sp,si
-	mov	di,dx
-	mov	si,ax
-	jmp     (bx)
Index: trunk/minix/lib/i86/em/em_stop.s
===================================================================
--- trunk/minix/lib/i86/em/em_stop.s	(revision 9)
+++ 	(revision )
@@ -1,4 +1,0 @@
-.define .stop
-.text
-.stop:
-	call	__exit
Index: trunk/minix/lib/i86/em/em_trp.s
===================================================================
--- trunk/minix/lib/i86/em/em_trp.s	(revision 9)
+++ 	(revision )
@@ -1,138 +1,0 @@
-.define .trpdivz
-.define .trpilin
-.define .trpcase
-.define .trprang
-.define .trpset
-.define .trpnofp
-.define .trpheap
-.define .trp
-
-.bss
-.M: .zerow 24/2
-
-.text
-.extern .trpdivz
-.extern .trpilin
-.extern .trpcase
-.extern .trprang
-.extern .trpset
-.extern .trpnofp
-.extern .trpheap
-.extern .trp
-
-.trpdivz:
-mov ax,#6
-mov dx,#.Mdivz
-jmp .Trp
-.trpilin:
-mov ax,#18
-mov dx,#.Milin
-jmp .Trp
-.trpcase:
-mov ax,#20
-mov dx,#.Mcase
-jmp .Trp
-.trprang:
-mov ax,#1
-mov dx,#.Mrang
-jmp .Trp
-.trpset:
-mov ax,#2
-mov dx,#.Mset
-jmp .Trp
-.trpnofp:
-mov ax,#18
-mov dx,#.Mnofp
-jmp .Trp
-.trpheap:
-mov ax,#17
-mov dx,#.Mheap
-jmp .Trp
-
-.Trp:
-xor     bx,bx
-.extern .trppc
-xchg    bx,.trppc
-test    bx,bx
-jz      2f
-push    ax
-call    (bx)
-pop     ax
-ret
-2:
-mov bx,#22
-push bx
-push dx
-mov ax,#2
-push ax
-call .Write
-call __exit
-
-.trp:
-mov dx,ax
-cmp dx,#21
-jae 1f
-sal dx,#1
-mov bx,#.Mtable
-add bx,dx
-mov bx,(bx)
-test bx,bx
-jz 1f
-mov dx,bx
-jmp 2f
-1:
-mov bx,#.Mtrp+14
-mov cx,#6
-mov dx,ax
-1:
-and dx,#7
-add dx,'0'
-movb (bx),dl
-dec bx
-sar dx,#1
-sar dx,#1
-sar dx,#1
-loop 1b
-mov dx,#.Mtrp
-2:
-jmp .Trp
-
-.Write:
-push bp
-mov bp,sp
-mov .M+2,#4
-mov bx,4(bp)
-mov .M+4,bx
-mov bx,8(bp)
-mov .M+6,bx
-mov bx,6(bp)
-mov .M+10,bx
-mov ax,#.M
-push ax
-mov ax,#1
-push ax
-
-mov ax,#1
-mov bx,#.M
-mov cx,#3
-int 32
-mov sp,bp
-pop bp
-ret
-
-
-.data
-.Mtable:
-	.data2 0,	.Mrang,	.Mset,	0,	0,	0,	.Mdivz,	0
-	.data2 0,	0,	0,	0,	0,	0,	0,	0
-	.data2 0,	.Mheap,	.Milin,	.Milin,	.Mcase
-
-.Mdivz: .asciz "Error: Division by 0 \n"
-.Milin: .asciz "Illegal EM instruct'n\n"
-.Mcase: .asciz "Err in EM case instr \n"
-.Mrang: .asciz "Variable out of range\n"
-.Mset:  .asciz "Err in EM set instr  \n"
-.Mnofp: .asciz "Floating pt not impl.\n"
-.Mheap: .asciz "Heap overflow        \n"
-
-.Mtrp:	.asciz "EM trap 0000000 octal\n"
Index: trunk/minix/lib/i86/em/em_unknown.s
===================================================================
--- trunk/minix/lib/i86/em/em_unknown.s	(revision 9)
+++ 	(revision )
@@ -1,9 +1,0 @@
-.define .unknown
-.text
-.extern .fat
-EILLINS = 18
-
-.unknown:
-	mov  ax,#EILLINS
-	push ax
-	jmp  .fat
Index: trunk/minix/lib/i86/em/em_vars.s
===================================================================
--- trunk/minix/lib/i86/em/em_vars.s	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-.define .reghp, .limhp, .ignmask, .trppc
-.extern .reghp, .limhp, .ignmask, .trppc
-
-.data
-.reghp:
-	.data2   endbss
-.limhp:
-	.data2   endbss
-.ignmask:
-	.data2   1336
-.trppc:
-	.data2   0
Index: trunk/minix/lib/i86/em/em_xor.s
===================================================================
--- trunk/minix/lib/i86/em/em_xor.s	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-.define	.xor
-.text
-
-	! #bytes in cx
-.xor:
-	pop	bx		! return address
-	mov	dx,di
-	mov	di,sp
-	add	di,cx
-	sar	cx,#1
-1:
-	pop	ax
-	xor	ax,(di)
-	stos
-	loop	1b
-	mov	di,dx
-	jmp	(bx)
