Zx printer example pattern code

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Lostboys
Posts: 17
Joined: Mon Jan 17, 2022 8:12 am

Zx printer example pattern code

Post by Lostboys »

Hi
I have just typed in (several times) one of the small basic programs listed in the zx printer manual, it’s supposed to create circles (example code 3), but nothing happens when I hit the run button, what have I typed wrong that I can’t see, the only thing I wasn’t sure on was the PI, I can’t find that expression on the keyboard so typed it manually.

Please see screenshots
Attachments
248BB271-6410-48DE-BECE-3CB596BF6452.jpeg
1967EC50-788E-4197-9843-7534F4D622BE.jpeg
3BD6EEF8-9F76-4F0F-AFDA-8D33ADB2425A.jpeg
Fruitcake
Posts: 351
Joined: Wed Sep 01, 2010 10:53 pm

Re: Zx printer example pattern code

Post by Fruitcake »

Lostboys wrote: Sat Feb 12, 2022 12:00 pm the only thing I wasn’t sure on was the PI, I can’t find that expression on the keyboard so typed it manually.
PI is available under key M, shown as the Greek symbol on the keyboard and not spelled out.
Lostboys
Posts: 17
Joined: Mon Jan 17, 2022 8:12 am

Re: Zx printer example pattern code

Post by Lostboys »

Fruitcake wrote: Sat Feb 12, 2022 12:23 pm
Lostboys wrote: Sat Feb 12, 2022 12:00 pm the only thing I wasn’t sure on was the PI, I can’t find that expression on the keyboard so typed it manually.
PI is available under key M, shown as the Greek symbol on the keyboard and not spelled out.
Brilliant, never looked for symbol, just pi.
Thank you
Fruitcake
Posts: 351
Joined: Wed Sep 01, 2010 10:53 pm

Re: Zx printer example pattern code

Post by Fruitcake »

I wonder if it caused a lot of confusion at the time, hence the switch to "PI" on the Spectrum keyboard...
Lostboys
Posts: 17
Joined: Mon Jan 17, 2022 8:12 am

Re: Zx printer example pattern code

Post by Lostboys »

Fruitcake wrote: Sat Feb 12, 2022 12:37 pm I wonder if it caused a lot of confusion at the time, hence the switch to "PI" on the Spectrum keyboard...
I'm not sure, maybe its just me not looking for Greek letters 🤔
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Zx printer example pattern code

Post by XavSnap »

pi.JPG
pi.JPG (36.04 KiB) Viewed 1930 times
On the Zx81: "П"=PI ; SHIFT+New-Line, then "M" key.

On the Spectrum "CTRL SHIFT"+"CAPS SHIFT", then "M" key.

Or add LET PI=3.1416

PI.jpg
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Lostboys
Posts: 17
Joined: Mon Jan 17, 2022 8:12 am

Re: Zx printer example pattern code

Post by Lostboys »

Thank you XavSnap , very useful :)
User avatar
1024MAK
Posts: 5118
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Zx printer example pattern code

Post by 1024MAK »

XavSnap wrote: Mon Feb 14, 2022 6:28 pm Or add LET PI=3.1416
<Warning: British “humour” approaching…>

Now that's not very sporting :shock: Some would even go so far, as to call it cheating! Having a normal variable impersonating a well known constant. Whatever next! :shock:

If you are going to fake it, use 355/113 :D

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
Lostboys
Posts: 17
Joined: Mon Jan 17, 2022 8:12 am

Re: Zx printer example pattern code

Post by Lostboys »

:roll:
1024MAK wrote: Mon Feb 14, 2022 10:55 pm
XavSnap wrote: Mon Feb 14, 2022 6:28 pm Or add LET PI=3.1416
<Warning: British “humour” approaching…>

Now that's not very sporting :shock: Some would even go so far, as to call it cheating! Having a normal variable impersonating a well known constant. Whatever next! :shock:

If you are going to fake it, use 355/113 :D

Mark
Absolutely awful :o :roll: :lol:
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Zx printer example pattern code

Post by XavSnap »

<Warning: French “humour” approaching…>

3.14159 and any peanut ...

Can be easily rounded to 3.14... to display a fat circle on the zx81's screen !
Cap0161.jpg
Cap0160.jpg
Cap0160.jpg (3.14 KiB) Viewed 1873 times

Or... PI=3...
Cap0163.jpg
Cap0163.jpg (3.12 KiB) Viewed 1873 times
Warning : crappy circle !
:lol:
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Post Reply