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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [services/] [gfx/] [mw/] [v2_0/] [src/] [drivers/] [asmbios.s] - Blame information for rev 174

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
; Copyright (c) 1999 Greg Haerr <greg@censoft.com>
2
;
3
; int10 bios video function access
4
; int16 bios keyboard access
5
;
6
; assembly language routines for MSDOS Microsoft C v5.10
7
;
8
; assemble with masm -Mx -D__MEDIUM__
9
;
10
 
11
 
12
MSC = 1
13
;__MEDIUM__ = 1
14
        include asm.h
15
        .header
16
 
17
        .cseg
18
 
19
;
20
; es:bp = int10(int ax,int bx)
21
;       Call video bios using interrupt 10h
22
;
23
        .cproc  int10
24
        push    bp
25
        mov     bp,sp
26
        push    es
27
        push    ds
28
        push    si
29
        push    di
30
 
31
        mov     ax,arg1[bp]     ; get first arg
32
        mov     bx,arg1+2[bp]   ; get second arg
33
        int     10h
34
        mov     dx,es           ; return es:bp
35
        mov     ax,bp
36
 
37
        pop     di
38
        pop     si
39
        pop     ds
40
        pop     es
41
        pop     bp
42
        ret
43
        .cendp  int10
44
 
45
;
46
; int kbpoll(void) - poll keyboard for char ready
47
;
48
        .cproc  kbpoll
49
        mov     ah,01h                  ; read, no remove
50
        int     16h
51
        jz      $9                      ; no chars ready
52
        mov     ax,1                    ; chars ready
53
        ret
54
$9:     xor     ax,ax                   ; no chars ready
55
        ret
56
        .cendp  kbpoll
57
;
58
; int kbread(void) - wait and read a kbd char when ready
59
;
60
        .cproc  kbread
61
        mov     ah,00h                  ; read and remove
62
        int     16h                     ; return ax
63
        ret
64
        .cendp  kbread
65
;
66
; int kbflags(void) - return kbd shift status
67
;
68
        .cproc  kbflags
69
        mov     ah,02h                  ; get shift status
70
        int     16h
71
        mov     ah,0                     ; low bits only for now...
72
        ret
73
        .cendp  kbflags
74
 
75
        .cend
76
        end

powered by: WebSVN 2.1.0

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