A20? 
Author Message
 A20?

Hi , please tell me is it get into protected mode is the only one way to get
A20 line on?
If i am in real mode of 386 , i move something into the eax register , the
upper 16bit of eax will always keep to zero whatevere you move in,right?

thanks a lot



Tue, 09 Jul 2002 03:00:00 GMT  
 A20?

Quote:
> Hi , please tell me is it get into protected mode is the only one way to
get
> A20 line on?

Himem.sys automatically enable A20line (but it can also close it!)
........
;------------------------------
IOdelay  macro
         out 0EDh,ax                 ;; about 1uS delay
         endm
;------------------------------
;=========================================================================
; word enableA20() On Error: ax=2
_enableA20  proc C
            uses cx
        pushf         ; save interrupt status
        cli           ; disable ints while using 8042
        call A20wait
        jnz short A20Fail  ; ret: 8042 unable to accept cmd
        mov al,0D1h   ; 8042 cmd to write output port
        out 64h,al    ; output cmd to 8042
        call A20wait
        jnz short A20Fail
        mov al,0DFh   ; 8042 port data
        out 60h,al    ; output port data to 8042
        call A20wait
        jnz short A20Fail
        mov al,0FFh
        out 64h,al
        call A20wait
A20Fail: popf
         xor ah,ah
         ret
_enableA20  endp
; insure 8042 input buffer empty:
A20wait: xor cx,cx
tryKBC:  IOdelay
         in al,64h
         and al,2
         loopnz    tryKBC
         IOdelay
         ret
;==========================================================================

Quote:
> If i am in real mode of 386 , i move something into the eax register , the
> upper 16bit of eax will always keep to zero whatevere you move in,right?

Wrong.

--
  Ivar,  (c)RMSoft.

  http://my.tele2.ee/rmsoft



Tue, 09 Jul 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. A20 ok ?

2. A20 setup

3. standard A20

4. A20 and A21

5. A20???

6. A20 Line - Correct Way To Enable?

7. Problem:A20 open 8042 delay by time

8. Detecting the status of the A20 line.

9. A20, 8259,IDT help.

10. enabling the A20 line?

11. A20 gate on the 386

12. A20 gate/port

 

 
Powered by phpBB® Forum Software