Commit aca80929 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Add UUID output formatter to conversions

OS_ConvertVariform 15 outputs 128b numbers per RFC4122.

Version 5.88. Tagged as 'Kernel-5_88'
parent 371676b8
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.87"
Module_Version SETA 587
Module_MajorVersion SETS "5.88"
Module_Version SETA 588
Module_MinorVersion SETS ""
Module_Date SETS "25 Aug 2017"
Module_ApplicationDate SETS "25-Aug-17"
Module_Date SETS "27 Aug 2017"
Module_ApplicationDate SETS "27-Aug-17"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel"
Module_FullVersion SETS "5.87"
Module_HelpVersion SETS "5.87 (25 Aug 2017)"
Module_FullVersion SETS "5.88"
Module_HelpVersion SETS "5.88 (27 Aug 2017)"
END
/* (5.87)
/* (5.88)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 5.87
#define Module_MajorVersion_CMHG 5.88
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 25 Aug 2017
#define Module_Date_CMHG 27 Aug 2017
#define Module_MajorVersion "5.87"
#define Module_Version 587
#define Module_MajorVersion "5.88"
#define Module_Version 588
#define Module_MinorVersion ""
#define Module_Date "25 Aug 2017"
#define Module_Date "27 Aug 2017"
#define Module_ApplicationDate "25-Aug-17"
#define Module_ApplicationDate "27-Aug-17"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "castle/RiscOS/Sources/Kernel"
#define Module_FullVersion "5.87"
#define Module_HelpVersion "5.87 (25 Aug 2017)"
#define Module_LibraryVersionInfo "5:87"
#define Module_FullVersion "5.88"
#define Module_HelpVersion "5.88 (27 Aug 2017)"
#define Module_LibraryVersionInfo "5:88"
......@@ -124,6 +124,9 @@ VariformCount
ADDEQ r2, r3, r3, LSL #1 ; 3 output chars for every 1 input byte (inc term)
SUBEQ r2, r2, #1 ; Don't count the terminator
BEQ %FT30
TEQ r4, #ConvertToUUID
MOVEQ r2, #(16 * 2) + 4 ; 128b in hex with 4 hyphens
BEQ %FT30
10
; A hard length to know, just do it
Push "r1, lr"
......@@ -186,6 +189,7 @@ VariformLowest
B VariformOutputIPv6 ; ConvertToIPv6
B VariformOutputShortIPv6 ; ConvertToShortestIPv6
B VariformOutputBinHex ; ConvertToHexLowercase
B VariformOutputUUID ; ConvertToUUID
VariformHighest
VariBadConv
......@@ -483,6 +487,37 @@ VariformOutputIPv6
Pull "r0, r3, pc", EQ ; Done
B %BT10 ; More
VariformOutputUUID
TEQ r3, #16 ; Must be exactly 128b
BNE VariBadNumb
Push "r1, r3"
MOV r12, r0 ; Input block
10
Push "r3-r4, r12"
MOV r3, #2
MOV r4, #ConvertToHexLowercase
MOV r0, r12
BL VariformOutput ; 2 lowercase nybbles please
Pull "r3-r4, r12"
Pull "r1, r3, pc", VS
TEQ r3, #17 - 4
TEQNE r3, #17 - 6
TEQNE r3, #17 - 8
TEQNE r3, #17 - 10
MOVEQ r0, #"-" ; Separator
BLEQ VariformOutputChar
20
SUBS r3, r3, #1
ADDNE r12, r12, #1
BNE %BT10 ; More
MOV r0, #0 ; Terminator
BL VariformOutputChar
Pull "r1, r3, pc", VS
Pull "r0, r3, pc" ; Done
VariformOutputDotColon ROUT
Push "r1, r3-r4"
ADD r12, r0, r3 ; Input block
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment