|
|
发表于 2008-7-21 13:02:13
|
显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?7 _, J* o4 Z' J+ A* Q2 h- s
请用下面这段代码来试试
1 F2 P/ u! f7 R. M1 m8 R reg:BYTE; g$ ~- H }; y8 n3 k1 G
mov ax,0b108h
6 C8 q8 s* e# _) n mov bx,10h
9 G2 x$ j* E. w2 Q- P' \2 C2 d) v. E mov di,48h2 W9 _; Y5 _: {5 _ B* g/ W& A
int 1ah3 l. H' v5 K+ o1 F% |& Q7 V; Z% Y" b$ f
mov reg,cl ;get RTC Control Register
# [% ]8 _+ C. T; B$ N : {6 E, p! ? L3 A5 L0 [4 Z
mov cl,reg
+ p, K: S: K! ^ and cl,3fh ?4 ^+ s3 [0 \8 @) C5 D9 M2 V
or cl,40h ;set APCREG_EN
: R5 M7 B& P- x9 b% ^ mov ax,0b10bh: T9 U4 d' Z, F" n a8 B/ b
mov bx,10h/ m" Y3 ?/ \! @
mov di,48h+ k' f# f2 q+ {; F
int 1ah' A7 e, _& S! i- d y
//now can access the APC register
- J# f i) S! g0 ~
& m, c; b3 r8 ?; Z1 D+ M mov cl,reg
. T* O: Y5 u; V0 l4 D mov ax,0b10bh
+ u" y% b/ s O* t, q, O. d mov bx,10h
3 i" \4 T& l! b mov di,48h
/ @, }! n. e: E8 ? int 1ah ;Restore |
|