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.
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 ROM_FREE: equ #7FD8-ROM_USE RAM_USE: equ _FinRAM-#C000 RAM_FREE: equ #7FD8-RAM_USE ;------------------------------------------------------------------------------- ; Début du programme EXECUTE: di im 1 ld SP,#F380 ; Initialise la Pile ld a,#C9 ; vide les interruptions ld (TIMI),a ld (HKEY),a ei call ROM32K ld a,2 call CHGMOD loop: jp loop ;------------------------------------------------------------------------------- ; ROM - DONNEES ; les noms/adresses des appels BIOS include "compile/bios.asm" ROM32K: ; Crée une rom de 32K include "compile/ROM32K.asm" _FinROM: ALIGN #4000 ;------------------------------------------------------------------------------- ; RAM - VARIABLES org #c000 Test1: ds 12 Test2: ds 10 _FinRAM: 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 ?
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
and0X
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: http://www.grauw.nl/projects/glass/
Newspost: https://www.msx.org/news/en/glass-z80-assembler-05
Enjoy!
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
Does it compile C-BIOS?
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? )
So I don’t recommend that people use $ to start symbols, it will not be supported anymore in the next release.
great news indeed. I am gonna try ASM again, so will give your assembler a try first
I tried out my second time around ASM, this time using Glass.
Works like a charm.
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.
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.