Email or username:

Password:

Forgot your password?
Top-level
WimⓂ️

@neauoire OK, I understand that bit. But I don't understand why I would need to get the offsets at compile time to do the tail call optimisation. Is it not correct to do
label JMP2r => !label ?

12 comments
Devil Lu Linvega

@wim_v12e OOOooh, wait. Are you generating uxntal, that you're then assembling with uxnasm/drifblim? Or are you going straight from fortrant to bytecode?

WimⓂ️

@neauoire I generate uxntal, that is much easier for development and debugging. You have all the tools for going to bytecode.

Devil Lu Linvega

@wim_v12e aaah, then yes, nothing to worry about there then.

I'm not sure if you've seen @bellinitte's padding mod to #uxntal (merveilles.town/@bellinitte/11) but you miiight be able to make use of this somehow.

WimⓂ️ replied to Devil Lu Linvega

@neauoire @bellinitte I hadn't seen that. That looks like a cool way to statically allocate memory, I will definitely keep it in mind.

WimⓂ️

@neauoire Is the purpose of the .rom.sym files to allow to link roms?

Devil Lu Linvega

@wim_v12e no, it's just for debuggers and disassembly.

WimⓂ️ replied to Devil Lu Linvega

@neauoire OK, I see. So that information should be enough to link a label to an address. What would be needed for linking would be to add a fixed offset to all absolute addresses in a rom.

WimⓂ️ replied to Devil Lu Linvega

@neauoire Sorry, I didn't provide enough context. Suppose you have an tal program and you call a function that is not defined in the source code, but you have a .rom and .rom.sym for it. From the .rom.sym you can get the address for the label, but that will in general not work because you need to combine the roms for both. So you'd need to apply some offset to the rom so that its content fits after the content of your source file. For that you'd need to know at which address your source ends.

Devil Lu Linvega replied to WimⓂ️

@wim_v12e Oh! yes, the format is pretty limited. It won't be able to do this sort of gymnastics yet.

Go Up