IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo function

pack_dword

def pack_dword(low_part: Int32, high_part: Int32) -> Int32

Packs two 16-bit halves into one 32-bit word as (high<<16) | (low & 0xFFFF).

Mirrors ps.h:10-14 from the reference implementation.

Args:

  • low_part (Int32): Value occupying the low 16 bits of the packed word; masked with 0xFFFF before packing.
  • high_part (Int32): Value occupying the high 16 bits of the packed word; shifted left by 16 before packing.

Returns:

Int32

Was this page helpful?