VBCC assembler complaining about valid (I think) instruction

All 680x0 related coding posts in this section please.

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

chicane
Atari freak
Atari freak
Posts: 72
Joined: Mon Jul 02, 2012 11:25 am
Location: Leeds, UK

VBCC assembler complaining about valid (I think) instruction

Postby chicane » Sat Aug 23, 2014 9:31 pm

I've recently become aware of the existence of the VBCC compiler toolchain, and am in the process of trying to use it to compile some code that has so far been compiled with m68k-atari-mint-gcc.

The first assembly file I've tried to compile with VBCC has resulted in an surprising and unexpected error:

Code: Select all

vc -c calculatetexturecurrentline.s

error 1 in line 22 of "calculatetexturecurrentline.s": illegal operand types
>    and.l #0xffc0,d0
vasmm68k_mot -quiet -Faout -phxass "calculatetexturecurrentline.s" -o "calculatetexturecurrentline.o" failed


As far as I know, it's perfectly valid to perform a 32-bit "and" operation on a data register using an immediate value - GCC has been perfectly happy for me to do this. Can anybody offer their thoughts on whether this operation is "officially" part of the m68k instruction set? Everything I've read to date would suggest that it is.

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 666
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: VBCC assembler complaining about valid (I think) instruc

Postby Anima » Sat Aug 23, 2014 10:07 pm

I am not sure if the assembler accepts only the "andi" keyword!?

Cheers
Sascha

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 766
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: VBCC assembler complaining about valid (I think) instruc

Postby mfro » Sun Aug 24, 2014 4:03 am

from what I understand from the docs (didn't try myself), I'd say the mot syntax module (which is used for the m68k vasm flavours) does not accept "0x" as hexadecimal prefix.

try

Code: Select all

and.l #$ffc0,d0

instead.

User avatar
GT Turbo
Captain Atari
Captain Atari
Posts: 335
Joined: Tue Feb 17, 2004 9:41 am
Location: Alsace, France
Contact:

Re: VBCC assembler complaining about valid (I think) instruc

Postby GT Turbo » Sun Aug 24, 2014 7:22 am

$ is the official motorola syntax for hexa :)
Never forget : Power is in your minds !!!

http://Cerebral-Vortex.net

http://Jagware.org

chicane
Atari freak
Atari freak
Posts: 72
Joined: Mon Jul 02, 2012 11:25 am
Location: Leeds, UK

Re: VBCC assembler complaining about valid (I think) instruc

Postby chicane » Sun Aug 24, 2014 7:35 am

Argh - total rookie mistake on my part! Sure enough, I took a fresh look at things this morning after reading all your replies and #0xffc0 was the only hex value specified in a 220 line file - which caused me to look in the completely wrong place for the cause of the error! :oops: Sure enough, changing the prefix to $ fixed things nicely. Thanks very much for all your replies.


Social Media

     

Return to “680x0”

Who is online

Users browsing this forum: No registered users and 1 guest