We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7cd6dd0 + 026c3bd commit 487ed1cCopy full SHA for 487ed1c
Chapter-5/README.md
@@ -20,17 +20,21 @@ void Io::putc(char c){
20
kattr = 0x07;
21
unsigned char *video;
22
video = (unsigned char *) (real_screen+ 2 * x + 160 * y);
23
- if (c == 10) {
+ // newline
24
+ if (c == '\n') {
25
x = 0;
26
y++;
- } else if (c == 8) {
27
+ // back space
28
+ } else if (c == '\b') {
29
if (x) {
30
*(video + 1) = 0x0;
31
x--;
32
}
- } else if (c == 9) {
33
+ // horizontal tab
34
+ } else if (c == '\t') {
35
x = x + 8 - (x % 8);
- } else if (c == 13) {
36
+ // carriage return
37
+ } else if (c == '\r') {
38
39
} else {
40
*video = c;
0 commit comments