add ioport cast to unsigned short (for offsetting)
This commit is contained in:
@ -37,7 +37,7 @@ public:
|
|||||||
void outb(unsigned char offset, unsigned char val) const {
|
void outb(unsigned char offset, unsigned char val) const {
|
||||||
asm volatile("outb %0, %1"
|
asm volatile("outb %0, %1"
|
||||||
:
|
:
|
||||||
: "a"(val), "Nd"(address + offset));
|
: "a"(val), "Nd"((unsigned short)(address + offset)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wortweise Ausgabe eines Wertes ueber einen I/O-Port.
|
// Wortweise Ausgabe eines Wertes ueber einen I/O-Port.
|
||||||
@ -70,7 +70,7 @@ public:
|
|||||||
|
|
||||||
asm volatile("inb %1, %0"
|
asm volatile("inb %1, %0"
|
||||||
: "=a"(ret)
|
: "=a"(ret)
|
||||||
: "Nd"(address + offset));
|
: "Nd"((unsigned short)(address + offset)));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user