SvarDOS / edrdos

Enhanced DR-DOS kernel and command interpreter ported to JWasm and OpenWatcom C
http://svardos.org/
Other
40 stars 4 forks source link

BUFFERSHIGH yields an error message "Invalid number of buffers" #95

Closed mateuszviste closed 3 months ago

mateuszviste commented 3 months ago

Adding BUFFERSHIGH=8 in CONFIG.SYS makes the EDR kernel display the message Invalid number of buffers at boot. I tried different values (2, 4, 8, 16, 24..), same result. The same CONFIG.SYS works with FreeDOS (or at least - no error message is displayed).

Changing "BUFFERSHIGH=8" to "BUFFERS=8" makes the error message go away.

Maybe the message means that the number of buffers will not fit into HMA (or is it UMB?), but if so then it should probably be worded differently.

boeckmann commented 3 months ago

I think there is only a HIBUFFERS command, no BUFFERSHIGH.

mateuszviste commented 3 months ago

I think there is only a HIBUFFERS command, no BUFFERSHIGH.

Then the error message is still misleading, as it suggests the command is somewhat understood but failed to be applied (talks specifically about "buffers"). Bad parsing?

mateuszviste commented 3 months ago

bad (lazy) parsing bug confirmed:

image

boeckmann commented 3 months ago

yes lazy parsing. it finds BUFFERS as a command end then tries to skip spaces (none there) and tests for = or ?. But it does not complain, because the = is optional. it then tries to parse the rest of the line as a number.

boeckmann commented 3 months ago

scan is the subroutine that deals with it: https://github.com/SvarDOS/edrdos/blob/83b66305d6498cad55c585ede6a6a639cbc3fdc1/drbio/genercfg.asm#L2681-L2722

mateuszviste commented 3 months ago

maybe an easy compromise would be to register BUFFERSHIGH as an alias to BUFFERS? BUFFERSHIGH is a valid MSDOS directive and it is also supported by FreeDOS, hence it is possible some users migrating from the FreeDOS kernels would have it in CONFIG.SYS (was my case).

boeckmann commented 3 months ago

Ok, will implement it.

boeckmann commented 3 months ago

Should be fixed by https://github.com/SvarDOS/edrdos/commit/8b1c69ca12c500af2e54dda6d94e242a3da2abf3

mateuszviste commented 3 months ago

I confirm - no more error message. Thank you! :) (closing the issue)

A question, if you don't mind: with BUFFERS=10 (or BUFFERSHIGH=10, does not matter), the kernel shows a message about "1 in TPA":

image

It's two questions, actually:

  1. What is "TPA" ?
  2. Why does it says it allocated "1", while I asked for 10? (message is the same also for 20 or 50)
boeckmann commented 3 months ago

TPA stands for "transient program area". It is basically the memory available for DOS programs below the BIOS region or end of memory, whatever comes first. So typically the memory below 640K. Are you sure this message comes from the kernel? I did not find this message in the kernel source.

mateuszviste commented 3 months ago

Thanks for the TPA explanation, I've never heard this acronym before.

Are you sure this message comes from the kernel?

It does not, stupid user should have his glasses on. :) This TPA message comes from the DISPLAY driver. The kernel does not emit any message at all about buffers. Thanks again (and sorry for the noise).

boeckmann commented 3 months ago

No problem. Could have been my question :D