kern
diff 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 |
line diff
1.1 --- a/src/asmops.h Thu Dec 02 08:45:41 2010 +0200 1.2 +++ b/src/asmops.h Sat Dec 04 08:04:43 2010 +0200 1.3 @@ -3,29 +3,29 @@ 1.4 1.5 #define inb(dest, port) asm volatile( \ 1.6 "inb %1, %0\n\t" \ 1.7 - : "=a" (unsigned char)(dest) \ 1.8 - : "dN" (unsigned short)(port)) 1.9 + : "=a" ((unsigned char)(dest)) \ 1.10 + : "dN" ((unsigned short)(port))) 1.11 1.12 #define ins(dest, port) asm volatile( \ 1.13 "ins %1, %0\n\t" \ 1.14 - : "=a" (unsigned short)(dest) \ 1.15 - : "dN" (unsigned short)(port)) 1.16 + : "=a" ((unsigned short)(dest)) \ 1.17 + : "dN" ((unsigned short)(port))) 1.18 1.19 #define inl(dest, port) asm volatile( \ 1.20 "inl %1, %0\n\t" \ 1.21 - : "=a" (unsigned long)(dest) \ 1.22 - : "dN" (unsigned short)(port)) 1.23 + : "=a" ((unsigned long)(dest)) \ 1.24 + : "dN" ((unsigned short)(port))) 1.25 1.26 #define outb(src, port) asm volatile( \ 1.27 "outb %0, %1\n\t" \ 1.28 - :: "a" (unsigned char)(src), "dN" (unsigned short)(port)) 1.29 + :: "a" ((unsigned char)(src)), "dN" ((unsigned short)(port))) 1.30 1.31 #define outs(src, port) asm volatile( \ 1.32 "outs %0, %1\n\t" \ 1.33 - :: "a" (unsigned short)(src), "dN" (unsigned short)(port)) 1.34 + :: "a" ((unsigned short)(src)), "dN" ((unsigned short)(port))) 1.35 1.36 #define outl(src, port) asm volatile( \ 1.37 "outl %0, %1\n\t" \ 1.38 - :: "a" (unsigned long)(src), "dN" (unsigned short)(port)) 1.39 + :: "a" ((unsigned long)(src)), "dN" ((unsigned short)(port))) 1.40 1.41 #endif /* ASMOPS_H_ */