Ah, thank you...that may be the issue.
Using MCoder2 in EightyOne
Re: Using MCoder2 in EightyOne
Just tried it and yup, that did the trick. They ought to have left that feature out, very confusing :-/
Re: Using MCoder2 in EightyOne
A few more questions on MCODER2. So I've been working with it and getting a bit more familiar with how it works. One oddity, I cannot get OR operations to work within an IF. Everything works fine with AND but not with OR. Any idea why?
Also, in the EightyOne emulator I'm trying to compile an 8K program, and it's just too big for MCODER2 to work in 16K of memory. I think the sweet spot is half that (at 4K) as I've played with pruning it and having some success. When I set up EightyOne in 32K of memory, MCODER2 doesn't seem to like that. Can it only run in 16K? How can I get an 8K program to compile? Is this an EightyOne issue?
I've managed to tease out all the faults in the BASIC: changed all OR if's to AND and reversed logic, got rid of boolean operators in assignments (LET), that sort of thing. So I'm close but can't get past the memory limit. So any help would be appreciated. Note that I have played around with the option that lets you compile two parts separately and that works, but those two parts don't share any information. So you can just write stand-alone chunks that way (i.e. maybe have one piece that just creates the screen display and the second piece lives within it but doesn't interact) but no easy way to piece them together.
I've also played with the RAND USER 17287 feature that lets you put code anywhere you want. Maybe you could create your own REM statement and put it there. What's frustrating is that with a 5K program, with MCODER2 being 4K, and the compiled version of the BASIC taking less than 4K, it still stops because of lack of memory.
Also, in the EightyOne emulator I'm trying to compile an 8K program, and it's just too big for MCODER2 to work in 16K of memory. I think the sweet spot is half that (at 4K) as I've played with pruning it and having some success. When I set up EightyOne in 32K of memory, MCODER2 doesn't seem to like that. Can it only run in 16K? How can I get an 8K program to compile? Is this an EightyOne issue?
I've managed to tease out all the faults in the BASIC: changed all OR if's to AND and reversed logic, got rid of boolean operators in assignments (LET), that sort of thing. So I'm close but can't get past the memory limit. So any help would be appreciated. Note that I have played around with the option that lets you compile two parts separately and that works, but those two parts don't share any information. So you can just write stand-alone chunks that way (i.e. maybe have one piece that just creates the screen display and the second piece lives within it but doesn't interact) but no easy way to piece them together.
I've also played with the RAND USER 17287 feature that lets you put code anywhere you want. Maybe you could create your own REM statement and put it there. What's frustrating is that with a 5K program, with MCODER2 being 4K, and the compiled version of the BASIC taking less than 4K, it still stops because of lack of memory.
Re: Using MCoder2 in EightyOne
You need to take out subroutines of the program, and get them to work. And in your main program call the routines with USR.
Since you’ll need tools in the background to merge the code at last, the program needs to be in smaller pieces and fused together finally.
The manual also describes how.
Since you’ll need tools in the background to merge the code at last, the program needs to be in smaller pieces and fused together finally.
The manual also describes how.
Re: Using MCoder2 in EightyOne
I've played around with multiple pieces and got it to work...but it cannot share information between them via variables. I suppose you could poke data into some memory and peek it back, but that's a pain. Also, wasn't sure if you could have more than 2 pieces since you poke the REM and change it form 2 to 1 (so MCODER uses 2 as it's default). What happens with the 3rd piece of code?
I did see one person (Steven Reid) claim that he poked RAMTOP and got MCODER2 to work in 32K of memory but when I tried it, still a no.
https://www.reids4fun.com/385/et-redux
I did see one person (Steven Reid) claim that he poked RAMTOP and got MCODER2 to work in 32K of memory but when I tried it, still a no.
https://www.reids4fun.com/385/et-redux
Re: Using MCoder2 in EightyOne
I guest PEEK and POKE is the solution. I haven't tried it, but the manual state it is possible.
Re: Using MCoder2 in EightyOne
Better to call André*** to speedup the code...
Mcoder is running under 16k, never 32k.
The RAMTOP limit hang the basic code to 10k... and the Mcoder2 compiler don't understand extended Zx81 Basic.
Open a topic to try to speedup the original "ET" code.
Mcoder is running under 16k, never 32k.
The RAMTOP limit hang the basic code to 10k... and the Mcoder2 compiler don't understand extended Zx81 Basic.
Open a topic to try to speedup the original "ET" code.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Re: Using MCoder2 in EightyOne
Even André***’s Basic tricks won’t make games fast. It will only make them playable.
Re: Using MCoder2 in EightyOne
I think I have gotten the main loop down to a size it will compile (4087). So now I have about a half dozen routines of various size I will try and compile separately and then merge the whole thing. One trick in the main is to add fake calls (RAND USR 11111, etc), then after compiling it and then compiling the next part and finding it's address, you go back and recompile everything and change the 11111 to the correct address. That seems to be the way to do it though I'm not sure if I'll run into difficulties with size when I try to compile the smaller chunks.
Re: Using MCoder2 in EightyOne
It seem like you are getting a hang of it. Good luck.