Glass Z80 assembler

Page 2/21
1 | | 3 | 4 | 5 | 6 | 7

Par Edwin

Paragon (1182)

Portrait de Edwin

04-01-2014, 11:34

NYYRIKKI wrote:

Some day I would like to see a standalone Z80-assembler that can compile SymbOS sources.

I do (well did a long while ago) that with tniasm. It was a simple matter of assembling with two different ORGs and generating a relocation table based on the results. For the latter I wrote a small tool. Dump the whole thing in a makefile and you don't even know that it's doing all that. Should work for every assembler.

Par Grauw

Ascended (10821)

Portrait de Grauw

04-01-2014, 12:01

@Creepy sorry, I fixed the permissions now. I’ll quote it here too:

Quote:

Idea:

ds VIRTUAL 4000H

Could be combined with a SECTION block:

    org 4000H
ROM_PAGE1: ds 2000H
ROM_PAGE2: ds 2000H
ROM_PAGE3: ds 2000H
ROM_PAGE4: ds 2000H
RAM: ds VIRTUAL 3000H

    SECTION ROM_PAGE1
SetValue:
    ld (value),a
    ret

    SECTION RAM
value: db 0
    ENDS
    ENDS

Par Creepy

Champion (335)

Portrait de Creepy

04-01-2014, 13:21

I like it. Especially combined with SECTION. Could it also be used without SECTION, just using ORG?
E.g:

  ORG 4000h
  LD a,1
  LD (value), a

  ORG C000h
value: DS VIRTUAL 2

Par Grauw

Ascended (10821)

Portrait de Grauw

04-01-2014, 13:35

Yeah.

Par Grauw

Ascended (10821)

Portrait de Grauw

04-01-2014, 18:37

I released version 0.2 which implements this.

Quote:
  • Added a section directive to assemble code into groups.
  • A virtual annotation can be specified on ds.
  • Search includes relative to source path.
  • Support negating flags (!z).

Par Creepy

Champion (335)

Portrait de Creepy

04-01-2014, 23:20

That's quick. Thanks. I'll be testing a bit of stuff with it tomorrow.

Par Grauw

Ascended (10821)

Portrait de Grauw

26-04-2016, 22:59

Since the 0.3 and 0.4 releases it’s been quiet for a while, but I’ve recently made some improvements:

  • The ternary if operator (x ? a : b) is now supported
  • The binary include (INCBIN) directive is now supported
  • Macro arguments can now have default values (using MACRO arg = 15 syntax)
  • REPT and IRP are now terminated with ENDR (for compatibility ENDM still works)

Also some nice changes that were made last year:

  • Optional ONCE annotation for INCLUDE to ignore a file if it’s already been included earlier
  • Expressions / argument lists can span multiple lines when they’re incomplete (end with dangling operator)

Also I never posted about the 0.4 release here it seems, but it adds support for the # and % prefixes for hexadecimal and binary values, respectively.

And of course a bunch of bugfixes were done as well.

I’ve got a few more things on the wishlist, I’ll see if I have motivation to implement them but otherwise I’ll try to make a new release next month orso.

Par spacemoai1973

Ambassador (0)

Portrait de spacemoai1973

27-04-2016, 12:14

This assembler tries hard to be incompatible with all others. There are better and more compatible assemblers.

Par Grauw

Ascended (10821)

Portrait de Grauw

27-04-2016, 13:01

Fuck you spacemoai.

Also, I don’t see how that’s true. I’ve looked carefully at other assemblers and adopted common syntax for standard features where I could, and only deviate where every other assembler does it differently as well. It should be a superset of gen80 for the most part, for instance. If I didn’t want to stay compatible I’d throw out things like support for labels without :, #/% hex/bin prefixes, etc. in an instant. But I do want to take this assembler in a bit different direction, so I obviously won’t limit myself to a 100% compatible subset of other assemblers, because then what would be the point to make a new assembler.

But please, if you’re not just a fucking 9-weeks-old troll, let me know the feature that you are missing, or the syntax that you would like to see different. Some constructive feedback I could actually work with, you know, or at least respond meaningfully to, in stead of just being a dick.

Par spacemoai1973

Ambassador (0)

Portrait de spacemoai1973

27-04-2016, 13:01

You have claimed this about other assemblers, that are more compatible than yours so why you react like this?
your MAP site is filled with #hex syntax so why you say you would remove it.?

Page 2/21
1 | | 3 | 4 | 5 | 6 | 7