Logo compiler on Zx81...

Discussion about ZX80 / ZX81 Software
Post Reply
User avatar
XavSnap
Posts: 892
Joined: Sat May 10, 2008 4:23 pm

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 2171 times
ZXlogo_Ordi_5_n13.zip
ZxLogo (ORDI-5 fr)
(19.99 KiB) Downloaded 134 times
Is there any other "Logo" compiler for ZX81 ?
Xavier

User avatar
siggi
Posts: 910
Joined: Thu May 08, 2008 9:30 am
Location: Dauernheim, 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 2150 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
http://zx81-siggi.endoftheinternet.org/index.html

User avatar
XavSnap
Posts: 892
Joined: Sat May 10, 2008 4:23 pm

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 2140 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

bola_dor
Posts: 120
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

User avatar
XavSnap
Posts: 892
Joined: Sat May 10, 2008 4:23 pm

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

User avatar
XavSnap
Posts: 892
Joined: Sat May 10, 2008 4:23 pm

Re: Logo compiler on Zx81...

Post by XavSnap »

Image

Image

Image

Image

Image

Image
Xavier

bola_dor
Posts: 120
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

Post Reply