File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 9090 streamReadBuffer
9191 streamReadToEnd
9292 getStreamInfo
93+ seek
9394
9495# Graphics
9596 allocScreenBuffer
154155 getKernelCommitsSinceTag
155156 getKernelShortHash
156157 isKernelDirty
158+ isAlphaNum
157159
158160# Strings
159161 strlen
Original file line number Diff line number Diff line change @@ -470,4 +470,32 @@ isKernelDirty:
470470 cp '+'
471471 pop bc
472472 ret
473+
474+ ;; isAlphaNum [Miscellaneous]
475+ ;; Tests if a character is a letter or a number.
476+ ;; Inputs:
477+ ;; A: character to test
478+ ;; Outputs:
479+ ;; C: set if the character is alphanumeric
480+ isAlphaNum:
481+ cp '9' + 1
482+ jr nc , .notNum
483+ cp '0'
484+ ccf
485+ ret
486+ .notNum:
487+ cp 'Z' + 1
488+ jr nc , .notUpperAlpha
489+ cp 'A'
490+ ccf
491+ ret
492+ .notUpperAlpha:
493+ cp 'z' + 1
494+ jr nc , .notLowerAlpha
495+ cp 'a'
496+ ccf
497+ ret
498+ .notLowerAlpha:
499+ or a
500+ ret
473501
You can’t perform that action at this time.
0 commit comments