Skip to content

Commit ecf162c

Browse files
committed
Fixed bug with formatting
1 parent 3b75e57 commit ecf162c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

functions/printf.asm

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,19 @@ section .text:
3939
popa ; Pops registers
4040
ret ; Returns from function
4141

42+
43+
_newline_format:
44+
call _newline
45+
4246
; Manages formats
4347
_format:
4448
4549
inc bx ; Incriments BX
4650
mov al, [bx] ; Moves addresses value to AL
4751
4852
cmp al, 0x6e ; If character is 'n'
49-
call _newline ; Call new line
53+
je _newline_format ; Call new line
5054
cmp al, 0x30 ; If character is '0'
5155
je _done_printf ; Exits if was \0
5256
53-
inc bx ; Incriment BX
5457
jmp _print_next_char ; Jump to next char

0 commit comments

Comments
 (0)