We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b75e57 commit ecf162cCopy full SHA for ecf162c
1 file changed
functions/printf.asm
@@ -39,16 +39,19 @@ section .text:
39
popa ; Pops registers
40
ret ; Returns from function
41
42
+
43
+ _newline_format:
44
+ call _newline
45
46
; Manages formats
47
_format:
48
49
inc bx ; Incriments BX
50
mov al, [bx] ; Moves addresses value to AL
51
52
cmp al, 0x6e ; If character is 'n'
- call _newline ; Call new line
53
+ je _newline_format ; Call new line
54
cmp al, 0x30 ; If character is '0'
55
je _done_printf ; Exits if was \0
56
- inc bx ; Incriment BX
57
jmp _print_next_char ; Jump to next char
0 commit comments