SYS /OEM:W9X /L 0 does not set loadaddr to 0
Opened this issue · 0 comments
An /L 0
parameter to the FreeDOS / EDR-DOS loaders is arguably invalid and should not be supported usually. (A warning should be emitted though, refer to #139 .)
However, /L 0
to the OEM loaders should be valid to patch the far jump to a jmp 70h:0
. However, in the following code line an /L parameter of zero is used to indicate a "not initialised" state rather than allowing a literal zero. That means for A:\>sys a: /bootonly /verbose /oem:w9x /l 0
the jump offset will still be set to the default (which is 200h for this /OEM switch), not 0.
Here's where a zero value means uninitialised:
Line 905 in 8552d83
Here's where the /L switch is parsed:
Lines 696 to 699 in 8552d83
Here's where the magic patch occurs for the OEM loader:
Lines 1720 to 1728 in 8552d83
I suggest to add additional boolean variables indicating whether a switch has been used or not, though this only seems to be really needed for the /L switch.