Looking for working assembler to compile SymbOS app.

Por NYYRIKKI

Enlighted (5541)

Imagen del NYYRIKKI

21-03-2020, 15:24

Hi,

I would like to develop some programs for SymbOS, but as pure MSX user I must say I'm really not a big fan of WinAPE emulator as a development environment for number of reasons including that I can't minimize or close the Amstrad emulator, there is no comment block, ";" does not necessarily comment out all of the line, I'm practically forced to use the embedded text editor etc. etc.

Now my question is: Is there any other Z80 assembler out there that could automatically generate me relocation tables that SymbOS executables are expected to include? If you don't get what I mean, this listing output probably should explain it self well enough:

000003  0000  (1000)        org #1000
000004  1000                relocate_start
000006  1000  21 07 10      	ld hl,test
000007  1003  11 08 10      	ld de,test2
000008  1006  C9            	ret
000010  1007  00            test	db 0
000011  1008  00            test2	db 0
000013  1009  02 00         	dw relocate_count
000014  100B  04 00         	dw relocate_size
000016  100D  01 10 04 10   relocate_table
000017  1011                relocate_end
Login sesión o register para postear comentarios

Por sd_snatcher

Prophet (3270)

Imagen del sd_snatcher

21-03-2020, 15:33

Are those equivalent to the LINK-80 REL files?

I know there's a help request to implement support on sjasmplus. I'll keep following this thread to see if anything else shows up.

Por NYYRIKKI

Enlighted (5541)

Imagen del NYYRIKKI

21-03-2020, 15:54

sd_snatcher wrote:

Are those equivalent to the LINK-80 REL files?

I took a quick look and I must say, I can't make head or tails what those REL-files include, but at least not the stuff that I need in correct format... This Macro assembler also feels quite oldish, the file output is CP/M, so the file sizes are fixed to 128 byte record size and so on... -> Causes more problems than solves.

Por NYYRIKKI

Enlighted (5541)

Imagen del NYYRIKKI

21-03-2020, 18:29

sd_snatcher wrote:

I know there's a help request to implement support on sjasmplus. I'll keep following this thread to see if anything else shows up.

This is not quite a same thing, so I opened a new request:
https://github.com/z00m128/sjasmplus/issues/99

Let's see if that catches some attention... You don't know, if you don't ask. :)

Por Ped7g

Supporter (9)

Imagen del Ped7g

13-07-2020, 23:39

sd_snatcher wrote:

Are those equivalent to the LINK-80 REL files?

Not even close. There are two parts to this request:

one part is the raw relocation table, that's just dump of `uint16_t` values marking offsets in the machine code which should be patched by the loader (this does allow to relocate only instructions working with 16bit values, so tricks like `ld h,high someLabel` will not get relocated). This becomes part of regular machine code output from assembler.

second part is SymbOS executable structure, putting such raw relocation table at expected place in binary and adding further meta data in header to make the OS aware how to load it and relocate it.

Neither of that involves object files or linking with WinAPE, the executable structure is generated manually from asm source by DB/DW statements, so the binary output from assembler is already final executable file.

I did take a look at Link-80 REL files before, but they seem very limited and I would need somebody actively using the tools to verify some edge-cases for me, what happens, as the format docs leave some room how to interpret some cases. So I stopped active work on that option. But that's off-topic here.

With regard to SymbOS binaries and WinAPE-like relocation support, the active work is now going on, I have about 30% of implementation done... if no disaster happens, the next release of sjasmplus should have enough support to build SymbOS executables with it.