Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Device drivers: Changing the attribute word at install time? (Developers)

posted by mbbrutman Homepage, Washington, USA, 03.10.2023, 22:51

> Hello mbbrutman, hello ecm,
>
> What happens if you set attribute bit 1 unconditionally?
>
> As far as I can tell from Microsoft's source code release
> (https://github.com/microsoft/MS-DOS), it seems that MS-DOS 2.x only cares
> about bit 1 for character devices — in which case it says whether the
> device is the default stdout. Perhaps you could simply set bit 1 for a
> block device driver and get away with it.
>
> Thank you!

I could set the bits and hope that the older versions of DOS ignores what it does not like, but the professional programmer in me says that relying on undocumented behavior is probably not a great idea. Debugging these things is difficult already.

If PC DOS an MS DOS only evaluate the attribute bits after the init routine runs (as the books suggest) then I have a solution - update the attribute bits at init time. Otherwise it's safer to do separate versions of the device driver for DOS 2, 3, and 5/6.

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 73 users online (0 registered, 73 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum