AmlInterp.in.base.pick: def of bend-osdev-acpi@0.1.1.0 Import: import bend-osdev-acpi@0.1.1.0/aml_interp.bend as AmlInterp Lines 416-424 of bend-osdev-acpi@0.1.1.0/aml_interp.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&start_line=416&end_line=424 import Base import bend-osdev-word64@0.1.1.0/word64.bend as W import bend-osdev-acpi@0.1.1.0/aml_ns.bend as S import bend-osdev-acpi@0.1.1.0/aml_host.bend as Hs def in.base.pick(pci: Bool, +ns: S.AmlNs, +parent: String, +off: W.W64) -> W.W64: match pci: case False{}: off case True{}: +adr = W.W64.lo(in.name_int(ns, S.AmlPath.child(parent, "_ADR"))) +bus = W.W64.lo(in.up_int(ns, parent, "_BBN")) +seg = W.W64.lo(in.up_int(ns, parent, "_SEG")) W.W64.add(Hs.AmlPci.address(seg, bus, U32.shrn(adr, 16n), U32.and(adr, 65535), 0), off) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String 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.shrn https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_host.bend&name=AmlPci.address https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&name=in.name_int https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&name=in.up_int https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_ns.bend&name=AmlNs https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_ns.bend&name=AmlPath.child 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.add https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/word64.bend&name=W64.lo