|
|
发表于 2008-7-21 13:02:13
|
显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?$ W( Y1 r% t2 m6 t
请用下面这段代码来试试
$ X- d3 H" x0 Z" g# o reg:BYTE
* ^2 }& ?) w" O mov ax,0b108h
$ K+ r! Q% u$ [ mov bx,10h
9 S4 M2 k o9 o mov di,48h
* \' O" r4 r( t4 N* }0 C int 1ah
! F! q' Q- | `3 n+ S9 f mov reg,cl ;get RTC Control Register
" ?4 X( c, Q* }6 c: p! r $ k1 p$ X( q3 ]' ?' N
mov cl,reg
7 m M2 Q' I6 A$ w4 N and cl,3fh; N5 [! B) a! O- F" }+ U/ Z
or cl,40h ;set APCREG_EN% i5 n, T4 ~( B9 }3 r: w0 @
mov ax,0b10bh2 H; U/ }! @# C; [$ I, N
mov bx,10h
/ n) P; ?: q; \, l; I$ Y mov di,48h! z2 g4 O d. M/ s1 u/ @
int 1ah: I) [/ y R& y0 C: w" Z' A
//now can access the APC register 0 p% s$ Z: T) }5 N: E' X) p q
/ @7 }' l5 @. `. |9 ]* j mov cl,reg8 P1 w: f' x6 b9 h7 }% {
mov ax,0b10bh: ~7 V' ~* h- a6 h+ \8 w# [4 y- L
mov bx,10h5 P5 }* a7 ~3 L3 Q9 q
mov di,48h0 T, i1 H7 f2 ^2 g; L0 {0 _; K
int 1ah ;Restore |
|