From 5f8a989e38e5b9d236bbc67b309df79bf13fb2bb Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Sun, 3 Dec 2017 11:49:24 -0500 Subject: Add %c specifier to printf --- stdio.asm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'stdio.asm') 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 -- cgit