| |
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.... |
| |
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. |
| |
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? |
| |
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. |
| |
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
|
| |
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. |
| |
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.
|
| |
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 |
| |
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 |
| |
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 ;)) |
| |
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 |