Brass 3.0.0.0 Beta 13
- tr1p1ea
- Maxcoderz Staff
- Posts: 4141
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: I cant seem to get out of this cryogenic chamber!
- Contact:
Re: Brass 3.0.0.0 Beta 12
But do you really *need* forward referencing?
- driesguldolf
- Extreme Poster
- Posts: 395
- Joined: Thu 17 May, 2007 4:49 pm
- Location: $4080
- Contact:
Re: Brass 3.0.0.0 Beta 12
I would love to, really, but the only languages I know are z80 asm, tibasic, visual basic and Scheme... Going to learn decent C++ this year in class, I'm already looking forward
It becomes necessary when you need a label that is defined in terms of $ earlier then where it is defined.
Yes.tr1p1ea wrote:But do you really *need* forward referencing?
It becomes necessary when you need a label that is defined in terms of $ earlier then where it is defined.
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
Re: Brass 3.0.0.0 Beta 12
Would you object to requiring .NET 3.5? I've been playing around with some of the exotic stuff in System.Linq.Expressions (which was added in 3.5) which adds all manner of exciting bits and bobs. For example:
That will add any two objects together (in .NET anything can be put into an object, be it a class or structure or one of the built-in primitives). As long as the types of the two objects can be added to eachother, that will work (and if not, it throws an exception).
Code: Select all
static object Add(object a, object b) {
var Parameters = new[] {
Expression.Parameter(a.GetType(), "a"),
Expression.Parameter(b.GetType(), "b"),
};
var Adder = Expression.Lambda(Expression.Add(Parameters[0], Parameters[1]), Parameters).Compile();
return Adder.DynamicInvoke(a, b);
}
- driesguldolf
- Extreme Poster
- Posts: 395
- Joined: Thu 17 May, 2007 4:49 pm
- Location: $4080
- Contact:
Re: Brass 3.0.0.0 Beta 12
Me? Not at all.
- driesguldolf
- Extreme Poster
- Posts: 395
- Joined: Thu 17 May, 2007 4:49 pm
- Location: $4080
- Contact:
Re: Brass 3.0.0.0 Beta 12
Code: Select all
label = 1
#module module
label = 2
#endmodule
#module fail
.echo module.label
#endmodule
This shouldn't happen, right?X Label 'fail.module.label' not found.
.echo module.label
I'm pretty sure this was mentioned somewhere... meh, posting it just to be sure.
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
Re: Brass 3.0.0.0 Beta 12
Labels work by searching within the current module then working out. So, when you say label = 2 within module that searches for module.label, can't find one, then searches outside, finds label, and assigns 2 to it instead of creating a new one.
There's not really an easy way out of it, without introducing an extra directive or function (.local label 2 to force the label local?) This is part of the bug that means that all labels are evaluated as soon as they're seen, so the parser can't tell the difference between an assignment and just taking the value of something until the very last moment.
Yes, it's a bug.
There's not really an easy way out of it, without introducing an extra directive or function (.local label 2 to force the label local?) This is part of the bug that means that all labels are evaluated as soon as they're seen, so the parser can't tell the difference between an assignment and just taking the value of something until the very last moment.
Yes, it's a bug.
- driesguldolf
- Extreme Poster
- Posts: 395
- Joined: Thu 17 May, 2007 4:49 pm
- Location: $4080
- Contact:
Re: Brass 3.0.0.0 Beta 12
Heh, found another one:
For example, take this define:
#define MACRO(x) ld a,x\ sub 2
This gives the error "label x not found" when used.
Apparently, brass doesn't see \ as a seperator, causing the substitution to fail (it only substitutes whole words). Inserting a space fixes this problem.
For example, take this define:
#define MACRO(x) ld a,x\ sub 2
This gives the error "label x not found" when used.
Apparently, brass doesn't see \ as a seperator, causing the substitution to fail (it only substitutes whole words). Inserting a space fixes this problem.
Re: Brass 3.0.0.0 Beta 12
Wow, I just d/led this today. SO much better than TASM.
My ethicator machine must have had a built-in moral compromise spectral release phantasmatron! I'm a genius!
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
Re: Brass 3.0.0.0 Beta 12
Not so much "better" as "different". It's rather buggy I'm afraid.
Re: Brass 3.0.0.0 Beta 12
Well, I haven't compiled anything yet. I really like the help section, though. It's a lot easier to look up a command as I need it than to follow a course, especially as I understand basic programming concepts. I don't need to learn what an if statement is, just how to command one.
My ethicator machine must have had a built-in moral compromise spectral release phantasmatron! I'm a genius!
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
Re: Brass 3.0.0.0 Beta 13
I've released a new beta of the assembler to the website. This fixes a bug with multiple forward-references in a single data statement and slightly improves the bundled TI calculator templates and include files. These are issues I've run into when developing Nostromo.
Re: Brass 3.0.0.0 Beta 13
Seems nice. I may look a second time to Brass. I know it has interesting features.benryves wrote:I've released a new beta of the assembler to the website. This fixes a bug with multiple forward-references in a single data statement and slightly improves the bundled TI calculator templates and include files. These are issues I've run into when developing Nostromo.
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
Re: Brass 3.0.0.0 Beta 13
I'd recommend Spasm instead, to be perfectly honest. It's certainly more robust.
Re: Brass 3.0.0.0 Beta 13
There could be some interesting things to implement in SPASM via macros.benryves wrote:I'd recommend Spasm instead, to be perfectly honest. It's certainly more robust.