Pasmo Issue

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

Pasmo Issue

Post by bru65pag » Sat Aug 26, 2017 11:04 pm

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: 1399
Joined: Fri May 09, 2008 2:48 pm
Location: notts UK

Re: Pasmo Issue

Post by Andy Rea » Sun Aug 27, 2017 12:40 am

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
6 x ZX81, 1 x TS1500 , 1 x +3e, 1 x timex 2040 printer, 1 x timex 2020 cassette deck, siclair printer and some spectrum

Posts: 15
Joined: Sun Dec 20, 2015 12:09 pm

Re: Pasmo Issue

Post by bru65pag » Sun Aug 27, 2017 9:08 am

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.

Posts: 2813
Joined: Thu May 08, 2008 5:45 pm

Re: Pasmo Issue

Post by sirmorris » Sun Aug 27, 2017 9:34 am

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