Glass Z80 assembler

Pagina 6/18
1 | 2 | 3 | 4 | 5 | | 7 | 8 | 9 | 10 | 11

Van Grauw

Ascended (10175)

afbeelding van Grauw

14-12-2016, 18:44

Hi sfranck72, symbol file to output can be specified on the command line, see the documentation. You can also make an EQU with a formula to calculate the amount of free space, this will be output to the symbol file as well.

Hope that helps.

Van sfranck72

Resident (42)

afbeelding van sfranck72

15-12-2016, 01:14

I've found the command for the symbol file, thanks.
But, I don't understand the meaning of the EQU + formula.
I try this :

; main .ROM for cartridge environment
; Compile:
;    java -jar glass.jar main.asm main.rom main.sym

; Compilation address

	org #4000
; ROM header
	db "AB"     ; for ROM purpose
	dw EXECUTE  ; program execution address
	dw 0, 0, 0, 0, 0, 0

; bytes used | bytes free
; #7FD8 = 1024*32
ROM_USE:	equ	_FinROM-#4000 
RAM_USE:	equ	_FinRAM-#C000

; Début du programme
	im	1
	ld	SP,#F380			; Initialise la Pile
	ld	a,#C9				; vide les interruptions
	ld	(TIMI),a
	ld	(HKEY),a

	call	ROM32K
	ld	a,2
	call	CHGMOD
	jp loop

	; les noms/adresses des appels BIOS
	include "compile/bios.asm"
	; Crée une rom de 32K
	include "compile/ROM32K.asm"

	ALIGN #4000


    org #c000
	ds	12
	ds	10

	ds	-$ & #3FFF

But there's nothing in my symbol file :

ALIGN: equ 402AH
EXECUTE: equ 4010H
ROM32K: equ 402AH
Test1: equ 0C000H
Test2: equ 0C00CH
_FinRAM: equ 0C016H
_FinROM: equ 404AH
loop: equ 4027H

What I'm doing wrong ?

Van Grauw

Ascended (10175)

afbeelding van Grauw

23-02-2020, 16:52

Glass 0.5 has been released!

It’s been a while since the last release, with quite a number of improvements since, so a release was past due!

What’s new in Glass 0.5:

  • The incbin directive is now supported.
  • The ternary ?: operator is now supported.
  • The . member operator is now an official operator.
  • Sequences can now be indexed with the [] operator.
  • Symbols can now also start with the $ character.
  • Include now supports the once annotation.
  • The 0x and 0X prefix can now be used for hexadecimal numbers. Thanks to Paul Bosselaar.
  • Macro arguments can now specify default values with =.
  • Expressions can now span multiple lines.
  • The org statement no longer affects the address of a preceding label (bc).
  • Some invalid instructions now throw errors (e.g. bit 7,ixh).
  • Contexts are now resolved through macro arguments.
  • Instructions and macros can now be passed into macro arguments.
  • Section identifiers are now resolved like any other expression.
  • Examples for COM, ROM and BIN files are now included in the source code.
  • Error messages were improved.
  • Java 8 is now required.

Project page:



Van santiontanon

Paragon (1526)

afbeelding van santiontanon

18-01-2017, 22:20

great news! I am using Glass as my default compiler these days. So, updates are always welcome! And a few of these updates will come in very handy Smile

Van Manuel

Ascended (18254)

afbeelding van Manuel

18-01-2017, 22:24

Does it compile C-BIOS? Smile

Van Grauw

Ascended (10175)

afbeelding van Grauw

18-01-2017, 23:26

Just pushed another change (not in 0.5):

  • The $ prefix can now be used for hexadecimal numbers.
  • Symbols can no longer start with the $ character (bc).

(How many notations for hexadecimal do people need? oO)

So I don’t recommend that people use $ to start symbols, it will not be supported anymore in the next release.

Van Wolverine_nl

Paragon (1159)

afbeelding van Wolverine_nl

19-01-2017, 16:56

great news indeed. I am gonna try ASM again, so will give your assembler a try first Smile

Van Wolverine_nl

Paragon (1159)

afbeelding van Wolverine_nl

25-01-2017, 21:13

I tried out my second time around ASM, this time using Glass.
Works like a charm. Smile

Van DarkSchneider

Paladin (942)

afbeelding van DarkSchneider

26-01-2017, 08:47

Hi, could it output REL files? For integration with C programs. I have to use M80 (a bit deprecated) because is the only one (I think) that output REL files. Thanks.

Van Grauw

Ascended (10175)

afbeelding van Grauw

26-01-2017, 13:30

Hi DarkSchneider, eventually I would like to do it but not in the short term. REL puts restrictions on the source code and expressions that can be used, and also needs some new directives. It would hinder me while expanding the assembler in the direction that I’m intending, because it introduces a lot of additional complexity to deal with, so now is not the right time for it.

When it is closer to the full set of functionality I have in mind I will reconsider, but this is not soon, since I’m only working on the project when I feel like it and/or need a certain feature for my own purposes.

Pagina 6/18
1 | 2 | 3 | 4 | 5 | | 7 | 8 | 9 | 10 | 11