MaxCoderz

for your 1 bit pleasure!

All times are UTC




Post new topic Reply to topic  [ 299 posts ]  Go to page 1, 2, 3, 4, 5 ... 20  Next
Author Message
PostPosted: Wed 30 Nov, 2005 10:49 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
One logical step up for Latenite is to not have to be bundled with a 3rd party assembler.
Mainly because one (high profile!) user is having real problems getting the buggy TASM to work with it, and other people have expressed annoyance with TASM, (limited string length, limited label length, limited numbers of DBs, lack of features, buffer overflow crashes... the usual) I have decided that I need to write an assembler (BRASS).
WLA-DX is very nice but is geared towards console development and burning programs on ROMs, and defining a ROM bank map for a TI-83 Plus program is a bit silly. I will try and keep it as compatible with TASM as possible, so old TASM-geared code still compiles, but will add some new features.
Just to show that this isn't just an idea and that I am actually doing something about it, have an evening's work;
Image
(BRASS at the top, TASM at the bottom - not that it actually matters!)
A lot of work still needs to be done - supporting ZIDX/ZIX/ZBIT instructions (anything like BIT *,A or LD A,(IX*)) is a pretty important one, for starters. The expression parser (for things like "_label+21" needs to actually parse expressions (all it does at the moment is check for and substitute in labels or numbers). Directives for conditionals and macros (and macros themselves!) need to be worked in.

Currently supported directives: .org, .include (#include maps to .include), .locallabelchar and .module.

.include could do with some work, this will compile (or rather, it won't ever get into pass 2):

File: test.asm
Code:
.include "test.asm"


I also need ideas for directives. Some are already in my mind (.dbsin, .include_once (like PHP's require_once()), .incbin)... What would you implement if you were writing a Z80 assembler?


Last edited by benryves on Fri 27 Jul, 2007 10:31 am, edited 36 times in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 30 Nov, 2005 12:45 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 4094
Location: I cant seem to get out of this cryogenic chamber!
This is a great idea ben! More than 30 array elements per line would be a great feature, especially when strings are concerned.

Here is a nice TASM reference with a list of directives and stuff: http://home.comcast.net/~tasm/tasmman.htm

_________________
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image


Top
 Profile  
Reply with quote  
PostPosted: Wed 30 Nov, 2005 3:01 pm 
Offline
Calc King
User avatar

Joined: Sun 23 Jan, 2005 12:37 am
Posts: 1727
Location: Netherlands
Ben, you rock! :P Why do you call it BRASS?

benryves wrote:
one (high profile!) user

Smiles in silence :)

_________________
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  
PostPosted: Wed 30 Nov, 2005 3:05 pm 
Offline
Calc King
User avatar

Joined: Sat 18 Dec, 2004 6:46 am
Posts: 2932
Timendus wrote:
Ben, you rock! :P Why do you call it BRASS?

benryves wrote:
one (high profile!) user

Smiles in silence :)

B/c BRASS KICKS A**.
Ben this is looking sweet!


Top
 Profile  
Reply with quote  
PostPosted: Wed 30 Nov, 2005 3:20 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Timendus wrote:
Why do you call it BRASS?
My initials combined with assembler. Maybe the lack of differentiation between arse (backside) and ass (donkey) in US English means this is a bad choice... :wink:


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 30 Nov, 2005 3:50 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 4094
Location: I cant seem to get out of this cryogenic chamber!
Did 'BRASM' ever cross your mind?

_________________
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 30 Nov, 2005 3:54 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
tr1p1ea wrote:
Did 'BRASM' ever cross your mind?
Well, it's really Brass. I tend to stick to words that make sense (so a DOOM-like engine I was toying with was called "Broom").
Though, to be honest, the actual name is of little real importance!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 30 Nov, 2005 8:20 pm 
Offline
Calc King

Joined: Thu 13 Oct, 2005 1:54 pm
Posts: 1950
Location: UB
How about a poll with possible names? :mrgreen:

anyone have suggestions for names that could be put on the poll? :D

_________________
In Memory of the Maxcoderz Trophy Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 30 Nov, 2005 8:36 pm 
Offline
Calc King

Joined: Sun 27 Mar, 2005 4:06 am
Posts: 2195
Location: sleeping
BRASS sounds good to me.

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 30 Nov, 2005 8:38 pm 
Offline
Calc King
User avatar

Joined: Sun 26 Dec, 2004 5:27 am
Posts: 2457
Location: SXIOPO = Infinite lives for both players
I like brass, i think it's cool. A name suited for the project who's goal is to replace tasm. :)
Anyway, a project like this is LONG overdue. Ben if you achieve this you are my hero.

As for requests more support for Multipage apps and OSes.

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 30 Nov, 2005 9:49 pm 
Offline
Calc King
User avatar

Joined: Sun 23 Jan, 2005 12:37 am
Posts: 1727
Location: Netherlands
I agree with Jim on all accounts :)

_________________
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: Wed 30 Nov, 2005 10:14 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Wed 15 Dec, 2004 6:06 am
Posts: 579
Location: Chicago!
I'd really rather see Z80 added to NESHLA.

_________________
You know your hexadecimal output routine is broken when it displays the character 'G'.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu 01 Dec, 2005 10:41 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Main updates:
Expression parsing now works, but in a non-TASM way. The easiest approach I could think of was a simple recursion splitting up the expression by parentheses and operators. It doesn't add up in left->right order, thanks to this, and as a result unless you wrap everything in parentheses the order of operation is very odd.
Fixed bug where 16-bit operations declared in the table file weren't being flipped.
Z80 index (ZIX/ZIDX) instructions added.
Binary is no longer written in the order of instructions in the file: eg;
Code:
.org 1
.db 'A'
.org 0
.db 'B'

...should produce BA, not AB.

Supported directives (anything in [brackets] is an alias):
.org
.include [#include]
.locallabelchar
.module
.db [.byte] [.text]
.dw [.word]
.block
.chk
.echo
.equ [=]
.export
.fill

What needs doing:
Not all ZBIT directives work at the moment :( I need a document on them (building an assembler without a machine-code reference is a stupid idea, after all!).
Macros! TASM is thankfully quite simple, just basic find-and-replace style macros.
TASM-like expression parsing (including substituting $ for current IP), as well as adding % ~ = != < > <= >= operators.

Dwedit wrote:
I'd really rather see Z80 added to NESHLA.
The main priority for me is to get a really basic assembler that works like TASM, so I can get rid of TASM's oddities. In the same way that I can use WLA-DX to assemble TI projects, but it's not TASM compatible.
Quote:
As for requests more support for Multipage apps and OSes.
I'm not sure what this would really require me to do, not ever having assembled a multipage app/OS.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu 01 Dec, 2005 3:22 pm 
Offline
Calc King
User avatar

Joined: Sun 23 Jan, 2005 12:37 am
Posts: 1727
Location: Netherlands
Don't forget

.define [#define]
.ifdef [#ifdef]
.ifndef [#ifndef]
.else [#else]
.endif [#endif]

_________________
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: Thu 01 Dec, 2005 4:26 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Timendus wrote:
Don't forget

.define [#define]
.ifdef [#ifdef]
.ifndef [#ifndef]
.else [#else]
.endif [#endif]
Oh yes (see "What needs doing:") - macros.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 299 posts ]  Go to page 1, 2, 3, 4, 5 ... 20  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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:  
cron
Powered by phpBB ® Forum Software © phpBB Group | DVGFX2 by: Matt