|
|
发表于 2008-7-21 13:02:13
|
显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
: l' b; Y+ E/ ?; U; f: t请用下面这段代码来试试+ v+ w7 x; N; R" q! c/ L0 r" S
reg:BYTE' R3 D5 _7 D* w' ?2 f: i
mov ax,0b108h2 D! @1 N H/ ]0 Q+ ^! ^# \
mov bx,10h" M+ _5 H; a. f& x) r: K7 ]
mov di,48h
& H f$ b t: H. U int 1ah
( l9 x# u, }# ?6 G' X mov reg,cl ;get RTC Control Register
1 g4 s4 m& \5 X) q$ Y 6 E5 u7 a8 U' }
mov cl,reg9 ^( }3 {8 R1 K, H7 m
and cl,3fh" x- J$ ?4 d3 K; _9 x/ Z
or cl,40h ;set APCREG_EN
5 G/ a2 K4 ^6 S9 v5 Z mov ax,0b10bh' T7 {9 S( z, v4 s
mov bx,10h
$ Q3 l8 j& X8 g mov di,48h
. E6 d# h9 U$ c; T- B: b int 1ah
( n/ S' s/ v5 W9 Y //now can access the APC register
2 L+ h* u7 z5 ]' N- D . b) n1 n3 {4 }) c0 Y
mov cl,reg% d+ Y& r; X. p( e6 \
mov ax,0b10bh
, X+ V& `) Z) J* c- ~ mov bx,10h
" \% M* h, p% G: x6 h mov di,48h0 K0 T7 W" n: P& B
int 1ah ;Restore |
|