nedoPC.org

Electronics hobbyists community established in 2002
Atom Feed | View unanswered posts | View active topics It is currently 19 Apr 2024 16:58



Reply to topic  [ 273 posts ]  Go to page Previous  1 ... 9, 10, 11, 12, 13, 14, 15 ... 19  Next
Tunguska the ternary emulator 
Author Message
Admin
User avatar

Joined: 08 Jan 2003 23:22
Posts: 22543
Location: Silicon Valley
Reply with quote
New bug - if I enter something unknown instead of command it starts print zeros to the screen - many lines of zeros...


06 Nov 2008 22:13
Profile WWW
Maniac

Joined: 17 Sep 2012 13:36
Posts: 277
Location: 81.170.128.52
Reply with quote
In the 3cc memory image? If so, could you post the .asm-file 3CC generated (or upload it somewhere, it's several thousand lines :-o)


07 Nov 2008 04:32
Profile
Admin
User avatar

Joined: 08 Jan 2003 23:22
Posts: 22543
Location: Silicon Valley
Reply with quote
eudoxie wrote:
In the 3cc memory image? If so, could you post the .asm-file 3CC generated (or upload it somewhere, it's several thousand lines :-o)


I thinks it's ASM-image. I can't find 3CC-image sources on CVS...


07 Nov 2008 07:18
Profile WWW
Maniac

Joined: 17 Sep 2012 13:36
Posts: 277
Location: 81.170.128.52
Reply with quote
The 3cc image is in "memory_image_3cc" in the CVS.

How did you assemble the sources? You're only supposed to do
"tg_assembler ram.asm" nowadays, though assembling the wrong way should only cause warnings and redundant code. Furthermore, what optimization level are you compiling tunguska in?

Also, if you are running in windows, could you upload the windows binary so I can see the problem for myself?


07 Nov 2008 08:00
Profile
Admin
User avatar

Joined: 08 Jan 2003 23:22
Posts: 22543
Location: Silicon Valley
Reply with quote
Yes, I'm using ./tg_assembler ram.asm since July ;)

Also I took memory_image_3cc from CVS and got this:

Quote:
cpp string.c -o string.ppc
cpp stdio.c -o stdio.ppc
cpp math.c -o math.ppc
cpp main.c -o main.ppc
cpp system.c -o system.ppc
cpp graphics.c -o graphics.ppc
cpp demos.c -o demos.ppc
../tunguska_3cc/3cc -O 0n400000 -oout.asm string.ppc stdio.ppc math.ppc main.ppc system.ppc graphics.ppc demos.ppc
../tunguska_sources/tg_assembler out.asm

Caught error during assembly (final sweep)

* assembler.cc[257]: Unresolved varaible clear_screen.bootstrapped
* assembler.cc[413]: Error during assembly of out.asm, line 4328


07 Nov 2008 19:20
Profile WWW
Maniac

Joined: 17 Sep 2012 13:36
Posts: 277
Location: 81.170.128.52
Reply with quote
Are tunguska and 3cc up to date?

Could you try running "../tunguska_sources/tg_assembler -v out.asm" And pasting the output.

Also, if possible, supply out.asm.


08 Nov 2008 05:25
Profile
Admin
User avatar

Joined: 08 Jan 2003 23:22
Posts: 22543
Location: Silicon Valley
Reply with quote
http://nedopc.org/ternary/tunguska/tung ... _0-win.zip (2.5M)

See ram_3cc/out.asm and ram_3cc/out

To rebuild ram_3cc run build_ram_3cc.bat that got error described above written to file "out"


Last edited by Shaos on 11 Nov 2012 17:57, edited 1 time in total.



08 Nov 2008 07:58
Profile WWW
Maniac

Joined: 17 Sep 2012 13:36
Posts: 277
Location: 81.170.128.52
Reply with quote
Yeah, now I see what the problem is.

Something seems to be wrong with the $$-token. I'm thinking either it isn't matched in the lexer for some reason, or something has gotten broken in the porting process.

Could you diff any alterations you have done to scanner.l, parser.ypp and assembler.h?


08 Nov 2008 08:34
Profile
Admin
User avatar

Joined: 08 Jan 2003 23:22
Posts: 22543
Location: Silicon Valley
Reply with quote
Quote:
Could you diff any alterations you have done to scanner.l, parser.ypp and assembler.h?


I didn't do anything special - just got CVS and make...
P.S. Actually I did some changes earlier in July in generated lex.yy.cc, but it was just changing cin to std::cin and cout to std::cout, that part wasn't changed since that time, so make didn't recreate it again.


08 Nov 2008 13:05
Profile WWW
Maniac

Joined: 17 Sep 2012 13:36
Posts: 277
Location: 81.170.128.52
Reply with quote
Strange. I'm not sure what could cause this sort of problem. Either the token isn't recognized, or assembler::get_pc() isn't doing it's job for some reason.

Try changing tunguska_sources/parser.ypp:121 from
Code:
   | HERE { $<ival>$ = assembler::instance()->get_pc(); }

to
Code:
   | HERE { $<ival>$ = assembler::instance()->get_pc();
            fprintf(stderr, "$$-token recognized(%d)\n",$<ival>$); }


And compile and see what happens when you assemble out.asm.


10 Nov 2008 04:29
Profile
Admin
User avatar

Joined: 08 Jan 2003 23:22
Posts: 22543
Location: Silicon Valley
Reply with quote
I did make clean and make (2 tries, after 1st one I again changed cin,cout,cerr to std::cin,std::cout,std::cerr in lex.yy.cc), now it build out.asm, but it is not working:
Code:
'symbols.bmp' not found in '/usr/local/share/tunguska/'
Falling back to 'share/symbols.bmp' ... success!
'bg.bmp' not found in '/usr/local/share/tunguska/'
Falling back to 'share/bg.bmp' ... success!
LOADING out.ternobj
...DONE
RTI outside BRK
RTI outside BRK
RTI outside BRK
Initial benchmark: 447.686 thousand operations per second
        Spread: 20.119

RTI outside BRK
RTI outside BRK

It strange, but asm image did the same thing now...

http://nedopc.org/ternary/tunguska/tung ... _1-win.zip (2.4M)


Last edited by Shaos on 11 Nov 2012 17:58, edited 1 time in total.



10 Nov 2008 20:42
Profile WWW
Admin
User avatar

Joined: 08 Jan 2003 23:22
Posts: 22543
Location: Silicon Valley
Reply with quote
I rebuilt tunguska and tg_assembler again with -O2 in Makefile and now it's working! Even many zeros bug also gone...

http://nedopc.org/ternary/tunguskatungu ... _2-win.zip (2.4M)


Last edited by Shaos on 11 Nov 2012 17:58, edited 1 time in total.



10 Nov 2008 20:47
Profile WWW
Maniac

Joined: 17 Sep 2012 13:36
Posts: 277
Location: 81.170.128.52
Reply with quote
Great news!


11 Nov 2008 11:38
Profile
Admin
User avatar

Joined: 08 Jan 2003 23:22
Posts: 22543
Location: Silicon Valley
Reply with quote
eudoxie wrote:
Great news!


So is it final v0.5? Should I prepare windows version for SourceForge now?


11 Nov 2008 17:00
Profile WWW
Maniac

Joined: 17 Sep 2012 13:36
Posts: 277
Location: 81.170.128.52
Reply with quote
The sourcecode is final, I need to finish the updates of the manual and maybe the memory image for 3cc (I expect it to be done before next week), but you could probably start the work on the 0.5 package for windows.


12 Nov 2008 03:43
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 273 posts ]  Go to page Previous  1 ... 9, 10, 11, 12, 13, 14, 15 ... 19  Next

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.