Pasmo Issue

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
bru65pag
Posts: 23
Joined: Sun Dec 20, 2015 12:09 pm

Pasmo Issue

Post 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.
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: Pasmo Issue

Post 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
what's that Smell.... smells like fresh flux and solder fumes...
bru65pag
Posts: 23
Joined: Sun Dec 20, 2015 12:09 pm

Re: Pasmo Issue

Post 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.
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: Pasmo Issue

Post 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.
Post Reply