Rev 2967 | Rev 2973 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2967 | Rev 2968 | ||
---|---|---|---|
Line 36... | Line 36... | ||
36 | 36 | ||
37 | void __io_init(void); |
37 | void __io_init(void); |
38 | void __main(void); |
38 | void __main(void); |
39 | void __exit(void); |
39 | void __exit(void); |
40 | 40 | ||
- | 41 | static void kputint(unsigned i) |
|
- | 42 | { |
|
- | 43 | unsigned dummy; |
|
- | 44 | asm volatile ( |
|
- | 45 | "movl $30, %%eax;" |
|
- | 46 | "int $0x30" |
|
- | 47 | : "=d" (dummy) /* output - %edx clobbered */ |
|
- | 48 | : "d" (i) /* input */ |
|
- | 49 | : "%eax","%ecx" /* all scratch registers clobbered */ |
|
- | 50 | ); |
|
- | 51 | } |
|
- | 52 | ||
- | 53 | ||
41 | static void test(void) |
54 | static void test(void) |
42 | { |
55 | { |
- | 56 | kputint(-1); |
|
- | 57 | kputint(42); |
|
- | 58 | while(1); |
|
43 | } |
59 | } |
44 | 60 | ||
45 | int main(int argc, char *argv[]) |
61 | int main(int argc, char *argv[]) |
46 | { |
62 | { |
47 | test(); |
63 | test(); |