Rev 2064 | Rev 2071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2064 | Rev 2065 | ||
---|---|---|---|
Line 113... | Line 113... | ||
113 | 113 | ||
114 | ipl = interrupts_disable(); |
114 | ipl = interrupts_disable(); |
115 | spinlock_lock(&egalock); |
115 | spinlock_lock(&egalock); |
116 | 116 | ||
117 | switch (ch) { |
117 | switch (ch) { |
118 | case '\n': |
118 | case '\n': |
119 | ega_cursor = (ega_cursor + ROW) - ega_cursor % ROW; |
119 | ega_cursor = (ega_cursor + ROW) - ega_cursor % ROW; |
120 | break; |
120 | break; |
121 | case '\t': |
121 | case '\t': |
122 | ega_cursor = (ega_cursor + 8) - ega_cursor % 8; |
122 | ega_cursor = (ega_cursor + 8) - ega_cursor % 8; |
123 | break; |
123 | break; |
124 | case '\b': |
124 | case '\b': |
125 | if (ega_cursor % ROW) |
125 | if (ega_cursor % ROW) |
126 | ega_cursor--; |
126 | ega_cursor--; |
127 | break; |
127 | break; |
128 | default: |
128 | default: |
129 | ega_display_char(ch); |
129 | ega_display_char(ch); |
130 | ega_cursor++; |
130 | ega_cursor++; |
131 | break; |
131 | break; |
132 | } |
132 | } |
133 | ega_check_cursor(); |
133 | ega_check_cursor(); |
134 | 134 | ||
135 | spinlock_unlock(&egalock); |
135 | spinlock_unlock(&egalock); |
136 | interrupts_restore(ipl); |
136 | interrupts_restore(ipl); |