mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-20 22:38:06 +11:00
f6ded7712e
This is the first commit I do entirely in VE. It's a habit I'm planning on taking as it helps a lot to find usability issues.
17 lines
188 B
Plaintext
17 lines
188 B
Plaintext
( returns negative value on error )
|
|
: _ ( c -- n )
|
|
DUP '0' '9' =><= IF '0' - EXIT THEN
|
|
DUP 'a' 'f' =><= IF 0x57 ( 'a' - 10 ) - EXIT THEN
|
|
DROP -1 ( bad )
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|