AmlField.AmlUnit.put: def of bend-osdev-acpi@0.1.1.0 Import: import bend-osdev-acpi@0.1.1.0/aml_field.bend as AmlField Lines 126-130 of bend-osdev-acpi@0.1.1.0/aml_field.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-acpi@0.1.1.0/aml_field.bend&start_line=126&end_line=130 import Base import bend-osdev-word64@0.1.1.0/word64.bend as W # the unit's share of the field's value x, in place in the unit def AmlUnit.put(u: AmlUnit, +x: W.W64) -> W.W64: match u: case AmlUnit{a, +s, +n, +d, ok}: W.W64.shl(W.W64.and(W.W64.shr(x, d), fld.mask(n)), s) Uses (6): https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_field.bend&name=AmlUnit https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_field.bend&name=fld.mask 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.and https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/word64.bend&name=W64.shl https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/word64.bend&name=W64.shr