[syslinux] Shift to a Menu

Nazo nazosan at gmail.com
Fri Jan 6 22:41:09 PST 2006


On 1/7/06, Jun OKAJIMA <okajima at digitalinfra.co.jp> wrote:
> >
> >This should be fairly easy to implement through COMBOOT. It would work
> >as follows: SYSLINUX always boots into "shift.c32 menu.c32". shift.c32
> >checks if the shift key is pressed (you need to know that a certain BYTE
> >in the BIOS DATA area holds this information, Ralph brown's interrupt
> >list will have the details) if the shift key is pressed it asks syslinux
> >to execute its first argument (in this case menu.c32) else it quits. If
> >you want to be wicked you can assign meanings to other combinations. For
> >this to really work, the Shift key must be depressed while shift.c32 is
> >being executed (so in your documentation say a 5 second shift key), or
> >you can check if CAPS-LOCK is on.
> >
> >
>
>
> I have got a quick solution --
>
> DEFAULT MENU.C32
> PROMPT  0
> TIMEOUT 1
>
> and you keep pushing [Space], not [Shift] when booting.
>
> The problems for this way are  ---
> 1. you must load menu.c32 always. This makes booting a bit slower.
> 2. you must wait 100msec. This also slows a little.
> 3. Some people would dont like to push [Space].
>    In my PC, it sounds "key repeat sound" ( I dont know a right word in English).
>
>            --- Okajima, Jun. Tokyo, Japan.
>
Well, a while back it struck me that there may be an easy and clean
solution to this.  The normal method of handling this is for it to
check if you are holding the shift key and if you are, then abort
automatic loading and present the user with the standard boot prompt. 
I don't know enough assembly to try this myself, but, I suspect that
you could look at the code that handles this and reverse it.  Sort of
the equivalent of "if shift == 1 plainprompt(); else continue()" being
changed to "if shift != 1 plainprompt(); else continue()" though in
this case it would be the assembly equivalent of that (don't look at
me, the only assembly instruction I know is nop.)

I hope I'm not missing something, but, my first impression would be
that this should be easy for those who know what they are doing to
attempt.




More information about the Syslinux mailing list