Rev 501 | Rev 522 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 501 | Rev 519 | ||
---|---|---|---|
Line 62... | Line 62... | ||
62 | : "r15", "in0", "r8" |
62 | : "r15", "in0", "r8" |
63 | ); |
63 | ); |
64 | 64 | ||
65 | if (ch == '\n') ski_putchar('\r'); |
65 | if (ch == '\n') ski_putchar('\r'); |
66 | } |
66 | } |
- | 67 | ||
- | 68 | ||
- | 69 | /** Display character on debug console |
|
- | 70 | * |
|
- | 71 | * Use SSC (Simulator System Call) to |
|
- | 72 | * get character from debug console. |
|
- | 73 | */ |
|
- | 74 | __s32 ski_getchar(void) |
|
- | 75 | { |
|
- | 76 | __u64 ch; |
|
- | 77 | ||
- | 78 | __asm__ ( |
|
- | 79 | "mov r15=%0\n" |
|
- | 80 | "break 0x80000;;\n" /* modifies r8 */ |
|
- | 81 | "mov %1=r8;;\n" |
|
- | 82 | ||
- | 83 | : |
|
- | 84 | : "i" (SKI_GETCHAR), "r" (ch) |
|
- | 85 | : "r15", "r8" |
|
- | 86 | ); |
|
- | 87 | ||
- | 88 | return (__s32)ch; |
|
- | 89 | } |