Implement atoll() function.

This is just a small wrapper around strtoll().
This commit is contained in:
Stephen Heumann 2021-02-17 14:37:54 -06:00
parent f9d7017687
commit 52c011ab48
1 changed files with 29 additions and 0 deletions

View File

@ -276,6 +276,35 @@ atol entry
rtl
end
****************************************************************
*
* atoll - convert a string to a long long
*
* Inputs:
* str - pointer to the string
*
* Outputs:
* converted number
*
****************************************************************
*
atoll start
ph2 #10 base 10
ph4 #0 no pointer returned
lda 12,S pass the string addr on
pha
lda 12,S
pha note: x reg is unchanged
jsl strtoll convert the string
lda 2,S fix the stack
sta 6,S
pla
sta 3,S
pla
rtl
end
****************************************************************
*
* char *bsearch(key, base, count, size, compar)