summaryrefslogtreecommitdiff
path: root/stdio.asm
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2017-12-03 11:49:24 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2017-12-03 11:49:24 -0500
commit5f8a989e38e5b9d236bbc67b309df79bf13fb2bb (patch)
tree968d7974d3dfab6801d75525137ca3b2b83baca4 /stdio.asm
parent11a24bb062911ede0fb9fed0ef536bdfcef92cc1 (diff)
downloadminos-5f8a989e38e5b9d236bbc67b309df79bf13fb2bb.tar.gz
Add %c specifier to printf
Diffstat (limited to 'stdio.asm')
-rw-r--r--stdio.asm8
1 files changed, 8 insertions, 0 deletions
diff --git a/stdio.asm b/stdio.asm
index 35f4cd6..4069bff 100644
--- a/stdio.asm
+++ b/stdio.asm
@@ -182,6 +182,9 @@ printf:
cmp al, '%' ; '%%' - just print the character
je .do_percent_escape
+ cmp al, 'c' ; '%c' - proccess character
+ je .do_char
+
cmp al, 'd' ; '%d' - process integer
je .do_int
@@ -207,6 +210,11 @@ printf:
call putc
jmp .main_string
+ .do_char:
+ mov ax, [bp]
+ call putc
+ jmp .main_string
+
.do_hex:
mov ax, [bp]
call puthex