AmlTerm.tm.hex.pick: def of bend-osdev-acpi@0.1.1.0 Import: import bend-osdev-acpi@0.1.1.0/aml_term.bend as AmlTerm Lines 153-164 of bend-osdev-acpi@0.1.1.0/aml_term.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-acpi@0.1.1.0/aml_term.bend&start_line=153&end_line=164 import Base # EISAID("PNP0A03") (chapter 19, EISAID): three letters of five bits each and four hex # digits, stored most significant byte first, as a DWord def tm.hex.pick(digit: Bool, upper: Bool, +c: U32) -> U32: match digit: case True{}: U32.sub(c, 48) case False{}: match upper: case True{}: U32.and(U32.sub(c, 55), 15) case False{}: U32.and(U32.sub(c, 87), 15) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub