Code: Select all
; -----------------------------------------------------------------------------
; IN : r8= ioapic address, EBX = index register
; OUT: ECX = return value
ioapic_read:
mov [r8], ebx
mov ecx, [r8 + 0x10]
ret
; -----------------------------------------------------------------------------
; IN : r8= ioapic address, EBX = index register, ECX = value
; OUT: -
ioapic_write:
mov [r8], ebx
mov [r8 + 0x10], ecx
ret
The following example illustrates my issue:
Code: Select all
mov r8, [IOAPICAddress]
mov ecx, 0x20
mov ebx, 0x10
call ioapic_write
mov ecx, 0x21
mov ebx, 0x12
call ioapic_write
mov ebx, 0x10
call ioapic_read
; ecx should equal 0x20 but it equals 0x21
Running under virtualbox. Extremely frustrating. Out of ideas.