OS_ReadUnsigned
(SWI &21)
On entry
R0 bits 0-7 = base in the range 2-36 (else 10 assumed)
bits 8-27 reserved, should be 0
bit 28 set => read a 64-bit value to r2,r3
bit 29 set => restrict range to 0 - R2 (or if bit 28 set, R2+(R3<<32))
bit 30 set => restrict range to 0- 255
bit 31 set => check terminator is a control character or space
R1 = pointer to string
R2 = least significant word of maximum value if R0 bit 29 set
R3 = most significant word of maximum value if R0 bits 28 and 29 both set
R4 = &45444957 ("WIDE") if this API applies, otherwise see PRM 1-448
On exit
R0 preserved
R1 = pointer to terminator character
R2 = least significant word of value
R3 = most significant word of value if R0 bit 28 set on entry
R4 = bitmask of R0 flags understood by current kernel (currently &F0000000)
Suggestions for future flag uses:
* permit "0x" (hexadecimal), "0" (octal) and "0b" or "%" (binary) prefixes
* signed numbers
* floating point numbers
* negative bases
-
Jeffrey Lee authored
Detail: hdr/ARMops - Reserve OS_PlatformFeatures 0 bit 20 for indicating whether high processor vectors are in use s/Kernel - Add local definitions of BYTEWS, LDROSB, STROSB, VDWS macros (previously in Hdr:Macros) s/MoreComms - Fix potential buffer overflow when filling error buffer (although GSTrans shouldn't overflow the buffer in the first place?) s/Arthur2 - GSRead number detection fix s/ArthurSWIs - Updated OS_ReadUnsigned to support reading 64bit numbers Docs/ReadUnsigned - Docs for the updated OS_ReadUnsigned interface Admin: Untested! Needs HdrSrc 1.86 Version 5.35, 4.79.2.120. Tagged as 'Kernel-5_35-4_79_2_120'
fef39aba