OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib-1.10.0/] [newlib/] [libc/] [sys/] [go32/] [getkey.s] - Blame information for rev 1773

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1010 ivang
/* This is file GETKEY.S */
2
/*
3
** Copyright (C) 1993 DJ Delorie
4
**
5
** This file is distributed under the terms listed in the document
6
** "copying.dj".
7
** A copy of "copying.dj" should accompany this file; if not, a copy
8
** should be available from where this file was obtained.  This file
9
** may not be distributed without a verbatim copy of "copying.dj".
10
**
11
** This file is distributed WITHOUT ANY WARRANTY; without even the implied
12
** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
 
14
Modified by J. Alan Eldridge, Liberty Brokerage, 77 Water St, NYC 10005
15
 
16
Changed handling of characters starting with 0xE0:
17
        Now calls interrupt 16, function 10
18
        if leading byte was 0x00, ah = 0x01
19
        if leading byte was 0xE0, ah = 0x02
20
 
21
        The main function is now called getxkey()...
22
        getkey is provided to maintain compatibility with
23
        already written software
24
*/
25
 
26
        .globl  _getxkey
27
_getxkey:
28
        pushl   %ebx
29
        pushl   %esi
30
        pushl   %edi
31
        movb    $0x10,%ah
32
        int     $0x16
33
        mov     $1,%bl
34
        cmpb    $0,%al
35
        je      L0
36
        cmpb    $0xE0,%al
37
        jne     L1
38
        inc     %bl
39
L0:
40
        movb    %ah,%al
41
        movb    %bl,%ah
42
        jmp     L2
43
L1:
44
        movb    $0,%ah
45
L2:
46
        andl    $0xffff,%eax
47
        popl    %edi
48
        popl    %esi
49
        popl    %ebx
50
        ret
51
 
52
        .globl  _getkey
53
_getkey:
54
        call    _getxkey
55
        testb   $0x02,%ah
56
        jz      L3
57
        movb    $0x01,%ah
58
L3:
59
        ret

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.