def AmlSystem.loader
bend-osdev-acpi@0.1.1.0 · aml.bend:121
import bend-osdev-acpi@0.1.1.0/aml.bend as Aml
import Base
import bend-osdev-bytes@0.1.1.0/bytes.bend as B
import bend-osdev-acpi@0.1.1.0/aml_interp.bend as I
121
122def AmlSystem.loader(-H: Data, s: AmlSystem<H>, aml: B.Octets) -> I.AmlMachine<H>:
123 match s:
124 case AmlSystem{o, +wd, n, h}:
125 +code = B.Octets.to_list(aml)
126 I.AmlMachine{I.AmlMExec{}, I.AmlCur{code, B.len.fast(code)}, [I.AmlFTop{}], I.AmlWorld{aml.ctx("\\", Nil{}), n, h, aml.env(wd, o)}}