annotate src/asmops.h @ 2:86781ef20689
added hardware scrolling, memset16 and temporary keyboard input for testing
author |
John Tsiombikas <nuclear@member.fsf.org> |
date |
Sat, 04 Dec 2010 08:04:43 +0200 |
parents |
ebe5e0e44a9d |
children |
b11a86695493 |
rev |
line source |
nuclear@1
|
1 #ifndef ASMOPS_H_
|
nuclear@1
|
2 #define ASMOPS_H_
|
nuclear@1
|
3
|
nuclear@1
|
4 #define inb(dest, port) asm volatile( \
|
nuclear@1
|
5 "inb %1, %0\n\t" \
|
nuclear@2
|
6 : "=a" ((unsigned char)(dest)) \
|
nuclear@2
|
7 : "dN" ((unsigned short)(port)))
|
nuclear@1
|
8
|
nuclear@1
|
9 #define ins(dest, port) asm volatile( \
|
nuclear@1
|
10 "ins %1, %0\n\t" \
|
nuclear@2
|
11 : "=a" ((unsigned short)(dest)) \
|
nuclear@2
|
12 : "dN" ((unsigned short)(port)))
|
nuclear@1
|
13
|
nuclear@1
|
14 #define inl(dest, port) asm volatile( \
|
nuclear@1
|
15 "inl %1, %0\n\t" \
|
nuclear@2
|
16 : "=a" ((unsigned long)(dest)) \
|
nuclear@2
|
17 : "dN" ((unsigned short)(port)))
|
nuclear@1
|
18
|
nuclear@1
|
19 #define outb(src, port) asm volatile( \
|
nuclear@1
|
20 "outb %0, %1\n\t" \
|
nuclear@2
|
21 :: "a" ((unsigned char)(src)), "dN" ((unsigned short)(port)))
|
nuclear@1
|
22
|
nuclear@1
|
23 #define outs(src, port) asm volatile( \
|
nuclear@1
|
24 "outs %0, %1\n\t" \
|
nuclear@2
|
25 :: "a" ((unsigned short)(src)), "dN" ((unsigned short)(port)))
|
nuclear@1
|
26
|
nuclear@1
|
27 #define outl(src, port) asm volatile( \
|
nuclear@1
|
28 "outl %0, %1\n\t" \
|
nuclear@2
|
29 :: "a" ((unsigned long)(src)), "dN" ((unsigned short)(port)))
|
nuclear@1
|
30
|
nuclear@1
|
31 #endif /* ASMOPS_H_ */
|