Skip to content

Instantly share code, notes, and snippets.

@bitRAKE
Last active May 14, 2022 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bitRAKE/eaed12fe4c0a888b7e8019841a59f9b0 to your computer and use it in GitHub Desktop.
Save bitRAKE/eaed12fe4c0a888b7e8019841a59f9b0 to your computer and use it in GitHub Desktop.
GUID, UUID, ... ?
; it's many forms and names ...
macro UUID line&
match A - B - C - D - E, line
dd 0x#A
dw 0x#B,0x#C
dq 0x#D#E bswap 8
else match { A =, B =, C =, D { E } },line
dd A
dw B,C
db D E
else ; assume brief
ddq line
end match
end macro
macro compare_last_two?
local _0,_1
load _0:16 from $-16
load _1:16 from $-32
assert _0 = _1
end macro
UUID 0xC79926B7B668C0874433B9E5EBD0A0A2
UUID EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
compare_last_two
UUID {0xEBD0A0A2,0xB9E5,0x4433,0x87,0xC0,{0x68,0xB6,0xB7,0x26,0x99,0xC7}}
compare_last_two
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment