下へ
> 2021/10/17 (日) 04:37:35 ◆ ▼ ◇ [misao]> bits 32
> org 0x7c00
> jmp main
> main:
> ;MEMBASE_LIMIT—Memory Base and Limit Register (PCI-PCI—D30:F0
> mov dx, 0xcf8
> mov eax, 0x8000f020
ごめんいきなりだけどビット配置合ってる?デバイスの30にレジスタ0x20アクセスしたいんやけど
参考:2021/10/17(日)04時33分13秒
2021/10/17 (日) 04:33:13 ◆ ▼ ◇ [misao]bits 32
org 0x7c00
jmp main
main:
;MEMBASE_LIMIT—Memory Base and Limit Register (PCI-PCI—D30:F0)
mov dx, 0xcf8
mov eax, 0x8000f020
; 3 8 5
out dx, eax
mov dx, 0xcfc
; 100000 28 c
; 0123456789 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
; 1000000000 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mov eax, 11100011011100000001000100110000b
out dx, eax
in eax, dx
and eax, 11100011011100000001000100110000b
JE done
jmp end
done:
mov ah, 0x0e
mov al, 'A'
int 0x10
end:
mov ah, 0x0e
mov al, 'C'
int 0x10
hlt
nop
nop
nop
nop
times 510-($-$$) db 0
dw 0aa55h
上へ