memdisk: handle recursive INT 13h invocation
authorH. Peter Anvin <hpa@zytor.com>
Thu, 30 Jul 2009 18:24:25 +0000 (11:24 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 30 Jul 2009 18:24:25 +0000 (11:24 -0700)
commit44bc900a31b8c83a4de92c45e0401ceaefe371e8
tree7a49f7cb47d6b7afeb623bbfcba107411bb83de7
parent3cdc491e358508621ce19d851f148aa2932b87bf
memdisk: handle recursive INT 13h invocation

Some systems, e.g. a lot of Thinkpads, invoke INT 13h recursively from
within the stack itself.  This is generally a bad idea as it re-runs
any INT 13h hooks (including the ones that DOS installs!), but it
should work.  Keep a counter of recursive invocations and simply
bypass the whole system including the DL shift if the invocation is
recursive.

With this, MS-DOS boots on a Thinkpad T61.  FreeDOS is still broken,
though, but apparently in a different manner...

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
memdisk/memdisk.inc