|
|
发表于 2008-7-21 13:02:13
|
显示全部楼层
你确认访问的位置是Bus0:Device2:Function0的Reg48h吗?
. B$ e$ D0 S- {( [2 U" y% {5 x9 }8 ?) K+ Z请用下面这段代码来试试
6 d2 q- B& y; o' f; e! x3 d7 j: k reg:BYTE: [- r' Y0 G# v: D! I0 G2 b
mov ax,0b108h
6 N6 ~+ _' L1 R- a; I' t- I2 { U mov bx,10h
! c8 y6 J2 L5 R: m mov di,48h M: y. R% O8 d$ [
int 1ah
1 ^: ~: l+ a @( J mov reg,cl ;get RTC Control Register
$ X5 D6 ?) C, T/ d . A% r; p4 b1 O: T* O4 k# ^
mov cl,reg" C$ M `9 ^4 S& N6 n4 E
and cl,3fh$ e4 @6 K* F/ a4 r( |& C
or cl,40h ;set APCREG_EN
( a1 c+ F6 s# x& |# L4 L0 c" } mov ax,0b10bh
" b$ B* Z) H- w& Y7 A mov bx,10h6 `9 ^* K [2 K# H% u* V7 f, q/ g7 u! m
mov di,48h+ O/ j5 C$ T1 n- U$ ]
int 1ah
! j. H* B* m) O) i! B //now can access the APC register
# ~7 n! {; ~9 R, L. K " _2 i) |. B. R1 u2 Y
mov cl,reg
0 O! y3 D) A; Q) @/ @# n mov ax,0b10bh2 t5 b. m& M$ g' d3 n3 @6 m1 \8 s
mov bx,10h
/ I( D8 c5 n+ `' D! a( ~! { mov di,48h
) \1 b5 M/ V9 |3 |$ j! l0 [ int 1ah ;Restore |
|