home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / UTILITY / SYSTEM / A20OFF.ZIP / A20OFF.ASM next >
Encoding:
Assembly Source File  |  1990-11-20  |  2.8 KB  |  80 lines

  1. .SEQ
  2. Name    A20OFF
  3. Page    51,132
  4. Title   A20OFF.ASM
  5.  
  6. Comment |
  7. Author  BF Gavin, Online Reference BBS
  8. Format  Standard .COM file format.
  9. Intent  Disable CS8221 NEAT ChipSet RB12 Bit 1, A20 address line control.
  10.         TPCXINST will fail if it finds the A20 line enabled.
  11.  
  12. Usage   No command line parms required.
  13. Origin  20NOV90  v1.00
  14.  
  15. Remark  Reg 6F (RB12, A20 address line) and Reg 60 (RA0, Processor Reset)
  16.         are a feature of the NEAT ChipSet.  They provide a fast means of
  17.         switching the 80286 in and out of protected mode.
  18.  
  19.         OS/2 makes frequent operating system calls that must be executed
  20.         in Real mode.  To perform these calls, the CPU typically must issue
  21.         two commands to the 8042 (or equivalent) keyboard controller
  22.         to enter protected mode and enable the A20 address line.
  23.  
  24.         Reg 60 provides a processor reset, and Reg 6F controls the A20
  25.         address line control.  Because these registers are controlled by
  26.         direct I/O port writes, instead of software interrupts, they
  27.         execute very quickly.
  28.  
  29.         This utility is intended to execute from the AUTOEXEC.BAT file
  30.         when the system is started.
  31.  
  32.                |
  33.  
  34.                 Assume  CS:Code_Segment
  35.                 Assume  SS:Code_Segment
  36.  
  37.  
  38.  
  39. Code_Segment    Segment Para    Public  'CODE'
  40.                 Org     100h
  41.  
  42. Main_Line       Proc    Near
  43. ; Get RB12 Misc Register contents
  44.         Mov     DX,22h                          ; RB12 index register
  45.         Mov     AL,6Fh                          ; Set it to port 6Fh
  46.         Out     DX,AL                           ; Enable the index register
  47.         In      AL,23h                          ; Read RB12 register
  48.  
  49. ; Set RB12 Bit(1) to disable A20 address line
  50.         Mov     AH,AL                           ; Save RB12 contents in AH
  51.         Mov     DX,22h                          ; RB12 index register
  52.         Mov     AL,6Fh                          ; Set RB12 port 6Fh
  53.         Out     DX,AL                           ; Enable write to RB12
  54.         Mov     AL,AH                           ; Original RB12 contents to AL
  55.         Or      AL,02h                          ; Bit(1)=0 sets A20 = zero
  56. ; ***   AND     AL,0FDh                         ; Bit(1)=1 enables A20 line
  57.         Out     23h,AL                          ; Write RB12 data register
  58.  
  59.   Exit:
  60.         Mov     AX,4C00h                        ; Return code = 0
  61.         Int     21h                             ; Call DOS
  62. Main_Line       Endp
  63.  
  64. Code_Segment    Ends                            ; End of code Segment
  65.  
  66.  
  67.  
  68.  
  69. Comment |
  70. Stack_Segment   Segment Para    Stack   'Stack'
  71.         Dw      128 dup (?)                     ; 128 words of stack space
  72. Stack_Segment   Ends
  73.         |
  74.  
  75.  
  76.  
  77.  
  78. End             Main_Line                       ; Program entry point
  79.  
  80.