Minimalize comments
This commit is contained in:
11
console.asm
11
console.asm
@ -55,8 +55,8 @@ printf:
|
||||
push rbp
|
||||
mov rbp, rsp
|
||||
|
||||
push r12 ; used for writing byted to printBuff
|
||||
push r14 ; count length of printBuff
|
||||
push r12
|
||||
push r14
|
||||
|
||||
xor r10, r10
|
||||
xor r14, r14
|
||||
@ -88,7 +88,7 @@ printf:
|
||||
;--- invalid specifier ---;
|
||||
mov byte [r11], '%'
|
||||
inc r14
|
||||
inc r10 ;assuming args were passed for invalid specifiers !
|
||||
inc r10
|
||||
jmp .continue
|
||||
|
||||
;--- %d ---;
|
||||
@ -109,7 +109,6 @@ printf:
|
||||
cmove rdi, r9
|
||||
je .convertInt
|
||||
|
||||
;get from stack
|
||||
mov rdi, qword [rbp + 16 + (r10-5)*8]
|
||||
|
||||
.convertInt:
|
||||
@ -129,7 +128,7 @@ printf:
|
||||
;--- %% ---;
|
||||
.rep_pct:
|
||||
mov rdi, '%'
|
||||
dec r10 ;r10 is increased at the end, but not needed because '%%' requires no arg
|
||||
dec r10
|
||||
jmp .charToStr
|
||||
|
||||
;--- %c ---;
|
||||
@ -150,7 +149,6 @@ printf:
|
||||
cmove rdi, r9
|
||||
je .charToStr
|
||||
|
||||
;get from stack
|
||||
mov rdi, qword [rbp + 16 + (r10-5)*8]
|
||||
|
||||
.charToStr:
|
||||
@ -177,7 +175,6 @@ printf:
|
||||
cmove rsi, r9
|
||||
je .insertLoop
|
||||
|
||||
;get from stack
|
||||
mov rsi, qword [rbp + 16 + (r10-5)*8]
|
||||
|
||||
;--- Move fetched data to buffer ---;
|
||||
|
Reference in New Issue
Block a user