LAWSWhole.acpilaw.written: def of bend-osdev-acpi@0.1.2.0 Import: import bend-osdev-acpi@0.1.2.0/LAWS_whole.bend as LAWSWhole Lines 26-31 of bend-osdev-acpi@0.1.2.0/LAWS_whole.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-acpi@0.1.2.0/LAWS_whole.bend&start_line=26&end_line=31 import Base import bend-osdev-bytes@0.1.1.1/bytes.bend as B import bend-osdev-acpi@0.1.2.0/header.bend as H # the header h with the signature sig and the fields build computes for the # table o: Length the length of o, Checksum the byte at offset 9 of o def acpilaw.written(sig: B.Octets, h: H.AcpiHeader, +o: B.Octets) -> H.AcpiHeader: match h: case H.AcpiHeader{s, l, r, c, oi, t, orv, ci, cr}: H.AcpiHeader{sig, U32.from_nat(B.Octets.len(o)), r, Maybe.default(&2, U32, B.Octets.at(o, 9n), 0), oi, t, orv, ci, cr} Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe.default https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.from_nat https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.2.0/header.bend&name=AcpiHeader https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.1/bytes.bend&name=Octets https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.1/bytes.bend&name=Octets.at https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.1/bytes.bend&name=Octets.len