Subversion Repositories HelenOS

Rev

Rev 2071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2071 Rev 2082
Line 67... Line 67...
67
 * @param d Character device.
67
 * @param d Character device.
68
 * @param ch Character to be printed.
68
 * @param ch Character to be printed.
69
 */
69
 */
70
void ski_putchar(chardev_t *d, const char ch)
70
void ski_putchar(chardev_t *d, const char ch)
71
{
71
{
72
    __asm__ volatile (
72
    asm volatile (
73
        "mov r15 = %0\n"
73
        "mov r15 = %0\n"
74
        "mov r32 = %1\n"    /* r32 is in0 */
74
        "mov r32 = %1\n"    /* r32 is in0 */
75
        "break 0x80000\n"   /* modifies r8 */
75
        "break 0x80000\n"   /* modifies r8 */
76
        :
76
        :
77
        : "i" (SKI_PUTCHAR), "r" (ch)
77
        : "i" (SKI_PUTCHAR), "r" (ch)
Line 93... Line 93...
93
 */
93
 */
94
int32_t ski_getchar(void)
94
int32_t ski_getchar(void)
95
{
95
{
96
    uint64_t ch;
96
    uint64_t ch;
97
   
97
   
98
    __asm__ volatile (
98
    asm volatile (
99
        "mov r15 = %1\n"
99
        "mov r15 = %1\n"
100
        "break 0x80000;;\n" /* modifies r8 */
100
        "break 0x80000;;\n" /* modifies r8 */
101
        "mov %0 = r8;;\n"      
101
        "mov %0 = r8;;\n"      
102
 
102
 
103
        : "=r" (ch)
103
        : "=r" (ch)
Line 202... Line 202...
202
 * Issue SSC (Simulator System Call) to
202
 * Issue SSC (Simulator System Call) to
203
 * to open debug console.
203
 * to open debug console.
204
 */
204
 */
205
void ski_init_console(void)
205
void ski_init_console(void)
206
{
206
{
207
    __asm__ volatile (
207
    asm volatile (
208
        "mov r15 = %0\n"
208
        "mov r15 = %0\n"
209
        "break 0x80000\n"
209
        "break 0x80000\n"
210
        :
210
        :
211
        : "i" (SKI_INIT_CONSOLE)
211
        : "i" (SKI_INIT_CONSOLE)
212
        : "r15", "r8"
212
        : "r15", "r8"