Re: A89: Re: HW detection
[Prev][Next][Index][Thread]
Re: A89: Re: HW detection
Hi!
> Thanks a lot for the routine, in fact it was for an assembly
> program, so I didn't read the faq (shame on me :))
Or the same in ASM (d1 will contain the HW version):
hwtest: move.l $C8,d1
and.l #$600000,d1
move.l d1,a1
move.l 260(a1),a0
move.l a0,d0
sub.l d1,d0
moveq #1,%d1
cmp.l #0xFFFF,d0
bhi.s hwend
cmpi.w #$16,(a0)
bls.s hwend
move.l $16(a0),d1
hwend: rts
It seems to me that ASM version in this example is even much
more readable that the original C code, due to too many casting
in the original C code.
Cheers,
Zeljko Juric