|
|
发表于 2008-7-21 13:02:13
|
显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?1 ?$ q# I& d& P# Y6 ~
请用下面这段代码来试试
( d: \7 E$ o+ M3 w' a, f) E reg:BYTE
~2 f# }7 `! @( s3 M( d mov ax,0b108h
3 [0 \- a- ^ V, m4 q6 o mov bx,10h
0 H) P, Q3 s: p" j- j mov di,48h5 s# b2 Q& f9 m/ F; y
int 1ah
4 ]3 n$ E$ J6 Q' e1 e mov reg,cl ;get RTC Control Register% h7 q( N( s7 @! l+ P u/ y3 m9 J7 H
" |) y0 O" G! G( k mov cl,reg
) s* b" [% {& p' S `0 Z, I- f and cl,3fh
8 d# e. u4 C+ {( b: a or cl,40h ;set APCREG_EN. w: v# A' l3 |0 W; }: `! T9 ~6 v
mov ax,0b10bh
- }/ g# {; \# A- f8 o; u# G3 w5 V. y8 ? mov bx,10h
+ s3 N! }2 ^. L3 P, o' I mov di,48h
- C. T+ o" N3 Q( i1 P) v int 1ah
6 ]- z: [( o, f8 q; F% Y3 k //now can access the APC register
; G% X1 m2 W; |1 d, _ & o' ]2 c( ^4 p6 \8 ^9 F. I
mov cl,reg/ }9 e; _8 f, L1 G! O
mov ax,0b10bh
6 j* W, ?$ r* U" _' Q( R$ `( s mov bx,10h
q: c; c2 i! L mov di,48h
/ @2 C. E2 F0 R- Y! V0 ~+ X int 1ah ;Restore |
|