Glass Z80 assembler

Page 1/18
| 2 | 3 | 4 | 5 | 6

Par Grauw

Ascended (9687)

Portrait de Grauw

02-01-2014, 16:15

Fellows,

I have created a Z80 assembler. It is called Glass. It is cross-platform (Java 7).

The project site:

http://www.grauw.nl/projects/glass/

!login ou Inscrivez-vous pour poster

Par Manuel

Ascended (17696)

Portrait de Manuel

02-01-2014, 16:36

Hey, Grauw is back alive! (At least visibly...) welcome back!

Par Latok

msx guru (3817)

Portrait de Latok

02-01-2014, 16:37

It IS him! Nice Smile

Par Grauw

Ascended (9687)

Portrait de Grauw

02-01-2014, 18:11

Hey!

Post 1799… Smile

Par NYYRIKKI

Enlighted (5736)

Portrait de NYYRIKKI

03-01-2014, 10:50

Long time no C!

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

Par edoz

Prophet (2314)

Portrait de edoz

03-01-2014, 12:17

What about symstudio ?

Par Grauw

Ascended (9687)

Portrait de Grauw

03-01-2014, 14:52

Thanks for the responses Smile.

To give a little background; I was actually working on something else for the MSX, but then spoiled as I am with modern languages and silly things like block scopes and properties and types, I got a bit frustrated with the assembler and started to work on Glass Smile.

For the first version I focused on getting it on par with other assemblers in terms of features, so that I could replace my current assembler on the afore mentioned project. It supports regular and repetition macros, and block scopes. A little more advanced feature is that you can reference into scopes by using the dot (.).

I hope to add more advanced features in the future. Some ideas are extending macros to make them more useful for class definitions, multi-compiling methods (er, procedures), static analysis, automatic optimisations, debug output with timing information… Also, the ability to pass registers into macros so I can make one for “ld ix,de”, perhaps like this: MACRO r1, r2 / ld r1.lsb, r2.lsb / ld r1.msb, r2.msb / ENDM.

Par Creepy

Champion (332)

Portrait de Creepy

03-01-2014, 21:59

Just a quick question for which I could not find the answer in the readme: How can you define fields without creating output (to point to variabels in RAM when creating a ROM)? Sjasm uses # for that, tniasm uses RB.

Par Grauw

Ascended (9687)

Portrait de Grauw

03-01-2014, 23:46

Ah, it’s not currently possible, other than by using equ.

What I do is I actually define them in ROM (with a different ORG address), and then copy them to RAM. That way I can initialise the fields as I please. Like so:

;
; All RAM data is defined inside the marked section below
; These values are copied to RAM during program initialisation
;

RAM_Init:
    ld hl,RAM_dataStart
    ld de,RAM_dataStartAddress
    ld bc,RAM_dataSize
    ldir
    ret

RAM_dataStart:
    org 0C000H
RAM_dataStartAddress:
;=================================================================

Keys_lastScan:
    ds 11,0

; The initial ROM banks
; Stored as words that include the bank select register address
; Example: ld hl,(ROM_bank3) / ld (hl),l
ROM_bank1:
    dw 5000H
ROM_bank2:
    dw 7001H
ROM_bank3:
    dw 9002H
ROM_bank4:
    dw 0B003H

;=================================================================
RAM_dataSize: equ $ - RAM_dataStartAddress
    org RAM_dataStart + RAM_dataSize

I understand though that it would also be useful to do this kind of thing without generating output. I’ll put it in the bug tracker as an enhancement request. Need to think a little about the best way to do it. Maybe a new type of section.

Par Grauw

Ascended (9687)

Portrait de Grauw

04-01-2014, 00:35

This is my current line of thinking:

https://bitbucket.org/grauw/glass/issue/1/define-fields-with...

Seems like a nice idea, right?

Par Creepy

Champion (332)

Portrait de Creepy

04-01-2014, 11:09

I get an access denied message when trying to access the issue (I do have a bit bucket account)

Page 1/18
| 2 | 3 | 4 | 5 | 6