]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/services/gfx/mw/v2_0/src/drivers/getbyte.s
Initial revision
[karo-tx-redboot.git] / packages / services / gfx / mw / v2_0 / src / drivers / getbyte.s
1 # 05/08/2000 Michael Temari <Michael@TemWare.Com>
2 # GETBYTE/PUTBYTE for MINIX
3 ! sections
4
5 .sect .text; .sect .rom; .sect .data; .sect .bss
6
7 #include "/usr/src/kernel/protect.h"
8
9 .extern _GETBYTE_FP
10 .extern _PUTBYTE_FP
11 .extern _RMW_FP
12
13 .sect .bss
14 .sect .text
15
16         .align  16
17 _GETBYTE_FP:
18         mov     bx,ds
19         mov     ecx, 0x17
20         mov     ds, cx
21         mov     edx,4(esp)              ! offset
22         sub     ax, ax
23         movb    al,(edx)                ! byte to get
24         mov     ds,bx
25         ret
26
27         .align  16
28 _PUTBYTE_FP:
29         mov     bx,ds
30         mov     ecx, 0x17
31         mov     ds, cx
32         mov     eax,4(esp)              ! offset
33         mov     edx,4+4(esp)            ! data byte
34         movb    (eax),dl                ! byte to store
35         mov     ds,bx
36         ret
37
38         .align  16
39 _RMW_FP:
40         mov     bx,ds
41         mov     ecx, 0x17
42         mov     ds, cx
43         mov     eax,4(esp)              ! offset
44         orb     (eax),cl                ! byte to store
45         mov     ds,bx
46         ret