Pascal for ZX81

Discussion about ZX80 / ZX81 Software
jdfan1000
Posts: 81
Joined: Tue Aug 02, 2016 8:06 pm
Location: Buffalo, NY
Contact:

Re: Pascal for ZX81

Post by jdfan1000 »

David Solly (who wrote about using Hi-Soft Pascal on his 2068 for some newsletters) has said he has a ZX81/1000 Pascal in storage, possibly with a manual. He's looking for it and will scan for me to upload to archive.org.
My archive.org collection, containing many Timex/Sinclair related publications.

TimexSinclair.com, my website about Sinclair computers in the US.
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Pascal for ZX81

Post by mrtinb »

Wow that sounds great.

I’ve found out a little by try and error.

In Partial Pascal:
  • Select 1 for editor
  • The only three-letter token I could get to work was PPP
  • Then hit Newline, and you are in the editor
  • You can exit the editor with Shift-G
  • If you renter the editor, there is only the first line
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
siggi
Posts: 988
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: Pascal for ZX81

Post by siggi »

I have a manual of partial PACSAL (a copy of copy of a horrible printout by a dot-matrix printer, nothing usable for OCR :( ).
I also have patched that PASCAL (long time ago!!) to use MEFISDOS instead of tape for program development.

The usual workflow is: edit PASCAL source (in ZX81 memory) and compile: output of compiler goes to tape (after patch: into a MEFISDOS file).
Load compiled code from tape and run it (save edited code before that!!!).

The 3 letter indicates, where standard-IO of PASCAL goes to: first param is input, second output, third printer.
Output usually goes to console or printer, input is usually coming from console or tape.

If necessary, I can dig out the paper manual ...

Siggi
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Pascal for ZX81

Post by mrtinb »

Please do so. We have been searching for it. The program is useless without it.

Do you have possibility to scan it?
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
siggi
Posts: 988
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: Pascal for ZX81

Post by siggi »

Ok, I will try ..

About standard IO:
N is (afaik) Nothing:
if you enter T for input of the editor, it reads existing input from tape (load source from tape)
if your enter C for editor, you can type in (from console) source text into editor
if you enter T for output of the editor, it saves source code to tape: If you select P, it prints out text

If you enter N as output of the compiler, it writes to nothing (syntax check only)
If you enter T as output, it saves compiled code on tape.
If you enter C (console) for input, you can enter source code directly into the compiler ;)

if you run a compiled program, the 3 letters define its own "input" (console, tape, nothing) or "output" (tape, console, printer, nothing) or "printer" (nothing, tape, real printer, console).

Siggi
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
User avatar
siggi
Posts: 988
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: Pascal for ZX81

Post by siggi »

My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
User avatar
siggi
Posts: 988
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: Pascal for ZX81

Post by siggi »

Here it is: hard to read, but better than NIL ;)
Semper-Partial-Pascal-Manual.zip
(18.09 MiB) Downloaded 228 times
Have fun
Siggi

PS. Is any page missing?
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Pascal for ZX81

Post by mrtinb »

Wow! Thank you so much!!!!
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Pascal for ZX81

Post by mrtinb »

jdfan1000 wrote: Mon Feb 08, 2021 9:12 pm David Solly (who wrote about using Hi-Soft Pascal on his 2068 for some newsletters) has said he has a ZX81/1000 Pascal in storage, possibly with a manual. He's looking for it and will scan for me to upload to archive.org.
It is great that Siggi found a scan. However jdfan1000, if you can find a better scan, as Siggi's version is unreadable several places.

Siggi! It's great you found this. I've been coding Pascal all weekend in EightyOne. Thank you for your article about patching for MEFISDOS. I'm thinking about a patch where memory 32-64k could be storage, and then exit pascal to save it to p-files. I currently use EightyOne, as I don't have a taperecorder, or a device capable of MEFISDOS.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Pascal for ZX81

Post by mrtinb »

Since I got hold of the manual I've used the weekends to play with and investigate Partial Pascal. I wondered if the object code generated with Partial Pascal was machine code with calls to a Pascal library, or tokens that needed an interpreter.

The below listing contains 3 prints:
  • First is output from a program I've made in Partial Pascal. The program dumps the content of a file as hex output. Here it is run with the object code of a small example program shown just below. (Ignore the last byte, as it comes from a small bug in my program.)
  • Secondly there is the source for the little example program, when it was run through the compiler. It displays that the generated object code is 42 bytes. But if we count the bytes of the object file above, we have 66 bytes. So some of the bytes must be header information and not the program.
  • Thirdly I entered the object code bytes into a disassembler, to see if that made any sense when comparing it to the source.
When I look at the bytes in the disassembler, it doesn't make any sense as code. So my conclusion is, that Partial Pascal generates some token bytes, that runs through an interpreter. So unfortunately Partial Pascal does not compile to machine language but just creates a compact code for an interpreter.

Any thoughts?

Image
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
Post Reply