package x64 const ( AddressMemory = byte(0b00) AddressMemoryOffset8 = byte(0b01) AddressMemoryOffset32 = byte(0b10) AddressDirect = byte(0b11) ) // ModRM is used to generate a ModRM suffix. // - mod: 2 bits // - reg: 3 bits // - rm: 3 bits func ModRM(mod byte, reg byte, rm byte) byte { return (mod << 6) | (reg << 3) | rm }