Closed vodozhaba closed 7 years ago
%w means 'word'.
static inline void PortWrite32(uint16_t port, uint32_t value) { __asm volatile("outl %w0, %w1" : : "a" (value), "d" (port)); } static inline uint32_t PortRead32(uint16_t port) { uint32_t ret; __asm volatile("inl %w1, %w0" : "=a" (ret) : "d" (port)); return ret; }
%w means 'word'.