Enterprise Forever
:UK => Programming => Topic started by: Z80System on 2014.September.11. 23:46:21
-
I would like to load an exos extension by code, in basic.
When I do it in command mode:
run "pck.ext"
then the extension is loaded well,
but when I try to do it in a program:
10 run "pck.ext"
run
then insufficient memory error occurs,
and after that, the
:help
will list the extension strings many times,
not only once.
How can I load an exos extension module by basic program ?
-
Try:
10 EXT "LOAD PCK.EXT"
-
10 EXT "LOAD PCK.EXT"
The LOAD executed only in command mode.
I think only the RUN can load an EXOS module in a BASIC program.
But after the loading, the basic program restarts ... I do not know why ... Because I load the pck.ext at the beginning of the program, it will be a loop till I have memory to load the ext.
-
The LOAD executed only in command mode.
The BASIC LOAD, but I suggested the EXDOS LOAD command.
-
The BASIC LOAD, but I suggested the EXDOS LOAD command.
Oh ... :oops: I'm blind ... I will try.
And why does the BASIC LOAD restart the program ?
-
And why does the BASIC LOAD restart the program ?
I think the reason is that, the program is loaded by RUN "xxxx" and when loading is finished BASIC interpreter wants to start it, and in your case you loaded an extension which did not overwrite your basic program, so 10 RUN "xxxx" remained in the memory, and it went to forever loop.
-
Oh ... (http://enterpriseforever.com/Smileys/phpbb/ds_icon_redface.gif) I'm blind ... I will try.
Hmmm ... I tried it ...
With the EXDOS LOAD way, there is no BASIC program restart.
But after that the :FILE call to the PCK.EXT (also form the BASIC program) does not work well.
I get a wrong string back form the :FILE call.
When I use the RUN loading, the :FILE call works well.
-
I think the reason is that, t
Yes, it is interesting and sounds logical,
but why does the BASIC RUN not realize that the file is not a BASIC program, and not restarting ?
-
But after that the :FILE call to the PCK.EXT (also form the BASIC program) does not work well.
Maybe is it some correspondence with the BASIC ALLOCATE functionality ?
-
but why does the BASIC RUN not realize that the file is not a BASIC program, and not restarting ?
Possibly it is not checked, because normally BASIC programs are loaded and started with RUN "xx" command .
-
Possibly it is not checked, because normally BASIC programs are loaded and started with RUN "xx" command .
Okay, maybe the RUN is not intended to load other types of modules than BASIC,
but in this case, the EXDOS LOAD way, suggested by zozo would have to work ... :)
And that does not restart the program, but does not work, either ... :)
-
Okay, maybe the RUN is not intended to load other types of modules than BASIC,
but in this case, the EXDOS LOAD way, suggested by zozo would have to work ... :)
And that does not restart the program, but does not work, either ... :)
If I remember well, you should use EXT "xxx" instead of : from basic program :D
-
If I remember well, you should use EXT "xxx" instead of : from basic program (http://enterpriseforever.com/Smileys/phpbb/ds_icon_biggrin.gif)
Yes, the loading working well, the :FILE call does not work, and that call is the same, in both situations ... only the loading is different. I did not use : in EXT lines, of course.
-
Yes, the loading working well, the :FILE call does not work, and that call is the same, in both situations ... only the loading is different. I did not use : in EXT lines, of course.
Then I do not have idea, I used once loading extension and start it from Basic program ( VLOAD , and it worked well )