

vous montrerai une des miennes ac fargray

Bon, voilà le patch promis: --- ../ints.asm Tue Feb 29 20:31:52 2000 +++ ints.asm Mon Feb 18 11:38:26 2002 @@ -166,38 +166,81 @@ trap #0 ; Call the original trap #0 move.w #$0000,SR ; User Mode movem.l d0-d7/a0-a6,-(a7) ; Push all registers - pea ($0F00).w ; Push SCREEN size + move.l $2C,-(a7) ; Save Line1111 vector + lea new1111(Pc),a0 ; Get the address of the PreOs Line1111 vector + move.l a0,$4002C ; Replace the Line1111 vector + clr.w -(a7) ; Get rid of SHIFT indicator NOW (else the + ROM_THROW ST_modKey ; auto-int 1 will do it, but too late) + addq.w #2,a7 + pea ($0F00+60).w ; Push SCREEN size + 60 bytes for supervisor stack saving ROM_THROW HeapAllocPtr ; Allocate a block to save the screen move.l a0,(a7) ; Save a0 and test if a0 == NULL - beq.s \end2 - lea (LCD_MEM).w,a1 ; Copy the LCD_MEM into the buffer - move.w #$0F00/4-1,d0 ; Buffer size / 4 (Longword copy) + beq \end2 + lea (LCD_MEM-60).w,a1 ; Copy the LCD_MEM - 60 bytes into the buffer + move.w #($0F00+60)/4-1,d0 ; Buffer size / 4 (Longword copy) \loop move.l (a1)+,(a0)+ dbf d0,\loop - ROM_THROW FontGetSys ; Save current Font System + ROM_THROW FontGetSys ; Save current Font System move.w d0,-(a7) - lea doors_str(Pc),a0 - bsr find_lib ; Find File 'doors' - move.l a0,d0 + clr.w -(a7) + pea.l tictex_str(Pc) + ROM_THROW SymFindPtr ; Find File 'tictex' + move.w 12(a0),(a7) + move.w (a7),2(a7) + ROM_THROW HeapDeref + addq.l #2,a7 + cmp.l #$200000,a0 + bcc.s \notlocked + ROM_THROW HeapGetLock + tst.w d0 + beq.s \notlocked + addq.l #4,a7 + bra.s \end +\notlocked clr.l (a7) + pea.l tictex_str(Pc) + ROM_THROW EM_twinSymFromExtMem ; Find File 'tictex' + addq.l #8,a7 + tst.l d0 beq.s \end - HW2TSR_PATCH a0,d0 ; Patch the file + move.l d0,-(a7) + ROM_THROW DerefSym + move.w 12(a0),-(a7) + move.w (a7),4(a7) + ROM_THROW HLock + HW2TSR_PATCH a0,d0 ; Patch the address + lea.l 2(a0),a1 + move.l a1,(a7) + moveq.l #0,d0 + move.w (a0),d0 + pea.l 1(a0,d0.l) + pea.l (a1) + ROM_THROW EX_patch ; Patch the file + addq.l #8,a7 + move.l (a7)+,a0 jsr (a0) ; Execute + nop ; Ignore RETURN_VALUE + nop + nop + ROM_THROW HeapUnlock + addq.l #2,a7 \end ROM_THROW FontSetSys ; Restore current Font System addq.l #2,a7 move.l (a7),a0 - lea (LCD_MEM).w,a1 ; Restore the LCD_MEM - move.w #$0F00/4-1,d0 ; Buffer size / 4 (Longword copy) + lea (LCD_MEM-60).w,a1 ; Restore the LCD_MEM and 60 bytes supervisor stack + move.w #($0F00+60)/4-1,d0 ; Buffer size / 4 (Longword copy) \loop2 move.l (a0)+,(a1)+ dbf d0,\loop2 ROM_THROW HeapFreePtr \end2 addq.l #4,a7 ROM_THROW OSClearBreak + move.l (a7)+,$4002c ; Restore the Line1111 vector movem.l (a7)+,d0-d7/a0-a6 ; restore all registers trap #12 ; Supervisor mode clr.l ($4004C) ; Efface la copie (On peut reutiliser le SHIFT+ON) rte -doors_str dc.b "doors",0 + dc.b 0,"main\tictex" +tictex_str dc.b 0 ;TiHomeS