DOS operating systems are seeing a resurgence in the embedded market.
My device uses ROM-DOS from Datalight with a NEC V30Mx processor, which provides the 80286 instruction set. ROM-DOS is roughly equal to MS-DOS 5.0 in my case
All functions and programs for PC work near normally. But the only problem comes from the keyboard which doesn’t feature the return key, but instead uses the EXE key which use a different keycode.
So when I use
scanf(), I can input numbers and letters, but pressing the EXE key doesn’t validate the result. This makes it so I have no way for setting a variable from user input.
I don’t have enough assembler knowledge for Intel CPUs. So I can’t create something from scratch. But I guess changing the validation key code on an existing
scanf()implementation would work.
scanf()is part of the C standard library, every compiler should provide it. However, most C compilers for the DOS system are closed source.
I checked gcc djggp, but they require an higher level of my instruction set (80386).
So is there a C compiler with an open source implementation or an alternative to
fscanf() function family for setting variable from user input?