make trap handling more consistent
authorceriel <none@none>
Wed, 13 Jul 1988 14:29:32 +0000 (14:29 +0000)
committerceriel <none@none>
Wed, 13 Jul 1988 14:29:32 +0000 (14:29 +0000)
16 files changed:
mach/i86/libem/adi.s
mach/i86/libem/dvi.s
mach/i86/libem/dvu.s
mach/i86/libem/error.s
mach/i86/libem/fakfp.s
mach/i86/libem/mli.s
mach/i86/libem/ngi.s
mach/i86/libem/rmi.s
mach/i86/libem/rmu.s
mach/i86/libem/rol.s
mach/i86/libem/ror.s
mach/i86/libem/sbi.s
mach/i86/libem/set.s
mach/i86/libem/sli.s
mach/i86/libem/sri.s
mach/i86/libem/strhp.s

index 88f12a2..b76949a 100644 (file)
@@ -24,5 +24,5 @@
 .extern        EODDZ
 .extern .trp
        mov     ax,EODDZ
-       push    ax
+       push    bx
        jmp     .trp
index 9fa8470..e09c98d 100644 (file)
@@ -35,5 +35,5 @@
 .extern EODDZ
 .extern .trp
         mov     ax,EODDZ
-        push    ax
+        push    bx
         jmp     .trp
index ba56315..45f73a1 100644 (file)
@@ -35,5 +35,5 @@
 .extern EODDZ
 .extern .trp
        mov     ax,EODDZ
-       push    ax
+       push    bx
        jmp     .trp
index dedc9df..49194d6 100644 (file)
@@ -1,5 +1,6 @@
 .sect .text; .sect .rom; .sect .data; .sect .bss
 .define .error
+.define .Xtrp
 
        ! ax is trap number
        ! all registers must be saved
        pop  si
        pop  bp
        ret
+
+.Xtrp:
+       cmp     ax,16
+       jge     1f
+       call    .error
+       ret
+1:
+       jmp     .trp
index f3a62a3..bffaea3 100644 (file)
@@ -35,5 +35,4 @@
 .cmf4:
 .cmf8:
        mov     ax,18   ! illegal instruction EILLINS
-       call    .trp
-       ret
+       jmp     .trp
index a8dbe3d..eb0b800 100644 (file)
@@ -38,5 +38,5 @@
 .extern EODDZ
 .extern .trp
        mov     ax,EODDZ
-       push    ax
+       push    bx
        jmp     .trp
index ce45895..49061e1 100644 (file)
@@ -26,5 +26,5 @@
 .extern EODDZ
 .extern .trp
        mov     ax,EODDZ
-       push    ax
+       push    bx
        jmp     .trp
index e3c5087..43bde9f 100644 (file)
@@ -35,5 +35,5 @@
 .extern EODDZ
 .extern .trp
        mov     ax,EODDZ
-       push    ax
+       push    bx
        jmp     .trp
index a026148..4ed9972 100644 (file)
@@ -35,5 +35,5 @@
 .extern EODDZ
 .extern .trp
        mov     ax,EODDZ
-       push    ax
+       push    bx
        jmp     .trp
index df86299..2b2af4f 100644 (file)
@@ -32,5 +32,5 @@
 .extern EODDZ
 .extern .trp
        mov     ax,EODDZ
-       push    ax
+       push    dx
        jmp     .trp
index ea1183c..d92069c 100644 (file)
@@ -33,5 +33,5 @@
 .extern EODDZ
 .extern .trp
        mov     ax,EODDZ
-       push    ax
+       push    dx
        jmp     .trp
index 13018ff..f5c81eb 100644 (file)
@@ -26,5 +26,5 @@
 .extern EODDZ
 .extern .trp
        mov     ax,EODDZ
-       push    ax
+       push    bx
        jmp     .trp
index 4bc6832..2a030b8 100644 (file)
@@ -35,7 +35,6 @@
 .extern .trp
        pop     di
        mov     ax,ESET
-       push    ax
        jmp     .trp
 
        .sect .data
index b8b0f1e..4c4f98c 100644 (file)
@@ -31,5 +31,5 @@
 .extern EODDZ
 .extern .trp
        mov     ax,EODDZ
-       push    ax
+       push    dx
        jmp     .trp
index 1566ac3..e3e623a 100644 (file)
@@ -31,5 +31,5 @@
 .extern EODDZ
 .extern .trp
        mov     ax,EODDZ
-       push    ax
+       push    dx
        jmp     .trp
index 601f467..c8898f0 100644 (file)
        add     ax,02000
        and     ax,~0777
        mov     (.limhp),ax
+       push    bx
        push    ax
        call    _brk
-       or      ax,ax
-       jne     2f
+       pop     cx
+       pop     bx
+       cmp     ax,-1
+       je      2f
 1:
        jmp     bx
 2:
        mov     ax,EHEAP
-       push    ax
-       call    .trp
-       jmp     bx
+       push    bx
+       jmp     .trp