you could probably do a macro or a template with it I'd imagine. vaguely looking like macro make_multiboot(args: varargs[untyped]): untyped = assert len(args) % 2 == 0, "options must be a multiple of two" var s = ".align 4\nmultiboot_header:....." var i = 0 while i < len(args): s &= ".short " & args[i] & "\n" s &= ".long " & args[i+1] & "\n" i.inc(2) result = quote do: asm `s` proc entry.. asm """jmp multiboot_entry""" make_multiboot(0, 8)