Et là ?
--- Vectors.asm.old 2009-07-16 20:41:31.000000000 +0200
+++ Vectors.asm 2009-07-22 20:51:58.000000000 +0200
@@ -147,38 +147,57 @@
; ROM_CALL avec un word.
; Example: dc.w $FFF2, HeapAlloc*4
LINE_1111:
- move.w (sp)+,d1 ; Get Old SR
- move.l (sp)+,a0 ; Get Address of the 'crash'
- move.w (a0)+,d0 ; We get the instruction and a0 ->next instruction
- subi.w #$F800,d0 ; Is it > $F800 ?
+ move.w (sp)+,d2 ; Get Old SR
+ move.l (sp)+,a1 ; Get Address of the 'crash'
+ move.w d2,SR ; Restore SR
+ move.w (a1)+,d2 ; We get the instruction and a0 ->next instruction
+ cmpi.w #$F800,d2
bls.s \no ; No, so it is a crash (First_Window isn't a ROM_CALL)
- move.l a0,a1 ; Jsr/Jmp with a 32 bits offset
- cmp.w #$FFF0-$F800,d0
+ subi.w #$F800,d2
+ move.l a1,a0 ; Jsr/Jmp with a 32 bits offset
+ cmp.w #$FFF0-$F800,d2
bne.s \NoRelJsr
- adda.l (a0)+,a1 ; Get the Sub Routine
+ adda.l (a1)+,a0 ; Get the Sub Routine
bra.s \Jump
-\NoRelJsr cmp.w #$FFF1-$F800,d0
+\NoRelJsr cmp.w #$FFF1-$F800,d2
bne.s \NoRelJmp
- adda.l (a0)+,a1 ; Get the Sub Routine
- move.w d1,SR ; Restore SR
- jmp (a1) ; Jmp with a 32 bits offset
-\NoRelJmp cmp.w #$FFF2-$F800,d0
+ adda.l (a1)+,a0 ; Get the Sub Routine
+ jmp (a0) ; Jmp with a 32 bits offset
+\NoRelJmp cmp.w #$FFF2-$F800,d2
bne.s \NoBigRomCall
- move.w (a0)+,d0 ; Read Offset
- lsr.w #2,d0
-\NoBigRomCall move.l ($C8).w,a1 ; The address of the rom_call table
- cmp.w -(a1),d0 ; Compare rom_call and number of entries
- bcc.s \no ; Out of range ? => Crash
- move.w d0,(VAR_SYSTEM1).w ; For debug purpose
- lsl.w #2,d0 ; * 4
- move.l 2(a1,d0.w),a1 ; + ($C8) MAX: 8000 rom_calls
-\Jump move.w d1,SR ; Restore SR
- pea (a0) ; Push return address
- jmp (a1) ; Jump to Rom_call function
-\no: lea Line1111_str(Pc),a0
+ move.w (a1)+,d2 ; Read Offset
+ lsr.w #2,d2
+\NoBigRomCall move.l ($C8).w,a0 ; The address of the rom_call table
+ cmp.w -(a0),d2 ; Compare rom_call and number of entries
+ bcc.s \error ; Out of range ? => Crash
+ move.w d2,(VAR_SYSTEM1).w ; For debug purpose
+ lsl.w #2,d2 ; * 4
+ move.l 2(a0,d2.w),a0 ; + ($C8) MAX: 8000 rom_calls
+\Jump pea (a1) ; Push return address
+ jmp (a0) ; Jump to Rom_call function
+\no: subi.w #$F000,d2 ; Clear data of exception
+ cmpi.w #MAX_RAMCALL,d2 ; Valid ramcall ?
+ bcc.s \error ; No, throw an error
+ pea (a1) ; Push return adress
+ lsl.w #2,d2 ; Table of longwords
+ lea.l RAM_TABLE(pc),a1 ; Read the ramcall table ptr
+ adda.w d2,a1 ; Add offset : a0 now points to the ramcall
+ movea.l (a1),a1 ; Read it
+ lsr.w #2,d2 ; Table of bytes
+ move.b RAM_TABLE_TYPE(pc,d2.w),d2 ; Red type of ramcall (table of bytes)
+ bmi.s \ReturnPtr ; -1 : return a ptr in a0
+ beq.s \ReturnData ; 0 : return data in d0
+ jmp (a1) ; 1 : else jump to the function
+\ReturnData: move.l a1,d0 ; Data must be in d0
+\ReturnPtr: movea.l a1,a0 ; Else it's a ptr, put it in a0
+ rts
+\error: lea Line1111_str(Pc),a0
bra FATAL_ERROR
-
+RAM_TABLE_TYPE ; -1 : ptr. 0 : data. +1 : routine
+ dc.b -1,0,0,-1,0,0,0,0,0,0,0,0,0,-1,-1,0,-1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,1,0,0,0,0,0,1,1,1,1,-1,-1,-1
+
+
Trap_7:
Trap_8:
Trap_10: ; Enter self test
Bon, par contre, j'ai un system corrupted au boot, mais après ça rentre dans l'ordre. C'est pas très grave, hein ?

kernel::exec marche, kernel::exit aussi (mais bizarement pour ce dernier, il me sort une "unknown error", je sais pas pourquoi mais c'est ptêt de ma faute encore)