I finally fixed the "chain.c32 hangs when run on modern qemu" problem.
Apparently it was hanging hitting the "Invalid $PnP header (too short)" branch
of the code which loops without ever incrementing bx, so it never terminates.
The patch below (taken against your current git) seems to fix the problem for
me, but having not explored the code much, it probably isn't the most elegant
of fixes.
-- Gerald
.findpnp:
cmp dword [fs:bx], "$PnP"
jz .foundpnp
+.againpnp:
inc bx
cmp bx,-21h ; Don't get a segment overflow error!
jbe .findpnp
.foundpnp:
movzx cx,byte [fs:bx+5] ; Size of $PnP header
cmp cl,21h
- jb .findpnp ; Invalid $PnP header (too short)
+ jb .againpnp ; Invalid $PnP header (too short)
push bx
xor ax,ax
.checkpnp: