![]() |
Creating +3 Menus - Loading external BAS files - Printable Version +- Forum (https://www.boriel.com/forum) +-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11) +---- Forum: Help & Support (https://www.boriel.com/forum/forumdisplay.php?fid=16) +---- Thread: Creating +3 Menus - Loading external BAS files (/showthread.php?tid=2622) |
Creating +3 Menus - Loading external BAS files - merlinkv - 04-12-2025 Hello, I'm creating Menus for my +3 game compilations but I can't find a way to load external BAS files. With the LOAD command I can load only CODE & SCREEN$ files. There is a way to LOAD another BAS file included in the disks? Like on standard +3 BASIC. ie: LOAD "MYBASPRG" or LOAD "MYBASPRG.BAS" Thanks in advance. Example: ![]() RE: Creating +3 Menus - Loading external BAS files - Duefectu - 04-13-2025 I have not tried it, but you have a library called Basic.bas with which you can try to load the program: Code: #include <basic.bas> $ef is the LOAD ASCII code, $22 is the " ASCII code. Change program.bas by your program name. RE: Creating +3 Menus - Loading external BAS files - merlinkv - 04-13-2025 I have tried this: EvalBASIC(chr($ef)+" "+chr($22)+"mybasprg"+chr($22)) and EvalBASIC(chr($ef)+" mybasprg") but all time I get two errors when compiling: basic.bas:48: warning: [W150] Parameter 'basic' is never used basic.bas:49: warning: [W190] Function 'EvalBASIC' should return a value RE: Creating +3 Menus - Loading external BAS files - boriel - 04-13-2025 These are not errors, these are warnings. These warnings are to be expected because the function is in pure assembler. Give them a try and see if they work as expected. RE: Creating +3 Menus - Loading external BAS files - merlinkv - 04-14-2025 Hi @boriel, Thanks but with these warnings I can't compile my xxxxx.bas file. I have tried many times and variants, but no way. ie: 2000 EvalBASIC(chr($EF)+" "+chr($22)+"ROGERPAN"+chr($22)) 2010 EvalBASIC(chr($EF)+" ROGUETRO") RE: Creating +3 Menus - Loading external BAS files - boriel - 04-16-2025 merlinkv Wrote:Hi @boriel, Can you put the entire listing of what you're trying to do? I understand you want to compile a loader that will load and execute your .BAS programs (NOT compile them). Also, the commands above execute this command: LOAD "ROGERPAN" and LOAD "ROGUETRO". But I'm not sure this is what you type in a +3. RE: Creating +3 Menus - Loading external BAS files - merlinkv - 04-16-2025 Hello, This is my first attempt at ZX Basic, and I'm very aware that I need to adapt and debug it better. It's a quick adaptation of the menu, created in 3DOS, that I include in my ZX Basic disk compilations. I know it's simple, but it's fully functional. By pressing the numbers 1 through 9, we select the game we want to load (a program written in BASIC) or press N, L, P, or F to change pages. But commands like LOAD "RSWYPE" are not recognized, ZX Basic wants CODE or SCREEN$ not other BASIC (+3DOS) programs. Code: 10 REM 720K Games_089 |