Discussion:
SetConsoleMode
(too old to reply)
muta...@gmail.com
2021-11-28 09:19:26 UTC
Permalink
When I run micro-emacs, it needs to switch to getting
keystrokes from the user without the OS echoing the
characters and without waiting for a complete line to
be obtained.

In Unix there is an ioctl call to switch to that mode. On
Windows there is a SetConsoleMode function:

https://docs.microsoft.com/en-us/windows/console/setconsolemode

On MSDOS it appears that the application is instead
meant to stop doing a read() call and basically do an
INT 21H that is get_char_immediate_without_echo().

I'm wondering if there is some underlying principle that
says which of those 3 approaches is technically the best.
How do you compare APIs?

Thanks. Paul.
wolfgang kern
2021-11-28 11:29:11 UTC
Permalink
Post by ***@gmail.com
When I run micro-emacs, it needs to switch to getting
keystrokes from the user without the OS echoing the
characters and without waiting for a complete line to
be obtained.
In Unix there is an ioctl call to switch to that mode. On
https://docs.microsoft.com/en-us/windows/console/setconsolemode
On MSDOS it appears that the application is instead
meant to stop doing a read() call and basically do an
INT 21H that is get_char_immediate_without_echo().
I'm wondering if there is some underlying principle that
says which of those 3 approaches is technically the best.
none of them, my keystrokes go always direct to the instance currently
in focus regardless of the type. so it's a matter of the active code to
tell system-/text-keys apart.
i.e. one instance could use F1..F12 as special character short cut while
another make some ASCII keys call system functions... just flexible.
Post by ***@gmail.com
How do you compare APIs?
?? Loonix vs. windoze vs. Mac ??
I like Sir Sinclair's ZX81 best.
__
wolfgang
JJ
2021-11-29 05:34:54 UTC
Permalink
Post by ***@gmail.com
When I run micro-emacs, it needs to switch to getting
keystrokes from the user without the OS echoing the
characters and without waiting for a complete line to
be obtained.
In Unix there is an ioctl call to switch to that mode. On
https://docs.microsoft.com/en-us/windows/console/setconsolemode
On MSDOS it appears that the application is instead
meant to stop doing a read() call and basically do an
INT 21H that is get_char_immediate_without_echo().
I'm wondering if there is some underlying principle that
says which of those 3 approaches is technically the best.
Best is relative. One's trash can be someone else's treasure, and vice
versa. So, include all of them.
Post by ***@gmail.com
How do you compare APIs?
Thanks. Paul.
Check everything. e.g. feature coverage; and advantages/disadvantages of
each feature implementation and usage - which includes performance, resource
usage efficiency, and extendability.
Rod Pemberton
2021-11-29 08:50:45 UTC
Permalink
On Sun, 28 Nov 2021 01:19:26 -0800 (PST)
Post by ***@gmail.com
When I run micro-emacs, it needs to switch to getting
keystrokes from the user without the OS echoing the
characters and without waiting for a complete line to
be obtained.
In Unix there is an ioctl call to switch to that mode. On
https://docs.microsoft.com/en-us/windows/console/setconsolemode
On MSDOS it appears that the application is instead
meant to stop doing a read() call and basically do an
INT 21H that is get_char_immediate_without_echo().
I'm wondering if there is some underlying principle that
says which of those 3 approaches is technically the best.
How do you compare APIs?
I'm not familiar with this. Although, I do know that DOS has IOCTLs on
Int 21h, AX=44xxh functions and device drivers have IOCTL functions:

http://www.ctyme.com/intr/int-21.htm
https://sites.google.com/site/pcdosretro/devinfo

You really need to post DOS stuff to comp.os.msdos.programmer.
--
"If Britain were to join the United States, it would be the
second-poorest state, behind Alabama and ahead of Mississippi," Hunter
Schwarz, Washington Post
muta...@gmail.com
2021-12-07 02:50:23 UTC
Permalink
I'm not familiar with this. Although, I do know that DOS has IOCTLs on
Thanks. Wasn't aware of that, and this might be what
I want. I didn't realize that MSDOS 2.0 was so close to
Unix.
You really need to post DOS stuff to comp.os.msdos.programmer.
Will post my follow-up there.

Thanks. Paul.

Loading...