AmlTerm.tm.int.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 48-73 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=48&end_line=73 import Base import bend-osdev-word64@0.1.1.0/word64.bend as W import bend-osdev-bytes@0.1.1.0/bytes.bend as B def tm.int.pick(z: Bool, o: Bool, m: Bool, b8: Bool, b16: Bool, b32: Bool, +v: W.W64) -> B.Octets: match z: case True{}: tm.b([0]) case False{}: match o: case True{}: tm.b([1]) case False{}: match m: case True{}: tm.b([255]) case False{}: match b8: case True{}: tm.b([10, W.W64.lo(v)]) case False{}: match b16: case True{}: B.Octets.append(tm.b([11]), B.Octets.le16(W.W64.lo(v))) case False{}: match b32: case True{}: B.Octets.append(tm.b([12]), B.Octets.le32(W.W64.lo(v))) case False{}: B.Octets.append(tm.b([14]), B.Octets.le64(v)) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_term.bend&name=tm.b https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.append https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.le16 https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.le32 https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.le64 https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/word64.bend&name=W64 https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/word64.bend&name=W64.lo