|
|
发表于 2008-7-21 13:02:13
|
显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
, A6 x2 N5 C% Z! u2 ^2 p请用下面这段代码来试试- T7 R. m2 j% ~
reg:BYTE
: [% s9 ?9 ~: h6 U7 A C0 ]0 o mov ax,0b108h& j- X/ r* \- v/ ^7 s, a
mov bx,10h
4 b: R9 B4 ^& ^ mov di,48h3 E+ G7 X+ ^2 m: f( ~7 z& s% \
int 1ah8 e$ M0 A1 H, q. N) @
mov reg,cl ;get RTC Control Register
$ c+ q: g1 X: L. Q & u+ M- }4 g' j# K# b% ?8 N' F
mov cl,reg
) o' s+ l" L# i, n5 i: ^8 j3 h- I" | and cl,3fh9 ]/ k2 J' D& J9 s( y
or cl,40h ;set APCREG_EN
" |) {6 F# c6 D# E8 {! P4 c mov ax,0b10bh( x# a6 R+ J$ Z
mov bx,10h
6 E7 @$ d: v6 \" ^' V4 p+ B/ y mov di,48h
' r/ ]5 J4 W7 S; o$ I n int 1ah
0 t1 ^7 P2 {) E1 y/ T+ M% }, B7 x //now can access the APC register $ m% w2 B$ [6 R& n, b2 r4 p
, D' v9 W6 w7 F: Y) l% m
mov cl,reg
7 k& l. Z' C9 s& V- r1 A mov ax,0b10bh
. ~- F) W# t7 l1 x' | mov bx,10h: f* `' c' y4 u% V
mov di,48h
l' p% _/ J+ P6 @ int 1ah ;Restore |
|