English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 30 April 2021, 18:44   #1
Tigerskunk
Inviyya Dude!
 
Tigerskunk's Avatar
 
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,770
How to detect 020 or upwards CPUs with asm?

See title.

Want to check if I have a beefier machine at disposal to work with for some extra effects.
Tigerskunk is offline  
Old 30 April 2021, 19:11   #2
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,039
execbase.i:
Code:
	UWORD	AttnFlags	; special attention flags (readable)

******* Bit defines for AttnFlags (see above) *******************************

*  Processors and Co-processors:
	BITDEF	AF,68010,0	; also set for 68020
	BITDEF	AF,68020,1	; also set for 68030
	BITDEF	AF,68030,2	; also set for 68040
	BITDEF	AF,68040,3
	BITDEF	AF,68881,4	; also set for 68882
	BITDEF	AF,68882,5
	BITDEF	AF,FPU40,6	; Set if 68040 FPU
; 060 = bit 7
AttnFlags = $128.W, lower byte $129 is what you want. So move.l 4.w,a6 and then grab $129(a6).
a/b is offline  
Old 30 April 2021, 19:20   #3
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Phase5 added also bit7 for 68060

EDIT: ah! seems that the best source is AROS:
Code:
/* AttnFlags */
/* Processors */
#define AFB_68010       0
#define AFB_68020       1
#define AFB_68030       2
#define AFB_68040       3
#define AFB_68060       7
#define AFB_AP68080     9
/* Co-Processors */
#define AFB_68881       4
#define AFB_68882       5
#define AFB_FPU40       6
--cut--

Last edited by ross; 30 April 2021 at 20:02.
ross is offline  
Old 01 May 2021, 07:41   #4
Tigerskunk
Inviyya Dude!
 
Tigerskunk's Avatar
 
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,770
Thanks mates, you are the best...
Tigerskunk is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
WANTED: Animet Cd's 23 and upwards utukku MarketPlace 4 05 January 2021 18:45
Tool to convert asm to gnu asm (gas) Asman Coders. Asm / Hardware 13 30 December 2020 11:57
ASM: Asm-ONE or AsmPro - how to set a Hello amiga coders, I hope it is ok to hijack ? Fireball Coders. Asm / Hardware 2 24 April 2020 21:16
Checking for genuine CPUs? Mr.Flibble support.Hardware 0 03 July 2015 21:08
Motorola CPUs for sale... amigamaniac MarketPlace 4 04 December 2009 23:48

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:38.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.12542 seconds with 13 queries