MaxCoderz

for your 1 bit pleasure!

All times are UTC




Post new topic Reply to topic  [ 104 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author Message
 Post subject:
PostPosted: Wed 12 Dec, 2007 10:31 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Brass 3.0.0.0 Beta 10 wrote:
Historically, the source has been assembled twice, and plugins decide what action to take based on the pass (typically creating labels and incrementing the program counter in the first pass, then writing output in the second pass). The result is that each plugin gets called twice and has to maintain its state. This can cause headaches for plugins that control the flow through the assembler, as they might do one thing on one pass, then a label will have been created or assigned differently the next time they're run which makes them take a different decision.

The new design is that everything happens in the first pass, so functions and directives only get invoked once. However, this causes a different problem - how can we, for example, jump forwards if the label we wish to jump to hasn't been created yet? The solution is to be able to write dynamic output data. This writes an empty chunk of data, but lets the plugin writing the data register a delegate that will be called after compilation so it can go back and write the data it needs to.

This has not been extensively tested, so consider this experimental. Let me know if you have problems with invalid or erroneous output.

The contiguous data plugin has been removed. Something offering similar functionality will need to be added.

Compiler.Compile() no longer throws exceptions, storing all error data in the error list.

Compiler.FindFreeMemoryBlock() handles output data larger than one byte correctly.

Internal fix to label resolution to prevent the internal label from being accidentally set to a null reference (this caused the error-reporting code to throw a null reference exception instead of the missing label's name).

Exception is spelled, well, exception. Only one of the new exception types was spelled correctly (all the others were spelled "Expection"). Cheers to gameprograma for spotting this!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 12 Dec, 2007 12:46 pm 
Offline
Calc King
User avatar

Joined: Sun 23 Jan, 2005 12:37 am
Posts: 1727
Location: Netherlands
benryves wrote:
Exception is spelled, well, exception. Only one of the new exception types was spelled correctly (all the others were spelled "Expection"). Cheers to gameprograma for spotting this!

Thank God, proof that Ben is still human! :mrgreen:

_________________
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon 04 Feb, 2008 11:30 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Brass 3.0.0.0 Beta 11 wrote:
Replacement of the old GUI builder application with a new project builder.

A label resolution bug has been fixed.

Some error messages were being reported as always occuring on the last line of the last file that was assembled. This has been corrected.

The IntelHex output writer plugin has been fixed to work with data output more than one byte at a time. This fixes plugins that rely on IntelHex too (such as the TI application ones).

The TI application plugins (.appheader and .branch) have been rewritten (they weren't functional in the last beta).

.while now supports assignments in its conditional.

Fixed a bug where Compiler.GetUniquePageIndices() was returning an empty array.

I have replaced the zip utilty class with one I wrote myself.

All namespaces for Brass 3 itself have been moved into a parent BeeDevelopment namespace.

Unicode arrow characters were removed from the .asciimap directive documentation.


Lots of fixes; get it here. :) (I hope the new project builder is to your liking, driesguldolf).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 05 Feb, 2008 12:17 am 
Offline
Extreme Poster
User avatar

Joined: Thu 17 May, 2007 4:49 pm
Posts: 395
Location: $4080
benryves wrote:
Lots of fixes; get it here. Smile (I hope the new project builder is to your liking, driesguldolf).

It definitely is! Now I really have to finish my project...

Also, I've seen you've redesigned your website, it looks really nice! ;)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 05 Feb, 2008 7:50 am 
Offline
Calc King

Joined: Sat 05 Aug, 2006 7:22 am
Posts: 1513
That was there already, wasn't it? (for a very long time, too)

I get an error when I click on Brass Help (or press F1), the help thing immediately errors and dies, apart from that, nice :)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 05 Feb, 2008 11:01 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
King Harold wrote:
That was there already, wasn't it? (for a very long time, too)
If you mean the project builder, then that was written from scratch (apart from the HTML outputting stuff).

Quote:
I get an error when I click on Brass Help (or press F1), the help thing immediately errors and dies, apart from that, nice :)
Hm, not a cryptic message about IOutputWriter not being in assembly Brass.exe is it? It sometimes appears when running the help viewer in Release mode from within Visual Studio on my machine (never in Debug nor running the Release version from Explorer). I'm not sure why; could be a working directory bug?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 05 Feb, 2008 12:57 pm 
Offline
Calc King

Joined: Sat 05 Aug, 2006 7:22 am
Posts: 1513
It does not say anything, just that Brass encountered a problem and needs to close

(with that which was already there I meant the new website)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 05 Feb, 2008 1:02 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Hm, probably because it's not being run alongside a debugger (ie, VS). I'll see if I can fix it.

I only released the new website on the first of this month, so it's pretty new.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 05 Feb, 2008 2:38 pm 
Offline
Calc King

Joined: Sat 05 Aug, 2006 7:22 am
Posts: 1513
It's been in a subfolder called "new" then?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 05 Feb, 2008 10:17 pm 
Offline
Extreme Poster
User avatar

Joined: Thu 17 May, 2007 4:49 pm
Posts: 395
Location: $4080
Strange things are going on here...

Image:
Image

The bugs don't occur when I do this (though it does double the error):
Code:
a=b
c=b+3

But they do with this code: (no label from below is defined at this point)
Code:
updatelcd = sysvarsa
updatelcd.addr = updatelcd+1
copyerase = sysvarsa+3
copyerase.addr = copyerase+1


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 06 Feb, 2008 10:43 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Cheers for the bug report. Looks like there are still more bugs and quirks to fix in the error reporting stage, then, should be pretty easy to fix. :)

I discovered the cause of the help viewer crashing (at least on my PC) - older plugins that are no longer in development or use that are sitting in the application directory that try and reference long-dead (or changed) interfaces. Try deleting all .dll files from the Brass install directory, then reinstalling. (The next version of the help viewer handles this problem more gracefully, with a dialog telling you it couldn't load plugin Plugin.dll).

I've noted that keyboard shortcuts don't work properly in the project builder (they get stolen by IE); I've also started adding rudimentary debugging capabilities (so far it's a case of hit F5 and it'll run a program of your choice passing the name of the compiled file as a command-line argument).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 06 Feb, 2008 1:04 pm 
Offline
Extreme Poster
User avatar

Joined: Thu 17 May, 2007 4:49 pm
Posts: 395
Location: $4080
benryves wrote:
Cheers for the bug report. Looks like there are still more bugs and quirks to fix in the error reporting stage, then, should be pretty easy to fix.
Luckily it's only in the error reporting, everything worked after fixing the mistakes.

benryves wrote:
I've also started adding rudimentary debugging capabilities (so far it's a case of hit F5 and it'll run a program of your choice passing the name of the compiled file as a command-line argument).
So we can make a batch file and immediately send it to an emulator? Sounds very useful! :D

I'm also missing the .global and .local directives... Of course a workaround is easy (redefine them on top level in case of .global), it isn't really aesthetic.
And because they are defined twice, this could cause an error where you accidentally change one of the labels causing infinite headaches ;)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 06 Feb, 2008 2:11 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
The idea behind debugging is that after a build, a plugin of your own invention can be run, and is passed an instance of the compiler that just built the project. It can therefore use this to access all of the information about the program you just built.

For the moment, the only debugger I've written looks for two labels - Debugger.Path and Debugger.Args (can be set in the project file or your code) then launches Debugger.Path with Debugger.Args, so you can load your project in the project builder, hit F5 and your program is built and loaded in an external program.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 06 Feb, 2008 5:30 pm 
Offline
Extreme Poster
User avatar

Joined: Thu 17 May, 2007 4:49 pm
Posts: 395
Location: $4080
benryves wrote:
The idea behind debugging is that after a build, a plugin of your own invention can be run, and is passed an instance of the compiler that just built the project. It can therefore use this to access all of the information about the program you just built.

And this confirms my narrow knowledge of computer programming... (and yet I program for a calc, hehe)
This is of course way better applicable then my simple idea.

But still, what happened to .global and .local?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 06 Feb, 2008 5:50 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
driesguldolf wrote:
But still, what happened to .global and .local?
I guess I never got around to writing them. Feel free to do so yourself, that's the basic idea here! :)

.local isn't required (or practical) given the new entirely-modular label system. .global would be rather useful, though, I can see that.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 104 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB ® Forum Software © phpBB Group | DVGFX2 by: Matt