
on va dire qu'il l'a mal implantée

;detect the hardware version ;Thanks to Julien Muchembled for the C version listed in the TI-GCC FAQ. ;Converted to assembly by Kevin Kofler GetHardModel: move.l ($c8).w,d0 andi.l #$600000,d0 ;get the ROM base movea.l d0,a0 moveq.l #1,d0 movea.l 260(a0),a1 ;get the pointer to the hardware parameter block adda.l #$10000,a0 cmpa.l a0,a1 ;check if the hardware parameter block is near enough bcc.s hw1 ;if it is too far, it is HW1 cmpi.w #22,(a1) ;check if the parameter block contains the hardware version bls.s hw1 ;if it is too small, it is HW1 cmpi.l #2,22(a1) ;check the hardware version bne.s hw1 ;if not 2, it is HW1 (or an unknown hardware version) moveq.l #2,d0 hw1: rts ;end of hardware version detection routine