Calculator for the zx81

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
User avatar
xubuntu
Posts: 84
Joined: Sat Jun 18, 2022 12:42 pm
Location: Athens, GR

Calculator for the zx81

Post by xubuntu »

Is there a graphical calculator for the zx81?
Not a text-based one. A calculator with buttons. Is there any?
User avatar
xubuntu
Posts: 84
Joined: Sat Jun 18, 2022 12:42 pm
Location: Athens, GR

Re: Calculator for the zx81

Post by xubuntu »

Ok after searching online for thirty minutes, I didn't find anything, and I thought perhaps we could all together build one !!!

:D

I start first!

But because I am the most stupid, I will only do the graphics! So the clever people can take over!

Image


Let's build a calculator ! :P

Code: Select all


10 LET A = 0

1000 PRINT AT 0,0
1050 PRINT "\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##"
1100 PRINT "\##\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\##"
1120 PRINT "\##\::0                          \::\##"
1130 PRINT "\##\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\##"

1150 PRINT "\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##"
1210 PRINT "\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##"
1220 PRINT "\##\::\::%7\::\::\##\::\::%8\::\::\##\::\::%9\::\::\##\::\::%/\::\::\##\::C%L%R\::\##"
1230 PRINT "\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##"

1250 PRINT "\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##"
1310 PRINT "\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##"
1320 PRINT "\##\::\::%4\::\::\##\::\::%5\::\::\##\::\::%6\::\::\##\::\::%*\::\::\##\::%R%U%T\::\##"
1330 PRINT "\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##"

1350 PRINT "\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##"
1410 PRINT "\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##"
1420 PRINT "\##\::\::%1\::\::\##\::\::%2\::\::\##\::\::%3\::\::\##\::\::%-\::\::\##\::%S%Q%R\::\##"
1430 PRINT "\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##"

1450 PRINT "\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##"
1510 PRINT "\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##"
1520 PRINT "\##\::\::%0\::\::\##\::\::%,\::\::\##\::%P%E%R\::\##\::\::%+\::\::\##\::\::%=\::\::\##"
1530 PRINT "\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##\::\::\::\::\::\##"
1550 PRINT "\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##"
User avatar
Paul
Posts: 1511
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: Calculator for the zx81

Post by Paul »

That looks text based :ugeek:
In theory, there is no difference between theory and practice. But, in practice, there is.
User avatar
xubuntu
Posts: 84
Joined: Sat Jun 18, 2022 12:42 pm
Location: Athens, GR

Re: Calculator for the zx81

Post by xubuntu »

No. Text based are those that ask you "Would you like to add, subtrack, divide or multiply? Mine is very advanced and futuristic.

:roll:

And please be so kind to help me with the coral rom before I destroy a dozen of eproms.
User avatar
xubuntu
Posts: 84
Joined: Sat Jun 18, 2022 12:42 pm
Location: Athens, GR

Re: Calculator for the zx81

Post by xubuntu »

So let's see..

In visual basic when you press a button, let's say "3" for example, you can do this

on button "3" click
if textbox = 0 then textbox = 3
else
textbox +=3

And if there is already a string in our textbox, for example "321", our program will place the character "3" next to our string "321" and we will get a "3213" textbox on our screen.

I guess is not that simple with zx basic is it ?:)
User avatar
1024MAK
Posts: 5101
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Calculator for the zx81

Post by 1024MAK »

xubuntu wrote: Wed Mar 22, 2023 1:25 pm I guess is not that simple with zx basic is it ?:)
No. The ZX81 BASIC has absolutely no concept of such a thing.

Instead you may have to use IF THEN constructs.

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.
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Calculator for the zx81

Post by dr beep »

1024MAK wrote: Wed Mar 22, 2023 7:59 pm
xubuntu wrote: Wed Mar 22, 2023 1:25 pm I guess is not that simple with zx basic is it ?:)
No. The ZX81 BASIC has absolutely no concept of such a thing.

Instead you may have to use IF THEN constructs.

Mark
Yes, just use a string, add the key pressed and display the string.
User avatar
xubuntu
Posts: 84
Joined: Sat Jun 18, 2022 12:42 pm
Location: Athens, GR

Re: Calculator for the zx81

Post by xubuntu »

Doctor Beep I was hoping that we will co-operate on this one, after checking out your enormous BASIC experience.

But anyway, if you are more concerned building games, as it seems, perhaps write down how the "add to string" function works and I will continue from there.

:cry:
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Calculator for the zx81

Post by dr beep »

xubuntu wrote: Thu Mar 23, 2023 7:15 am Doctor Beep I was hoping that we will co-operate on this one, after checking out your enormous BASIC experience.

But anyway, if you are more concerned building games, as it seems, perhaps write down how the "add to string" function works and I will continue from there.

:cry:
I am more than willing to help, but don't make assumptions that are not true.

as for my goodwill:

Code: Select all

10 let d$=""
20 let k$=inkey$
30 if k$="" then goto 20
40 let d$=d$+k$
50 print at 10,10;d$
60 goto 20
User avatar
xubuntu
Posts: 84
Joined: Sat Jun 18, 2022 12:42 pm
Location: Athens, GR

Re: Calculator for the zx81

Post by xubuntu »

I made progress and thus I am obligated to upload my superior code on this obsolete and god-forsaken forum, because what if my computer suddenly explodes and humanity suffers the loss of the most futuristic calculator ever made for zx81? That of course can't be tolerated.

At that point I would like to thank my mom and my dad for making me so incredibly clever, and point out that nobody helped me making this calculator, and especially not mister beep!

You are all free and welcome to suggest parts for improvement, although that would be nearly impossible considering how clever I am, so I can take all the credit, mention no one and state with bold letters that this was entirely my own idea/creation.

For the moment only addition and subtraction work.

Why are the keys not responding very well? Sometimes I have to press them 2 or 3 times. :?
Attachments
calculator.bas
(6.07 KiB) Downloaded 43 times
Post Reply