English Amiga Board


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

 
 
Thread Tools
Old 24 April 2021, 22:21   #1
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,801
VASM errors : how to fix them?

@PHX,
I've resourced a prg and I got the following errors :

vasm -m68060 -m68851 -no-opt -devpac -Fhunkexe -kick1hunks prog.asm

error 9 in line 2824 of "prog.asm": instruction not supported on selected architecture
> PMOVE.L TT0,(8,A0)

error 9 in line 2825 of "prog.asm": instruction not supported on selected architecture
> PMOVE.L TT1,(12,A0)

error 1 in line 2834 of "prog.asm": illegal operand types
> MOVEC MMUSR,D0

error 1 in line 2837 of "prog.asm": illegal operand types
> MOVEC TC,D0

error 1 in line 2839 of "prog.asm": illegal operand types
> MOVEC ITT0,D0

What am I doing wrong?
thx
kamelito is offline  
Old 24 April 2021, 22:35   #2
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,203
vasm 1.8k here, I don't have any issues with

MOVEC TC,D0

MOVEC ITT0,D0

provided I set MC68060 in the asm code

I can also do

MOVEC DTT0,d0

(not TT0, and not into memory, use a register first)

MMUSR is probably not the real name of the register for vasm.
jotd is online now  
Old 25 April 2021, 00:05   #3
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,801
Quote:
Originally Posted by jotd View Post
vasm 1.8k here, I don't have any issues with

MOVEC TC,D0

MOVEC ITT0,D0

provided I set MC68060 in the asm code

I can also do

MOVEC DTT0,d0

(not TT0, and not into memory, use a register first)

MMUSR is probably not the real name of the register for vasm.
Like this?
machine mc68060
I thought that passing the MC68060 via the command line was sufficient.
kamelito is offline  
Old 25 April 2021, 08:46   #4
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Dunno for vasm, but for phxass the following will assemble without errors :
Code:
 mc68030
 pmove.l tt0,(8,a0)
 pmove.l tt1,(12,a0)
 mc68040
 movec mmusr,d0
 movec tc,d0
 movec itt0,d0
meynaf is offline  
Old 25 April 2021, 11:54   #5
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
Quote:
Originally Posted by kamelito View Post
vasm -m68060 -m68851 -no-opt -devpac -Fhunkexe -kick1hunks prog.asm

error 9 in line 2824 of "prog.asm": instruction not supported on selected architecture
> PMOVE.L TT0,(8,A0)
PMOVE from/to TTx registers is 68030 only.

Quote:
error 1 in line 2834 of "prog.asm": illegal operand types
> MOVEC MMUSR,D0
MOVEC with MMUSR is 68040 only.


Quote:
error 1 in line 2837 of "prog.asm": illegal operand types
> MOVEC TC,D0

error 1 in line 2839 of "prog.asm": illegal operand types
> MOVEC ITT0,D0
And these are 68040/68060 only.
I don't get the last errors, as you selected -m68060. Maybe a bug in your vasm version, which was fixed later?

To assemble all these instructions you would have to enable 68030 and 68040 together, which only works by
-m68020up
. Although, I would recommend to select the appropriate CPU in the source as there are ambiguities between these models, like PFLUSHA.
phx is offline  
Old 25 April 2021, 17:06   #6
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,801
@phx
-m68020up worked, I still have other errors due to resource badly disassembly some instructions.
I guess those instructions should be put in dc.x to be able to run on 68000 Amigas like the original program does.
Thanks to all for your help.

Is there an option to assemble code with new syntax or is it done automatically because I've errors like this : ) expected > LEA (pc.MSG,PC),A0

PS I was using version j but upgraded to k build by someone and put to grandis.

Last edited by kamelito; 25 April 2021 at 17:16.
kamelito is offline  
Old 25 April 2021, 17:42   #7
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,233
Actually, none of these instructions will work on the 68000.
Thomas Richter is offline  
Old 25 April 2021, 18:10   #8
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
Quote:
Originally Posted by kamelito View Post
Is there an option to assemble code with new syntax or is it done automatically because I've errors like this : ) expected > LEA (pc.MSG,PC),A0
New and old syntax can be mixed. vasm reads both.
The problem here is that the register parser stops at the '.' and thinks it is a PC register. Even with -ldots or -devpac, which should allow dots in labels. I guess I have to fix that.
phx is offline  
Old 25 April 2021, 19:30   #9
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,801
Quote:
Originally Posted by Thomas Richter View Post
Actually, none of these instructions will work on the 68000.
I know that why I wrote about using dc.x instead, I think it is used to be executed if the CPU needed is present.
kamelito is offline  
Old 25 April 2021, 19:30   #10
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,801
Quote:
Originally Posted by phx View Post
I guess I have to fix that.
kamelito is offline  
Old 26 April 2021, 13:58   #11
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,414
On the topic of CPU specific code, it might be worth pointing out you can also use a VASM directive for that in your code.
Code:
   mc68010 ; Now 68010 instructions are recognised
   <<awesome 68010 code>>
   mc68040 ; Now 68040 instructions are recognised
   <<even better 68040 code>>
   mc68000 ; Back to 68000 only code
I found that to be quite useful.
Edit: just saw meynaf pointed this out for phxass already.
roondar is online now  
Old 27 April 2021, 16:52   #12
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
Quote:
Originally Posted by phx View Post
The problem here is that the register parser stops at the '.' and thinks it is a PC register. Even with -ldots or -devpac, which should allow dots in labels. I guess I have to fix that.
Done. You can try tomorrow's source snapshot at http://sun.hasenbraten.de/vasm/index.php?view=source

Although I don't like dots in labels or symbols, which is why vasm doesn't support it in default mode. It's confusing while parsing and reading such a source, because a '.' very much looks like a separator.
phx is offline  
Old 27 April 2021, 17:55   #13
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,801
Thanks, I‘ll try that.
kamelito is offline  
Old 28 April 2021, 23:48   #14
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,801
@PHX
Just build the snapshot 28 Apr 2021 02:13:57 GMT: vasm.tar.gz (482247 bytes) and with the -devpac I've no more the errors I had.
thanks!
kamelito 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
Another Vasm question LeCaravage Coders. Asm / Hardware 7 27 January 2021 23:30
bug in vasm 1.8h or not... JoeJoe Coders. Asm / Hardware 3 25 September 2020 12:05
About VASM expressions JuanLuis Coders. Asm / Hardware 6 07 June 2020 10:28
vasm treat warnings as errors? hop Coders. Asm / Hardware 3 30 April 2019 22:32
fix or skip dms-errors Adderly support.Other 2 26 July 2006 02:39

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 22:32.

Top

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