Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

DWED first alpha (Announce)

posted by DosWorld, 27.11.2020, 13:08
(edited by DosWorld on 27.11.2020, 13:48)

> FreeDos+VBox has enhanced keyboard support and it does not work. I am
> forgot about my code for enhanced keyboard and did not understand whats
> happens (different scancodes). Now - its disabled.

I am wrong - scancodes is the same, but ascii-code can be different (for example - left arrow) for AX=0/INT16 and AX=10/INT16

> 2. Now, i check sequence Ctrl+Shift+Arrows - they will work with enhanced
> keyboard, only.

I add this combination, but can't check it: Ctrl+Up should produce 8D scancode, but i does not see any response from AX=0/INT16 or AX=10/INT16 when press Ctrl+Up (or Shift+Ctrl+Up). May be for 122-keyboard (AX=20/INT16) bios return this codes - i have no hardware to check it, now. Dwed, also, query AX=20/INT16, if available.

PS: dwed works fine on AMD 8086, need more optimization for highlighting, but it is useable (without highlight - is good). Many people use cpu NEC V?0 (and thinks this is XT-grade) - for they it will be enough fast.


PPS: Here is small programm - to check scancodes with different functions AX=0/INT16, AX=10/INT16, AX=20/INT16


var
is_ext_kbd : boolean;
is_122_kbd : boolean;

function hexb(b : byte):string;
const a:string[16] = '0123456789ABCDEF';
begin
        hexb := a[((b shr 4) and $0f) + 1] + a[(b and $0f) + 1];
end;

function hexw(w : word):string;
begin
        hexw := hexb(hi(w)) + hexb(lo(w));
end;

procedure check_kbd;assembler;
asm
        mov        ah,9
        int        $16
        push       ax
        and        al, $20
        mov        is_ext_kbd, al
        pop        ax
        and        al, $40
        mov        is_122_kbd, al
end;

function get_122_key:word;assembler;
asm
        mov        ah, $20
        int        $16
end;

function get_ext_key:word;assembler;
asm
        mov        ah, $10
        int        $16
end;

function get_key:word;assembler;
asm
        xor        ah, ah
        int        $16
end;

procedure print(msg : string; w : word);
begin
        if w = $011b then halt(0);
        writeln(msg, ' ', hexw(w));
end;

var key : word;
begin
        check_kbd;
        writeln('Extended keyboard : ', is_ext_kbd);
        writeln('122-key keyboard : ', is_122_kbd);
        while true do begin
                writeln('--------------------');
                print('old', get_key);
                if is_ext_kbd then print('Ext', get_ext_key);
                if is_122_kbd then print('122', get_122_key);
        end
end.

---
Make DOS great again!
Make Russia small again!

 

Complete thread:

Back to the forum
Board view  Mix view
22632 Postings in 2109 Threads, 402 registered users, 446 users online (1 registered, 445 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum