Glass Z80 assembler

Page 13/16
6 | 7 | 8 | 9 | 10 | 11 | 12 | | 14 | 15 | 16

By Grauw

Ascended (9072)

Grauw's picture

23-02-2020, 16:55

I worked on Glass a bit, new development build here: http://www.grauw.nl/projects/glass/

I added equs and symbols in macro definitions to the symbol file output as requested here and by wlcracks (I think it was him, @ Nimega :)). I also fixed a bug with the address of a label associated with an include statement. Thanks to Maarten Loor for reporting.

Additionally I made the changes to the handling of labels inside ifs that I discussed earlier. And I made improvements to the way directives are handled which makes them work better when used in certain nested scenarios, e.g. include inside if. So santiontanon should be happy as well.

It passes my 349 unit tests and the six of my projects I tried to compile with it, please try out the build and let me know if there are further issues you would like addressed.

By Wlcracks

Champion (421)

Wlcracks's picture

21-02-2020, 15:11

Cool looks like its working! I have to test this further though, calculating the page locations at compile time. (= just work)
(i was sick in bed at Nimega, i guess its was Stephan or Maarten)
Thanks!

By Grauw

Ascended (9072)

Grauw's picture

23-02-2020, 16:57

Grauw wrote:

I put development builds here: http://www.grauw.nl/etc/msx/glass.jar

Soon I’ll make a project page on my website to replace BitBucket, and I’ll make sure to include a link to the development build there as well.

New project page: http://www.grauw.nl/projects/glass/

Source is now hosted by SourceHut.

By Wlcracks

Champion (421)

Wlcracks's picture

23-02-2020, 17:59

Nice!

By Wlcracks

Champion (421)

Wlcracks's picture

29-02-2020, 15:23

I was wondering if its possible to use macro's within ram area? I am doing something wrong because this doesnt work:


	s_rom: ds #4000
	s_ram: ds VIRTUAL #2000

m_var_ram: MACRO
	
	v_test: db 0
	
	ENDM

	SECTION s_rom

	org 	#4000
	
	db #41	; "A"									
	db #42	; "B"
	dw p_init	; start of the init code, 0 if no initcode
	dw #0000	; pointer to CALL statement handler, 0 if no such handler
	dw #0000	; pointer to expansion device handler, 0 if no such handler
	dw #0000	; pointer to the start of a tokenized basicprogram, 0 if no basicprogram
	dw #0000	; room reserved for future extensions
	dw #0000
	dw #0000

p_init:
	ld a,2
	ld (v_test),a
	
	jr $
	
	ENDS
	
	SECTION s_ram
	
	org #c000
	
	m_var_ram
		
	ENDS

By Wlcracks

Champion (421)

Wlcracks's picture

29-02-2020, 15:31

When changing the ram section like this, glass just ignores the m_var_ram, seems it.

	SECTION s_ram
	
	org #c000
	
	m_var_ram
	v_test: db 0
		
	ENDS

By Bengalack

Master (135)

Bengalack's picture

22-05-2020, 10:10

Thumbs up! Considering starting using this assembler Smile

Usage: java -jar glass.jar [OPTION] SOURCE [OBJECT] [SYMBOL]

What kind of file is the object-file? What extension should I use? And which program(s) could I use to link and produce .com/.rom/.bin or .ihx-files?

By thegeps

Champion (442)

thegeps's picture

22-05-2020, 13:06

My object files are .bin or .rom, simply I change the extension I use due to the header I put in my source code...
Never did .com files, but I think it is the same way

By Grauw

Ascended (9072)

Grauw's picture

22-05-2020, 13:31

Hi Bengalack, in addition to what @thegeps said, there are a few examples here.

Glass does not produce linkable rel-files.

By Bengalack

Master (135)

Bengalack's picture

22-05-2020, 19:10

Ah, nice! Looks really straight-forward. Looking forward to use this.

Page 13/16
6 | 7 | 8 | 9 | 10 | 11 | 12 | | 14 | 15 | 16