I don't know whether this method would work under MagicMac etc. as it directly reads an OS variable (but I guess it would, as lots of progs access this)
detect_falcon:
move.l $4f2,a0 ; get OS version
move.w 2(a0),d1
cmpi.w #$400,d1
blt nope
yep:
If you are writting a GEM application, you should probably not use either
of these methods, but simply test the AES version - global[0]. AES 3.30
or greater means it has a Falcon capable AES (but not necessarily a
Falcon).
check_MCHcookie
move.l $5a0,a0 address of cookie jar
beq not_falc if 0 no cookie jar
* now loop round reading each pair of longwords until
* the empty longword is reached
.loop move.l (a0)+,d0 cookie name
move.l (a0)+,d1 cookie value
cmp.l #0,d0 check for empty longword
beq not_falc if empty finished
cmp.l #'_MCH',d0 check for cookie
bne.s .loop get next cookie
cmpi.l #$3000,d1
bne not_falc
is_falc
Anthony Jacques - jacquesa@zetnet.co.uk