diff --git a/boot1.s b/boot1.s index 0eab9d8..5b61e6e 100644 --- a/boot1.s +++ b/boot1.s @@ -645,7 +645,7 @@ intel_8042_wait_write: ; Read the 8042 status register. in al, INTEL_8042_IN_STATUS ; Input buffer status flag set means the input buffer is full, so loop in this case. - test al, (1 << INTEL_8042_STATUS_IBUF) + test al, INTEL_8042_STATUS_MASK_IBUF jnz .loop ret @@ -659,7 +659,7 @@ intel_8042_wait_read: ; Read the 8042 status register. in al, INTEL_8042_IN_STATUS ; Output buffer status flag unset means output buffer is empty, so loop in this case. - test al, (1 << INTEL_8042_STATUS_OBUF) + test al, INTEL_8042_STATUS_MASK_OBUF jz .loop ret diff --git a/defines.s b/defines.s index dbbc5e9..747922e 100644 --- a/defines.s +++ b/defines.s @@ -15,8 +15,10 @@ %define INTEL_8042_IN_STATUS 0x64 %define INTEL_8042_OUT_CMD 0x64 -%define INTEL_8042_STATUS_OBUF 0 -%define INTEL_8042_STATUS_IBUF 1 +%define INTEL_8042_STATUS_BIT_OBUF 0 +%define INTEL_8042_STATUS_BIT_IBUF 1 +%define INTEL_8042_STATUS_MASK_OBUF (1 << INTEL_8042_STATUS_BIT_OBUF) +%define INTEL_8042_STATUS_MASK_IBUF (1 << INTEL_8042_STATUS_BIT_IBUF) %define INTEL_8042_CMD_PS2_1_DISABLE 0xad %define INTEL_8042_CMD_PS2_1_ENABLE 0xae