Rename int2str/uint2str -> dec2str/udec2str
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
section .bss
|
||||
cnvtBuff resb 21
|
||||
section .text
|
||||
global int2str
|
||||
global uint2str
|
||||
global dec2str
|
||||
global udec2str
|
||||
|
||||
;----- int2str(num) -----;
|
||||
; Converts a signed integer to a string
|
||||
;----- dec2str(num) -----;
|
||||
; Converts a signed integer to a string (decimal output)
|
||||
; Return value: Pointer to string containing the converted number
|
||||
; Used registers:
|
||||
; rax* num stored for div >> (ret) pointer to cnvtBuff[]
|
||||
@@ -16,7 +16,7 @@ section .text
|
||||
; rdi* (arg) number to convert to string >> Remembers if num is negative
|
||||
; rsi* Points to cnvtBuff for writing characters
|
||||
; r8* Dividor for div
|
||||
int2str:
|
||||
dec2str:
|
||||
mov rsi, cnvtBuff
|
||||
test rdi, rdi
|
||||
jnz .notZero
|
||||
@@ -56,8 +56,8 @@ int2str:
|
||||
mov rax, cnvtBuff
|
||||
ret
|
||||
|
||||
;----- uint2str(num) -----;
|
||||
; Converts an unsigned integer to a string
|
||||
;----- udec2str(num) -----;
|
||||
; Converts an unsigned integer to a string (decimal output)
|
||||
; Return value: Pointer to string containing the converted number
|
||||
; Used registers:
|
||||
; rax* num stored for div >> (ret) pointer to cnvtBuff[]
|
||||
@@ -66,7 +66,7 @@ int2str:
|
||||
; rdi* (arg) number to convert to string
|
||||
; rsi* Points to cnvtBuff for writing characters
|
||||
; r8* Dividor for div
|
||||
uint2str:
|
||||
udec2str:
|
||||
mov rsi, cnvtBuff
|
||||
test rdi, rdi
|
||||
jnz .notZero
|
||||
|
Reference in New Issue
Block a user