Page 1 of 1

Logo compiler on Zx81...

Posted: Fri Feb 17, 2017 3:08 am
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 7673 times
ZXlogo_Ordi_5_n13.zip
ZxLogo (ORDI-5 fr)
(19.99 KiB) Downloaded 437 times
Is there any other "Logo" compiler for ZX81 ?

Re: Logo compiler on Zx81...

Posted: Fri Feb 17, 2017 3:16 pm
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 7652 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

Re: Logo compiler on Zx81...

Posted: Fri Feb 17, 2017 6:30 pm
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 7642 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.

Re: Logo compiler on Zx81...

Posted: Thu Apr 09, 2020 4:50 am
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

Re: Logo compiler on Zx81...

Posted: Thu Apr 09, 2020 5:52 am
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.

Re: Logo compiler on Zx81...

Posted: Thu Apr 09, 2020 6:01 am
by XavSnap
Image

Image

Image

Image

Image

Image

Re: Logo compiler on Zx81...

Posted: Fri Apr 10, 2020 5:15 am
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