Page 1 of 1

Pasmo Issue

Posted: Sat Aug 26, 2017 11:04 pm
by bru65pag
Good evening,
I'm struggling with PASMO when it comes to writing a line of BASIC to call me assembly routine. All goes well if I know in advance the address where it will start:
basic_0010: defb 0,10 ; 10 RAND VAL "USR 16514"
defw basic_0020-basic_0010-4
defb _RAND,_VAL,_DQT,_USR,_1,_6,_5,_1,_4,_DQT

But suppose I want to start at label L001, which address won't be known until compilation. How should I do that with PASMO?

Thanks for the help you can provide. Bruno.

Re: Pasmo Issue

Posted: Sun Aug 27, 2017 12:40 am
by Andy Rea
it been a long time since i used Pasmo, but... i have been using the ZX-IDE that pokemon has put together viewtopic.php?f=6&t=1064&hilit=fasm

with it you can have a single source file that contains both assembler and basic with labels using between both the assembler and basic.. it is quite simply the best ZX81 ide I've used to date.

give it a go you might be pleasantly surprised.

regards Andy

Re: Pasmo Issue

Posted: Sun Aug 27, 2017 9:08 am
by bru65pag
Hi Andy,
thanks for the suggestion. I'm quite familiar with ZX-IDE already. On Linux, I wanted to use native Linux running tools instead of going through wine to use ZX-IDE.
On the problem I submitted, I would be surprised if all Plasmo users were force to compute by hand the address where they want their program to start.

Re: Pasmo Issue

Posted: Sun Aug 27, 2017 9:34 am
by sirmorris
You could use a vector/jump table as the first few bytes of your code. The benefit is that you never need to worry about updating addresses again.

Code: Select all

[16514]  JP INIT
[16517]  JP DOSTUFF
[16520]  JP CLEANUP
etc. etc.