Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > 64tass v1.45 bug
2006-04-16 16:42
ready.

Registered: Feb 2003
Posts: 441
64tass v1.45 bug

Using 64tass v1.45 or earlier by Breeze and Singular (64TASS V1.45), I can't compile the illegal op code ANC. I need:

....
lda ($2e),y
anc #$ff
ror
....

I have managed 64tass to compile the ANC op code in this way:
....
lda ($2e),y
.byte $0b, $ff
ror
....

In this way it works fine. Hope this can be helpful for a new version of 64tass.

BR,
Ready.
 
... 17 posts hidden. Click here to view all posts....
 
2007-02-11 18:07
Scout

Registered: Dec 2002
Posts: 1570
Quote: Hello,
back again on another problem with TASM, but this time I read the readme file, still it did not help.

I get the following message while compiling:

Ooops! Too many passes...

I can't find it into the error lists in the readme.txt

It is strange since it does not seem to be caused by the excessive length of my source code. In fact cutting a certain part of it does not eliminate the message, but simply deleting a single instruction in the right place fixes the problem.

Any sugestion?

thanks,
Ready.


This sounds like a bug alright but maybe you can solve this using the .align $0100 command.
Put it somewhere near the area where it goes wrong.
2007-02-11 18:26
WVL

Registered: Mar 2002
Posts: 902
U-oh.. that's a real bug somewhere, yes :) I had it happen sometimes too, but could never pinpoint where it was coming from. I contacted SoCi about this once, and (iirc) he said he was aware of it, but wanted some sources that would reproduce the error.

Unfortunately, I just kept adding code and the error disappeared by itself again, so I couldnt send a source that had problems. (You might try switching to v1.44 or earlier, that helped me out anyway).

If your source still has problems, why not send it in to Soci?
2007-02-11 18:48
ready.

Registered: Feb 2003
Posts: 441
Hi,
I experienced the same situation as you, WVL, while coding the plotting part of Aurora for Level64. The message popped out, then after adding some code it went away.

Now I have just fixed it thanks to Scout's hint. I did not use .align $0100, but he made me think about some branch problem. I had:

...
cmp dx
bpl label1
...
...
label1
...

and it gave the problem. Then I tried:

...
cmp dx
bmi label2
jmp label1
label2
...
...
label1
...

and 64TASS compiled it fine. I guess you can try the same, by chaning branch codes into jump codes while developing your code, then once it is done, try to change each jump back to branch.

In case I have more about it, I'll write it here.

Ready.
2007-02-11 18:54
Scout

Registered: Dec 2002
Posts: 1570
Quote:
Now I have just fixed it thanks to Scout's hint. I did not use .align $0100, but he made me think about some branch problem.


Nice!

Maybe reading the manual might be an option because:

To avoid branch too long errors the assembler also supports long branches, it can automatically convert conditional relative branches to it's opposite and a JMP. This have to be enabled on the command line using the "--long-branch" option.
	bcc veryfar	;compiled as "bcc veryfar" or
			;	bcs sk
			;	jmp veryfar
			;sk




:D
2007-02-11 22:20
WVL

Registered: Mar 2002
Posts: 902
Quote: Quote:
Now I have just fixed it thanks to Scout's hint. I did not use .align $0100, but he made me think about some branch problem.


Nice!

Maybe reading the manual might be an option because:

To avoid branch too long errors the assembler also supports long branches, it can automatically convert conditional relative branches to it's opposite and a JMP. This have to be enabled on the command line using the "--long-branch" option.
	bcc veryfar	;compiled as "bcc veryfar" or
			;	bcs sk
			;	jmp veryfar
			;sk




:D


this is not really the bug that Ready is experiencing.

Too many passes error is a weird bug, and sometimes you can get rid of it by some simple things :

like swapping

LDA #$xx
LDX #$xx

to

LDX #$xx
LDA #$xx

which should make no difference, but still it can get rid of the bug.

In short, there's something wrong with 64tass v1.45.
2007-02-11 22:27
Scout

Registered: Dec 2002
Posts: 1570
Quote: this is not really the bug that Ready is experiencing.

Too many passes error is a weird bug, and sometimes you can get rid of it by some simple things :

like swapping

LDA #$xx
LDX #$xx

to

LDX #$xx
LDA #$xx

which should make no difference, but still it can get rid of the bug.

In short, there's something wrong with 64tass v1.45.


True, it is still a bug.
I forgot to mention that in my response to make that clear.
I was just pointing to the long branches commandline option.

I found also a small bug.
Not a nasty one because it only gives a warning (thank <fill in your entity of choice>);
if you have data/code that ends at $ffff, the compiler warns that the top of memory has exceeded (or something like that).

Like i said, not a real bug but i guess some internal tweaking has to be done inside the compilercode.
2007-02-12 08:57
WVL

Registered: Mar 2002
Posts: 902
Quote: True, it is still a bug.
I forgot to mention that in my response to make that clear.
I was just pointing to the long branches commandline option.

I found also a small bug.
Not a nasty one because it only gives a warning (thank <fill in your entity of choice>);
if you have data/code that ends at $ffff, the compiler warns that the top of memory has exceeded (or something like that).

Like i said, not a real bug but i guess some internal tweaking has to be done inside the compilercode.


/me has code ending at $ffff too ;D
2011-07-02 14:36
Hermit

Registered: May 2008
Posts: 208
Now I can confirm that this ´OOOPS, Too Many Passes´ is really coming from something related to branches.
At least this time I had to change an address of a BNE.
After playing around for nearly half an hour to get this solved.
As I´m working on a bigger project (SID tracker), I faced this message many times. Usually writing something randomly or continuing the code solved the situation most of the times, but now I couldn´t go forward without modifying the BNE address.

I assume that this message comes when there´s a branching somewhere near the $7f..$80 boundaries. But as it didn´t compile I couldn´t exactly check how much bytes the branch wanted to jump.

I hope this helps some of you to get rid of this annoying bug.

hermit
2011-07-02 18:15
WVL

Registered: Mar 2002
Posts: 902
Maybe you can send a non-compiling source to Soci? Everytime i stumbled upon that bug I just swapped some opcodes and continued, before thinking about saving the source and submitting it to soci so he could have a look at it and trace what's going wrong. (I will next time ;))
2011-07-02 18:52
Hermit

Registered: May 2008
Posts: 208
I found this error message in 64tass source code:

The extract from (ver1.46) 64tass.c line 2020:
....
    do {
        if (pass++20) {fprintf(stderr,"Ooops! Too many passes...\n");exit(1);}
        set_cpumode(arguments.cpumode);
	address=l_address=databank=dpage=longaccu=longindex=0;low_mem=full_mem;top_mem= 0;encoding=0;
        current_provides=0xffffffff;current_requires=0;current_conflicts=0;macrecursion= 0;
        fixeddig=1;waitfor[waitforp=0]=0;skipit[0]=1;sline=0;procname[0]=0;conderrors=wa rnings=0;freeerrorlist(0);
        /*	listing=1;flist=stderr;*/
        enterfile(arguments.input,0);
        sline=0;
        compile(arguments.input,0,0,"",-1,NULL);
        exitfile();
        if (errors) {status();return 1;}
        if (conderrors && !arguments.list && pass==1) fixeddig=0;
    } while (!fixeddig || (pass==1 && !arguments.list));
....

I wonder what causes the do while loop run more than 20 times increasing 'pass' variable.
Previous - 1 | 2 | 3 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
MWR/Visdom
MCM/ONSLAUGHT
Peacemaker/CENSOR/Hi..
Mike
icon/The Silents, Sp..
DeMOSic/MS^LSD^ONS
Magic/Nah-Kolor
Guests online: 90
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 Antitrack  (9.8)
3 OTD  (9.8)
4 Fungus  (9.8)
5 S!R  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.051 sec.