Closed GoogleCodeExporter closed 8 years ago
The max is 60.
you can use `set *` to clear all environment.and using `setlocal` to set local
environment
eg.
set a=abcd
set b=casdf
set c=asdfsadf
setlocal
set *
set xxxx
Original comment by chenall.cn
on 13 May 2013 at 12:18
What do you mean by max=60?
e.g
set A=1
set B=1
set C=1
set A=
set B=
How many varaible have been used now 1 or 3?
Original comment by Steve6375
on 13 May 2013 at 7:22
Can the number of variable be increased to say 200? It would be very useful.
e.g. If I have 50 files, I want to hold the names in variables
FILE_1=fred.iso
FILE_2=doris.iso
etc.
This means I can only have about 10-20 files and then all variable space is
used up?
Also, If I type set after adding many variables - only about 30 variables are
listed even though I cannot add any more variables using set!
Original comment by Steve6375
on 13 May 2013 at 10:57
#2
1
#3
current we use 1 sector as variable names.and a name max length is 8.
512/8 = 64,above 60 is use for internal variables.
and current is no way to extend.
Why do you need so many variables?
for FILE select why not use a MENU?
MODBOOT select many file to boot,but only use little variables.
Original comment by chenall.cn
on 14 May 2013 at 12:19
I want the user to be able to define his own set of Product Keys for all
different Windows OS's. Also, for different languages, all of the menu
headings, menu entries, menu footer text, menu colours, background .bmp
filename, default entries for each menu are held by variables. This means the
user can easily change these settings from a simple 'config' file containing:
!BAT
set MainMenu= ----- MAIN MENI ----
set AUTOMENU= ------ AUTO MENU ----
set MDEFAULT=1
set AUTODEF=3
set MMCOLOUR=0133
etc.
So it is quite easy to run out of variables when I have 12 different menus!
What I do now is make my own 'set' and 'get' code by putting a variable in
memory at (md)0xxxxxx and then 'get' it back when I want it.
Is there no easy way to have more variables? Perhaps a 2nd set of 60 variables
called %@FRED% %@DORIS% could be supported which use a different 64 sectors
somewhere else in memory?
Original comment by Steve6375
on 14 May 2013 at 8:51
Please try this.
can set up to max 65,536 variables.
use below command to extend.
set @extend BASE_ADDR size
the BASE_ADDR is the memory start of extended variable.
size is how many variables will extended.(MAX is 0xFFFF);
eg.add 10 variables spaces at 0x40000.
set @extend 0x40000 10
this need memory (((10+63)>>6) + 10)*512 = 5632.
You must confirm the BASE_ADDR has enough space.
This feature will undocumented..
Original comment by chenall.cn
on 15 May 2013 at 7:43
Attachments:
Thank you very much for this work! :-)
It seems to almost work, but using @extend does not clear the memory area
first. So after a reboot I still have variables there from last time, if I run
set command.
Of course, I could do
@extend 0x4000 10
set *
at the beginning, but this means I cannot just extend the area inside the
program.
Please can the @extend command also clear the memory area first?
I also notice that set @ shows
BASE_ADDR:4000,40200,size:10
nice!
Original comment by Steve6375
on 15 May 2013 at 12:43
Yes!Next.
Original comment by chenall.cn
on 16 May 2013 at 12:13
This issue was updated by revision r344.
the extend variables will not work with SETLOCAL/ENDLOCAL,
Original comment by chenall.cn
on 16 May 2013 at 6:13
[deleted comment]
>>>the extend variables will not work with SETLOCAL/ENDLOCAL
Do you mean setlocal/endlocal will only work for the first 60 variables?
Original comment by Steve6375
on 21 May 2013 at 6:56
Yes,the setlocal/endlocal only save/restore the first 60.
Original comment by chenall.cn
on 23 May 2013 at 12:11
Original issue reported on code.google.com by
Steve6375
on 12 May 2013 at 8:11