Rev 36 | Rev 63 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 36 | Rev 37 | ||
---|---|---|---|
Line 26... | Line 26... | ||
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | */ |
27 | */ |
28 | 28 | ||
29 | #include <putchar.h> |
29 | #include <putchar.h> |
30 | #include <arch/types.h> |
30 | #include <arch/types.h> |
- | 31 | #include <arch/ski/ski.h> |
|
31 | 32 | ||
32 | void putchar(char ch) |
33 | void putchar(char ch) |
33 | { |
34 | { |
- | 35 | __asm__ ( |
|
- | 36 | "mov r15=%0\n" |
|
- | 37 | "mov r32=%1\n" /* r32 is in0 */ |
|
- | 38 | "break 0x80000\n" /* modifies r8 */ |
|
- | 39 | : |
|
- | 40 | : "i" (SKI_CONSOLE_PUTC), "r" (ch) |
|
- | 41 | : "r15", "in0", "r8" |
|
- | 42 | ); |
|
- | 43 | ||
- | 44 | if (ch == '\n') putchar('\r'); |
|
34 | } |
45 | } |