Page 1 of 6

Using MCoder2 in EightyOne

Posted: Mon Dec 07, 2020 1:44 am
by raspereira
I am trying to compile .P file with MCoder2 in EightyOne. I converted the BASIC code with zxtext2p. When I load the .P via GUI it works normally.
I am not managing to load my .P file after MCoder2 without doing a hard reset.
I tried several ways with no success. Finally I opened Mcoder2 and my program at the Tape manager and used LOAD "" to load both files, but apparently it does a hard reset when my .P file is loaded.
Has someone experienced the same problem? Any tip?

Re: Using MCoder2 in EightyOne

Posted: Mon Dec 07, 2020 3:14 pm
by kmurta
Take a look at this manual to see if you are following the correct procedure.

https://docs.google.com/viewer?a=v&pid= ... zYzMjc0NjU

But remember, once Mcoder is loaded above RAMTOP, there is less than 12Kb left for your BASIC program.

Re: Using MCoder2 in EightyOne

Posted: Mon Dec 07, 2020 3:21 pm
by raspereira
Hi kmurta,

I've followed this paper and discussed with Tim Swenson. We don't know what is figuring out.
We used these two test attached files.

Re: Using MCoder2 in EightyOne

Posted: Mon Dec 07, 2020 3:54 pm
by kmurta
Click on picture to see th animated gif
mcoder2.gif

Re: Using MCoder2 in EightyOne

Posted: Mon Dec 07, 2020 7:04 pm
by raspereira
Thank you very much! I managed to compile. But now, how to save it in a file? I tried saving via Tape manager and via GUI, but the program did not work.

Re: Using MCoder2 in EightyOne

Posted: Sun Jul 18, 2021 12:55 am
by XavSnap
I had to rebuild it, from the original one (just one side) and the www.Zx81.nl text fileā€¦

Mcoder II, user manual: (updated)
McoderII_livret.pdf
(82.77 KiB) Downloaded 219 times
McoderII_livret-1.jpg
McoderII_livret-2.jpg

Re: Using MCoder2 in EightyOne

Posted: Sun Jul 18, 2021 2:47 pm
by Moggy
Thanks for this Xav. :D

Re: Using MCoder2 in EightyOne

Posted: Fri Feb 18, 2022 8:17 pm
by bwinkel67
So I've been trying to compile a rather simple program that uses plot:

Code: Select all

5 REM BOUNCING BALL
10 PRINT "ENTER SPEED (1-10), ADJUST (S/F)";
15 INPUT SPEED
20 CLS
25 FOR I=0 TO 20
30 LET Y=I
35 LET X=I
40 GOSUB 1000
45 PRINT AT Y,X;" ";
50 NEXT I
55 FOR I=21 TO 31
60 LET Y=42-I
65 LET X=I
70 GOSUB 1000
75 PRINT AT Y,X;" ";
80 NEXT I
85 FOR H=19 TO 30
87 LET I=49-H
90 LET Y=I-19
95 LET X=I
100 GOSUB 1000
105 PRINT AT Y,X;" ";
110 NEXT H
115 FOR H=0 TO 19
117 LET I=19-H
120 LET Y=19-I
125 LET X=I
130 GOSUB 1000
135 PRINT AT Y,X;" ";
140 NEXT H
145 FOR I=20 TO 21
150 LET Y=I
155 LET X=I-19
160 GOSUB 1000
165 PRINT AT Y,X;" ";
170 NEXT I
175 FOR H=0 TO 20
177 LET I=20-H
180 LET Y=I
185 LET X=23-I
190 GOSUB 1000
195 PRINT AT Y,X;" ";
200 NEXT H
205 FOR I=1 TO 8
210 LET Y=I
215 LET X=23+I
220 GOSUB 1000
225 PRINT AT Y,X;" ";
230 NEXT I
235 FOR I=8 TO 21
240 LET Y=I
245 LET X=38-I
250 GOSUB 1000
255 PRINT AT Y,X;" ";
260 NEXT I
265 FOR H=4 TO 20
267 LET I=24-H
270 LET Y=I
275 LET X=I-4
280 GOSUB 1000
285 PRINT AT Y,X;" ";
290 NEXT H
295 FOR H=1 TO 4
297 LET I=5-H
300 LET Y=I
305 LET X=0
310 GOSUB 1000
315 PRINT AT Y,X;" ";
320 NEXT H
325 GOTO 25
500 STOP
1000 REM SPINNIG BALL
1005 LET K$=INKEY$
1010 IF K$="F" THEN GOSUB 1085
1015 IF K$="S" THEN GOSUB 1105
1020 FOR J=1 TO SPEED
1025 PRINT AT Y,X;"\. ";
1030 PRINT AT Y,X;"\: ";
1035 PRINT AT Y,X;"\''";
1040 PRINT AT Y,X;"\ :";
1045 PRINT AT Y,X;"\..";
1050 PRINT AT Y,X;"\: ";
1055 PRINT AT Y,X;"\''";
1060 PRINT AT Y,X;"\ :";
1065 PRINT AT Y,X;"\..";
1070 NEXT J
1075 RETURN
1080 REM ADJUST SPEED
1085 LET SPEED=SPEED-1
1090 IF SPEED<1 THEN LET SPEED=1
1095 PRINT AT 0,4;"SPEED: ";SPEED;" "
1100 RETURN
1105 LET SPEED=SPEED+1
1110 GOTO 1095
I took care of the STEP -1 issues but when I run it after successful compilation, after entering its speed (as 1), I just get a blank screen and SHIFT-EDIT doesn't seem to break the program. Anyone here have any experience with the compiler?

Re: Using MCoder2 in EightyOne

Posted: Sat Feb 19, 2022 12:02 am
by bwinkel67
So I discovered that MCODER2 doesn't like GOSUB. In the documentation it say it supports it. No idea but if I substitute the GOSUB call with the actual code (i.e. I repeat the code) it works.

Code: Select all

5 REM BOUNCING BALL
10 PRINT "ENTER TO START";
15 INPUT S$
20 CLS
25 FOR I=0 TO 20
30 LET X=I
35 LET Y=I
40 PRINT AT X,Y;"\. ";AT X,Y;"\: ";AT X,Y;"\''";AT X,Y;"\ :";AT X,Y;"\..";AT X,Y;"\: ";AT X,Y;"\''";AT X,Y;"\ :";AT X,Y;"\..";AT X,Y;" ";
50 NEXT I
55 FOR I=21 TO 31
60 LET X=42-I
65 LET Y=I
70 PRINT AT X,Y;"\. ";AT X,Y;"\: ";AT X,Y;"\''";AT X,Y;"\ :";AT X,Y;"\..";AT X,Y;"\: ";AT X,Y;"\''";AT X,Y;"\ :";AT X,Y;"\..";AT X,Y;" ";
80 NEXT I
85 FOR H=19 TO 30
87 LET I=49-H
90 LET X=I-19
95 LET Y=I
100 PRINT AT X,Y;"\. ";AT X,Y;"\: ";AT X,Y;"\''";AT X,Y;"\ :";AT X,Y;"\..";AT X,Y;"\: ";AT X,Y;"\''";AT X,Y;"\ :";AT X,Y;"\..";AT X,Y;" ";
110 NEXT H
115 FOR H=0 TO 19
117 LET I=19-H
120 LET X=19-I
125 LET Y=I
130 PRINT AT X,Y;"\. ";AT X,Y;"\: ";AT X,Y;"\''";AT X,Y;"\ :";AT X,Y;"\..";AT X,Y;"\: ";AT X,Y;"\''";AT X,Y;"\ :";AT X,Y;"\..";AT X,Y;" ";
140 NEXT H
145 FOR I=20 TO 21
150 LET X=I
155 LET Y=I-19
160 PRINT AT X,Y;"\. ";AT X,Y;"\: ";AT X,Y;"\''";AT X,Y;"\ :";AT X,Y;"\..";AT X,Y;"\: ";AT X,Y;"\''";AT X,Y;"\ :";AT X,Y;"\..";AT X,Y;" ";
170 NEXT I
175 FOR H=0 TO 20
177 LET I=20-H
180 LET X=I
185 LET Y=23-I
190 PRINT AT X,Y;"\. ";AT X,Y;"\: ";AT X,Y;"\''";AT X,Y;"\ :";AT X,Y;"\..";AT X,Y;"\: ";AT X,Y;"\''";AT X,Y;"\ :";AT X,Y;"\..";AT X,Y;" ";
200 NEXT H
205 FOR I=1 TO 8
210 LET X=I
215 LET Y=23+I
220 PRINT AT X,Y;"\. ";AT X,Y;"\: ";AT X,Y;"\''";AT X,Y;"\ :";AT X,Y;"\..";AT X,Y;"\: ";AT X,Y;"\''";AT X,Y;"\ :";AT X,Y;"\..";AT X,Y;" ";
230 NEXT I
235 FOR I=8 TO 21
240 LET X=I
245 LET Y=38-I
250 PRINT AT X,Y;"\. ";AT X,Y;"\: ";AT X,Y;"\''";AT X,Y;"\ :";AT X,Y;"\..";AT X,Y;"\: ";AT X,Y;"\''";AT X,Y;"\ :";AT X,Y;"\..";AT X,Y;" ";
260 NEXT I
265 FOR H=4 TO 20
267 LET I=24-H
270 LET X=I
275 LET Y=I-4
280 PRINT AT X,Y;"\. ";AT X,Y;"\: ";AT X,Y;"\''";AT X,Y;"\ :";AT X,Y;"\..";AT X,Y;"\: ";AT X,Y;"\''";AT X,Y;"\ :";AT X,Y;"\..";AT X,Y;" ";
290 NEXT H
295 FOR H=1 TO 4
297 LET I=5-H
300 LET X=I
305 LET Y=0
310 PRINT AT X,Y;"\. ";AT X,Y;"\: ";AT X,Y;"\''";AT X,Y;"\ :";AT X,Y;"\..";AT X,Y;"\: ";AT X,Y;"\''";AT X,Y;"\ :";AT X,Y;"\..";AT X,Y;" ";
320 NEXT H
325 GOTO 25
500 STOP

Re: Using MCoder2 in EightyOne

Posted: Sat Feb 19, 2022 4:15 am
by mrtinb
The documentation says there is no compilation past STOP, so STOP has a different meaning than in Basic.

Maybe instead of
500 STOP
should be
500 GOTO 9999
9999 STOP