Expanding ZX BASIC for more commands?

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
sirmorris
Posts: 2813
Joined: Thu May 08, 2008 5:45 pm

Re: Expanding ZX BASIC for more commands?

Post by sirmorris » Tue Dec 03, 2013 11:12 am

The way that the extended basic works is incompatible with ZXpand. It is a copy of the interpreter's main loop in RAM. It adds error handling and new commands to the mix by using a modified copy of the command table. It's an amazing piece of work. ZXpand's ROM also modifies the command table, and as Pokemon already stated, ROM functions have moved. I spoke briefly with Mathias in Germany at the ZX-Team meeting and I think we may have decided it was possible to modify it but that was as far as we got. One thought was to copy the command table from the ROM instead of shipping it in the binary..


C

tdg8934
Posts: 297
Joined: Mon Sep 23, 2013 6:10 pm

Re: Expanding ZX BASIC for more commands?

Post by tdg8934 » Tue Dec 03, 2013 12:30 pm

Thanks Rich. I tried this but then you loose access to the files on the SD card (i.e. CAT is now COPY) so when you LOAD "PBREAD.P" the screen goes blank and freezes up. Here is my sequence of events with ZXPand.

LOAD "PB12K"
RUN (New commands list is shown correctly)
NEW (Pauses and loads into memory finally displaying "ZX81 BASIC Version 1.02 12K" with flashing K prompt)
CAT (Seems to disable the new commands by reseting to ZXpand 2.x screen (normal inverse K - not flashing but shows SD card files)

Repeating again....

LOAD "PB12K"
RUN (New commands list is shown correctly with OK prompt)
NEW (Pauses and loads into memory finally displaying "ZX81 BASIC Version 1.02 12K" with flashing K prompt)
LOAD "PBREAD.P" (loads with the OK prompt but doing a LIST shows does not show the program listing) - a RUN afterwards does nothing. I can use any program and the same results occur.

Sequence of events with ZXPand disabling the ROM:

LOAD "PB12K;X"
RUN (New commands list is shown correctly with OK prompt)
NEW (Pauses and loads into memory finally displaying "ZX81 BASIC Version 1.02 12K" with flashing K prompt)
CAT (Shows as COPY because ROM is disabled)
LOAD "PBREAD.P" (causes the screen to blank and freeze - probably because it can't access the SD card)


Disabling the ROM is not good then

Other ideas?

Thanks,

Tim

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

Re: Expanding ZX BASIC for more commands?

Post by sirmorris » Tue Dec 03, 2013 12:37 pm

The second LOAD is most likely trying to load from tape. Does the machine respond to BREAK?

tdg8934
Posts: 297
Joined: Mon Sep 23, 2013 6:10 pm

Re: Expanding ZX BASIC for more commands?

Post by tdg8934 » Tue Dec 03, 2013 1:25 pm

I don't believe it responds to anything other than resetting power. I'll have to check it again tonight after work to be sure.

Tim

tdg8934
Posts: 297
Joined: Mon Sep 23, 2013 6:10 pm

Re: Expanding ZX BASIC for more commands?

Post by tdg8934 » Tue Dec 03, 2013 4:59 pm

I read in the manual that it was compatible with Pure BASIC. "Pure Basic-programs can be run with **Basic without any restrictions"

What is Pure BASIC and it's relationship with the ZX81/TS1000? I saw the website but did not see references to the zx81/TS1000. Can someone explain how they are connected?

Thanks,

Tim
Attachments
Doku-EnBASIC.pdf
(147.19 KiB) Downloaded 80 times

tdg8934
Posts: 297
Joined: Mon Sep 23, 2013 6:10 pm

Re: Expanding ZX BASIC for more commands?

Post by tdg8934 » Tue Dec 03, 2013 11:40 pm

Sir Morris,

I tried this sequence again and got different results when repeating and NOT entering CAT (still not good - when the ZXPand/ZXpand-AY is used):

LOAD "PB12K"
RUN (New commands list is shown correctly)
NEW (Pauses and loads into memory finally displaying "ZX81 BASIC Version 1.02 12K" with flashing K prompt)
CAT (Seems to disable the new commands by reseting to ZXpand 2.x screen (normal inverse K - not flashing but shows SD card files)

(Above is the same as before)

Reset Power - Repeating sequence - different results as before

LOAD "PB12K"
RUN (New commands list is shown correctly)
NEW (Pauses and loads into memory finally displaying "ZX81 BASIC Version 1.02 12K" with flashing K prompt)

LOAD "CMDR.P" (Displays prompt as "OK") (also tried known list-able other programs I wrote such as LCDON.P)
RUN (Displays prompt as "OK)
LIST (Displays prompt as "OK") - No program is listed


Repeating sequence (disabling overlay ROM)

LOAD "PB12K;X"
RUN (New commands list is shown correctly)
NEW (Pauses and loads into memory finally displaying "ZX81 BASIC Version 1.02 12K" with flashing K prompt)

LOAD "LCDON.P" {or CMDR.P} (Screen goes white blank - but I can press the BREAK key and it displays the "OK" prompt - No Listing when LIST is performed - just "OK" prompt)

So it looks like since the overlay ROM is disabled it can't read the SD card and trying for tape as you stated - since a BREAK will bring back at least this "OK" prompt

Tim

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

Re: Expanding ZX BASIC for more commands?

Post by sirmorris » Fri Dec 06, 2013 1:14 pm

Hmm, this had me thinking that perhaps I could provide a LOAD/SAVE routine for use with the extended BASIC. I wonder if Matthias is still developing it..

tdg8934
Posts: 297
Joined: Mon Sep 23, 2013 6:10 pm

Re: Expanding ZX BASIC for more commands?

Post by tdg8934 » Fri Dec 06, 2013 3:31 pm

Thank you Sir Morris.

Here is some email correspondence with Mathias.


Timothy Gilmore <tdg8934@gmail.com> schrieb:

Hello,

I saw your Power BASIC software on your website and think it is wonderful. I have a ZXPand and ZXPand-AY (sound card) hardware device for my TS1000 to give it SD card and 32K ram capability. I have been having a difficult time trying to get it to work with Power Basic 1.02. Have you had experience with this or have any recommendations. My forum posts are here: viewtopic.php?f=5&t=1255 or you can email me also to tdg8934@gmail.com.

Thank you,

Tim Gilmore

------------------------------------------------------

swatosch <Swatosch@gmx.de>

Dec 4 (2 days ago)

to me
Hi Tim,

I do not have a ZXPand. So I can not double check this. I think I made some modifications together with Charlie Robson last Zx81 meeting in Mahlerts. Have to check this tonight. Maxbe I mix this up with hrgms.
Give you more infos soon...

Matthias

----------------------------------------------------------------------

Timothy Gilmore <tdg8934@gmail.com>

Dec 4 (2 days ago)

to swatosch
Thanks Matthias. I also wanted to let you know the HRGMS 16k and 64k P files don't allow you to press the BREAK key when they are run displaying the screen and picture of the ZX81. They stay on this screen. This is with the ZXPand and ZXPand-AY cards.

I believe more and more people are using Charlies ZXPand for the 32K ram and especially for the fast SD card program access. That's why I got back into the game with this again.

What ever help or guidance you can provide on this would be great!

Thank you,

Tim Gilmore

Post Reply