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

  1.                 Assume  CS:Code_Segment
  2.                 Assume  SS:Code_Segment
  3.  
  4. Code_Segment    Segment Para    Public  'CODE'
  5.                 Org     100h
  6.  
  7. Main_Line       Proc    Near
  8. ; Get RB12 Misc Register contents
  9.         Mov     DX,22h                          ; RB12 index register
  10.         Mov     AL,6Fh                          ; Set it to port 6Fh
  11.         Out     DX,AL                           ; Enable the index register
  12.         In      AL,23h                          ; Read RB12 register
  13.  
  14. ; Set RB12 Bit(1) to disable A20 address line
  15.         Mov     AH,AL                           ; Save RB12 contents in AH
  16.         Mov     DX,22h                          ; RB12 index register
  17.         Mov     AL,6Fh                          ; Set RB12 port 6Fh
  18.         Out     DX,AL                           ; Enable write to RB12
  19.         Mov     AL,AH                           ; Original RB12 contents to AL
  20. ; ***   Or      AL,02h                          ; Bit(1)=0 sets A20 = zero
  21.         AND     AL,0FDh                         ; Bit(1)=1 enables A20 line
  22.         Out     23h,AL                          ; Write RB12 data register
  23.  
  24.   Exit:
  25.         Mov     AX,4C00h                        ; Return code = 0
  26.         Int     21h                             ; Call DOS
  27. Main_Line       Endp
  28.  
  29. Code_Segment    Ends                            ; End of code Segment
  30.  
  31.  
  32.  
  33.  
  34. Comment |
  35. Stack_Segment   Segment Para    Stack   'Stack'
  36.         Dw      128 dup (?)                     ; 128 words of stack space
  37. Stack_Segment   Ends
  38.         |
  39.  
  40.  
  41.  
  42.  
  43. End             Main_Line                       ; Program entry point
  44.  
  45.