Page 2 of 2

Re: Prospero Pascal BEEP

Posted: Tue Jun 30, 2020 11:48 pm
by tofro
NormanDunbar wrote:There's a missing 'e' in "KeyPressd" when Regs.D0 <> 0. :(
.
Yeah. Apparently, I missed a KeyPrss. :D

Thanks, Norm. Fixed.

Tobias

Re: Prospero Pascal BEEP

Posted: Wed Jul 01, 2020 8:27 am
by NormanDunbar
I alwys mss out some ky prsses!

Re: Prospero Pascal BEEP

Posted: Sat Jul 04, 2020 11:16 pm
by stevepoole
Hi Folks,

Thanks to Tofro, we now have both BEEP and INKEY$ routines for Prospero Pascal which work fine.

So now we can produce Pascal games (with the equivalent of RANDOMISE), with full sound...

Our aim is to transcode QL programs to run on other systems.... DONE !

But we write our code first on QLs, which are great for prototyping...

QL Forever !

Steve.

Re: Prospero Pascal BEEP

Posted: Mon Jul 20, 2020 7:53 am
by stevepoole
Hi everybody,

1) Turtle graphics, (pendown, penup, turnto, turn and move), are missing on Prospero Pascal.
Has anyone been able to implement these for that language ?

2) Restore, read and data are also missing, but I doubt if they can be emulated ?
(Workarounds are possible, if clumsy) !

Many thanks for past advice.
Steve.

Re: Prospero Pascal BEEP

Posted: Mon Jul 20, 2020 8:12 am
by tofro
Turtle graphics are not part of QDOS - They are implemented by the SuperBASIC interpreter. If you want them in Pascal, you'll need to implement a library (nice little educational task, btw).

RESTORE, READ and DATA are "interpreted-language constructs" and are entirely not needed in Pascal - Everything these statements do can much easier be implemented using CONST expressions in Pascal. (BTW: I rather think the BASIC way of storing constant data in the interpreted program is "clumsy". For every constant in DATA you need twice the amount of memory than you need in Pascal - a CONST is only stored once.)

Re: Prospero Pascal BEEP

Posted: Mon Jul 20, 2020 10:35 pm
by stevepoole
Hi Tofro,

Many thanks for your advice. It will save a lot of thrashing around !

I can convert turtle graphics using standard geometry routines. (I did such things many years ago, but they are lost on microtapes, so I will need to do them again...).
As for reading data, I must study the Pascal Manuals again, to see how to grab huge amounts of data using nested FOR loops. This is new domain for me, and I hope to find some useful examples, with any luck.

All this is needed for a program which produces optical illusions, with very short code, a few turtle instructions, but masses of data...

If the holiday weather turns foul, I will start work on it earnestly before autumn...
Regards,
Steve.

Re: Prospero Pascal BEEP

Posted: Fri Jul 24, 2020 10:36 pm
by stevepoole
Hi Tofro,

The Illusion program is now transcoded into Prospero Pascal, after the usual teething troubles :

Routines have to be entered in reverse call order. Apparently their is a Forward command to avoid this !
PENUP means calculating LINES, but not drawing them : Easy when twigged...
Turtle commands are easily calculated using cumulative trigonometry, even though verbose.
Restore, Read & Data : arrays were avoided using string-type integers to keep the code short,
For loops with STEP: meant using 'repeat-until' loops, with various counters.

Finally your 'keypressed' function has proved very useful for debugging !
My learning curve is improving rapidly now.
Many thanks again for your help.

Steve.