/** * @file asm.h * @brief Assembly wrappers * @author Jake "lordtet" Holtham * @date 2025 * Wrapper functions for using assembly files. */ #ifndef ASM_H #define ASM_H #include /** * @brief Wrapper for asm instruction `out` that feeds a byte. * @param port I/O Address for the port to send to * @param data Data to send */ void outb(uint16_t port, uint8_t data); /** * @brief Wrapper for asm instruction "in" that receives bytewise. * @param port I/O Address for the port to listen from * @return (uint8_t) The received byte. */ uint8_t inb(uint16_t port); /** * @brief Refresh the CR3 register. * Moves CR3 into a scratch register and back into CR3. Usually used to nuke the TLB. */ void cr3_reload(); #endif