
Si c l'anti-crash, ce serait sympa de mettre un flag "pas d'anticrash" (qu'on pourrait d'ailleurs activer/désactiver on-calc dans un shell) pour ne pas ralentir les progs stables (et puis y a quand même l'anticrash nostub

; Restore handle table move.l RAM_TABLE+$11*4(Pc),a2 ; a2 = Heap Table move.l (a2),a2 move.l sp,a3 ; A3 = save table move.w #MAX_HANDLES-1,d5 ; d5 = number of handles clr.b d4 ; d4 = bit number = 0 clr.w d3 ; d3 = handle number = 0 loop tst.l (a2)+ ; handle is allocated ? beq.s OK ; NO -> OK btst.b d4,(a3) ; -> handle was not allocated before ? bne.s OK ; was allocated before -> OK move.w d3,d0 bsr kernel::Hd2Sym ; Then see if this handle is in VAT (it is a file or a folder) move.l a0,d0 ; Test if Null bne.s OK move.w d3,-(a7) ROM_THROW HeapFree addq.w #2,a7 OK addq.w #1,d3 ; increase handle number addq.b #1,d4 ; increase bit number cmpi.b #8,d4 ; bit number == 8 ? bne.s next addq.l #1,a3 ; -> go to next byte in handle-info-table clr.b d4 ; -> go to first bit within this byte next dbf d5,loop