Logo compiler on Zx81...

Discussion about ZX80 / ZX81 Software
Post Reply
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Logo compiler on Zx81...

Post by XavSnap »

Hi,
I have just type-in a Logo compiler from the French magazine Ordi-5:
Logo compiler
Logo compiler
ZXlogo_Ordi_5_n13.gif (6.91 KiB) Viewed 7647 times
ZXlogo_Ordi_5_n13.zip
ZxLogo (ORDI-5 fr)
(19.99 KiB) Downloaded 434 times
Is there any other "Logo" compiler for ZX81 ?
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
siggi
Posts: 988
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: Logo compiler on Zx81...

Post by siggi »

Hi Xav
could you please describe, how a procedure must be entered?

I tried to enter this as new procedure "spiral":
Logo-Example.jpg
Logo-Example.jpg (64.97 KiB) Viewed 7626 times
But when I press '0' and try to compile it, I get the error
"INSTRUCTION INCONNUE LIGNE ..."
and the Zeddy runs into error C/8447, which is in the first line (POKEd during compiler run????)

Is something missing to indicate the end of the procedure?

Siggi
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Logo compiler on Zx81...

Post by XavSnap »

Hi Siggi,
Sorry, this program is in French, and explains too.

The first monitor is the direct input entire:
Where-
A= AVANCE [WRITE]
D= DROITE [RIGHT] where 1 is used to turn right (by step: 45°)
G= GAUCHE [LEFT] where 1 is used to turn left (by step: 45°)
M= MONTE [DRAW] Draw screen while cursor move.
C= CACHE [HIDE] Hide cursor move.
H= HOME [INIT] Return to 0,0 location.
N= Clear screen
V= VA-EN [GO TO] Go to N,M location
Y= Display memory left.
<= AUGMENTE [RAISE]
>= DIMINUE [DECRISE]
:=COPY SCREEN TO PRINTER
STOP=Return to Basic
B= Display functions list.
E= Erase a function from...
P= Program a function (edit monitor)

Who to write a function: ("SPIRALE")
Go to the "function" monitor: "P" key, press "1" to type-in the function.
-Enter the name: SPIRALE
-Enter the KEY: S
-Enter who many values used: 2
SPIRALE N,M
SPIRALE N,M
Capture.JPG (19.8 KiB) Viewed 7616 times

Code: Select all

"V" Key+"0N"+"00"
"R" Key+"0N"
"R" Key+"04"
"A" Key+"0N"
"G" Key+"01"
"*" Key ("LOOP REPETE")
">" Key+"0N"
"*" Key ("LOOP REPETE")
"." Key ("END")
"Compile the function?"= Oui (yes)

On the direct monitor, type "S" key+"10","10"

Basic functions "A","D","G"... wasn't include in the original program.
I had to type-in this feature, and is enter then you type RUN!
Just edit the 3020 line to change functions name (8 characters)
Type "GOTO 100" to run the program.
Type "GOTO 11" to save extra functions.
RUN will reinit the basic functions without extra procedures.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
bola_dor
Posts: 398
Joined: Wed Oct 02, 2019 5:32 am

Re: Logo compiler on Zx81...

Post by bola_dor »

XavSnap wrote: Fri Feb 17, 2017 6:30 pm Hi Siggi,
Sorry, this program is in French, and explains too.

The first monitor is the direct input entire:
Where-
A= AVANCE [WRITE]
D= DROITE [RIGHT] where 1 is used to turn right (by step: 45°)
G= GAUCHE [LEFT] where 1 is used to turn left (by step: 45°)
M= MONTE [DRAW] Draw screen while cursor move.
C= CACHE [HIDE] Hide cursor move.
H= HOME [INIT] Return to 0,0 location.
N= Clear screen
V= VA-EN [GO TO] Go to N,M location
Y= Display memory left.
<= AUGMENTE [RAISE]
>= DIMINUE [DECRISE]
:=COPY SCREEN TO PRINTER
STOP=Return to Basic
B= Display functions list.
E= Erase a function from...
P= Program a function (edit monitor)

Who to write a function: ("SPIRALE")
Go to the "function" monitor: "P" key, press "1" to type-in the function.
-Enter the name: SPIRALE
-Enter the KEY: S
-Enter who many values used: 2

Capture.JPG

Code: Select all

"V" Key+"0TN"+"00"
"R" Key+"0N"
"R" Key+"04"
"A" Key+"0N"
"G" Key+"01"
"*" Key ("LOOP REPETE")
">" Key+"0N"
"*" Key ("LOOP REPETE")
"." Key ("END")
"Compile the function?"= Oui (yes)

On the direct monitor, type "S" key+"10","10"
Hi,I was just curious about this LOGO..
I could manage to type in the spirale and most of the functions. I see you took a hard work preserving this piece.
Basic functions "A","D","G"... wasn't include in the original program.
I had to type-in this feature, and is enter then you type RUN!
Then there were no drawing primitives at all?
I see it can only turns in 45 degrees seteps, and that Advances are done by pixel number regardless the angle. is this your implementation or the logo engine itself limitation?
Just edit the 3020 line to change functions name (8 characters)
you mean as to translate them?
Type "GOTO 100" to run the program.
Type "GOTO 11" to save extra functions.
RUN will reinit the basic functions without extra procedures.
thank you
Ernesto
ZX80 USA, ZX81UK, ZX Spectrum, ZX Spectrum+, ZX Spectrum 128+ UK, ZX Spectrum +2/A, Sinclair QL, CZ1000, CZ1500, CZ2000, CZ1000Plus, CZ1500Plus, CZ Spectrum, CZ Spectrum Plus, TK83, TK85, TK90X, TK95. TS2068. And more to come :D
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Logo compiler on Zx81...

Post by XavSnap »

Hi bola_dor,
Hi,I was just curious about this LOGO..
Cool !
Basic functions "A","D","G"... wasn't include in the original program.
Then there were no drawing primitives at all?
I see it can only turns in 45 degrees steps, and that Advances are done by pixel number regardless the angle. is this your implementation or the logo engine itself limitation?

Just a hardware limitation… and a software limitation after 2 pixels.
On the screen, there's only 7 directions 0,45,90,135,180,205...
Beyond 2 pixels, you had to calculate a linear draw (step 15 degrees for example), from the x and y coordinates.
Like this example: http://abandonlistings.free.fr/micro7/h ... rphose.zip
Just edit the 3020 line to change functions name (8 characters)
you mean as to translate them?
Or launch it, yes.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Logo compiler on Zx81...

Post by XavSnap »

Image

Image

Image

Image

Image

Image
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
bola_dor
Posts: 398
Joined: Wed Oct 02, 2019 5:32 am

Re: Logo compiler on Zx81...

Post by bola_dor »

Well my french is not good at all but I did OCR and Google translate.. I'll study the listings tomorrow..
What does the machine code part do?
Beyond 2 pixels, you had to calculate a linear draw (step 15 degrees for example), from the x and y coordinates.
Like this example: http://abandonlistings.free.fr/micro7/h ... rphose.zip
I don't fully understand the 2 pixel limitation.. I think last pixel position could be calculated by trigonometry.. and then a bresenham's line be drawn.. perhaps is to slow?.
About the 45 degree diagonal, distance can be rounded to 0.707 pixel per unit.. I mean a 10 steps line should draw 7 pixels on 1;3;5;7 directions..
I don't know if this is done by the BASIC part you made or the MC ..
Any way it is good to see a ZX81 Logo as I haven't seen any other..
Regards
Ernesto
ZX80 USA, ZX81UK, ZX Spectrum, ZX Spectrum+, ZX Spectrum 128+ UK, ZX Spectrum +2/A, Sinclair QL, CZ1000, CZ1500, CZ2000, CZ1000Plus, CZ1500Plus, CZ Spectrum, CZ Spectrum Plus, TK83, TK85, TK90X, TK95. TS2068. And more to come :D
Post Reply