From 9528e447fa3e7ab3c5e92e5d7d8f4fb86b8d896b Mon Sep 17 00:00:00 2001 From: Top_gun Date: Tue, 25 Oct 2016 11:23:06 +0530 Subject: [PATCH] Updated Readme Changed the doc for clearity --- Chapter-5/README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Chapter-5/README.md b/Chapter-5/README.md index 703e2df..50993f8 100644 --- a/Chapter-5/README.md +++ b/Chapter-5/README.md @@ -20,23 +20,24 @@ void Io::putc(char c){ kattr = 0x07; unsigned char *video; video = (unsigned char *) (real_screen+ 2 * x + 160 * y); - // newline - if (c == '\n') { + + if (c == '\n') { // newline x = 0; y++; - // back space - } else if (c == '\b') { + } + else if (c == '\b') { // back space if (x) { *(video + 1) = 0x0; x--; } - // horizontal tab - } else if (c == '\t') { + } + else if (c == '\t') { // horizontal tab x = x + 8 - (x % 8); - // carriage return - } else if (c == '\r') { + } + else if (c == '\r') { // carriage return x = 0; - } else { + } + else { *video = c; *(video + 1) = kattr;