Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

MODE command (Developers)

posted by kerravon, Ligao, Free World North, 14.10.2021, 12:34

The MODE command goes something like:

MODE COM1:9600,N,8,1

This then needs to be translated into a call
to this BIOS interrupt:

http://www.ctyme.com/intr/rb-0811.htm

9600 is actually the maximum allowed value
for that interrupt, but I believe I read
somewhere that some implementations redefine
those values. Also I see here that there are
extensions available - not sure how you know
when they can be used:

http://www.ctyme.com/intr/rb-0823.htm

Regardless, I was thinking that the MODE
command should allow a speed of "MAX" instead
of needing to code an actual value.

Because the serial port in some implementations
is going to be emulated by qemu or whatever, and
the speed doesn't have a lot of meaning.

What do you think "best practice" should be?

I need to implement this for PDOS/386. Currently
I have a "portinit" command and usually give it
a value of 0xe3.

Thanks. Paul.

 

Complete thread:

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