Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

ANSI escapes for input (Developers)

posted by ecm Homepage E-mail, Düsseldorf, Germany, 24.07.2023, 17:01

> I'm confused by this question.
>
> Terminals needed a way to send codes for special keys over the wire. DOS
> computers were supposed to use the DOS keyboard interrupt to read
> keystrokes, or the lower-level BIOS interrupt routines. For special keys
> you have to use the BIOS routines, as DOS will just return ASCII codes.

This is incorrect, on DOS stdin connected to the CON device that reads from the ROM-BIOS int 16h, you will receive non-ASCII keypresses as two DOS keypresses: A zero, and then a scancode.

For example, here's the FreeDOS kernel's CON device code to do that: https://github.com/FDOS/kernel/blob/29ccb6e45414a8a18346a97fdb0f35ebd6fb4025/kernel/console.asm#L132

---
l

 

Complete thread:

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