View Full Version : CLI Command... ENDCLI
Tony Landais
10 May 2003, 13:40
I am doing a launcher for a CD32 compilation and I would like to recover max of the memory possible.
In my Menu, I use a runback whdload to give the time to the launcher to quit and to give back all the memory.
when whdload load the image files the cli is still present, so I put a endcli in my batch but it doesnt quit the cli.
if I type endcli during the loading manually the cli close and whdload continue with more memory.
Is there a way or something to force the cli to close in a batch?
From what I can guess, your menu prog isn't detatching itself from the CLI, as you are RUNning the whdload etc.. so when you do an endcli/endshell it just closes the cli which is sort-of created when you use the run/runback command!
your menu needs to detach itself from the cli when it is run.. I am not 100% sure how to do this, so someone with more knowledge and experience needs to pipe up about now!!
Tony Landais
10 May 2003, 13:50
In fact in my menu I put
runback execute boot.bat
the script boot.bat launch whdload so the Menu is no more attached to the cli no?
Erm.. your menu is still connected to the cli, as it isn't detatched, what the runback does is sort of creates another cli inside the current cli, so when you do a close cli it closes the most recently opened, to close the cli from your program your startup-sequence needs to be something like:
<do stuff needed>
menu
<do whatever else>
endcli
now your program needs to detatch itself from the cli when it is run, that way the endcli will be executed and it should close (Like loadwb loads workbench, it detatches from the cli).
the following will NOT work
run menu
or
runback menu
as when you use endcli it'll simply close the "invisibly" created cli!
I could be completely wrong, someone with more knowledge needs to give a bit of an answer, but I think I am right!
Try this:
run >nil: whdload game.slave preload novbrmove
endcli
Also the little command 'add44k' reduces the colours in use on the workbench screen to save a little memory:
add44k
run >nil: whdload game.slave preload novbrmove
endcli
andreas
17 May 2003, 17:55
@Tony
Do a run <NIL: >NIL: ... which is afair a "simulation" of RUNBACK.
Severin
18 May 2003, 00:23
Way too much typing... Run <>NIL: will do the same thing...
Twistin'Ghost
18 May 2003, 16:55
Shell Wars!
Wepl
20 January 2004, 13:47
AFAIK runback was only needed on 1.3 Systems to detach a program. On 2.0+
RUN <>NIL: program
should be enough.
vBulletin® v3.7.0, Copyright ©2000-2013, Jelsoft Enterprises Ltd.