home *** CD-ROM | disk | FTP | other *** search
/ Frostbyte's 1980s DOS Shareware Collection / floppyshareware.zip / floppyshareware / USCX / DOSUT-08.ZIP / MEM640.DOC < prev    next >
Text File  |  1983-12-11  |  7KB  |  222 lines

  1. 
  2.  
  3.  
  4.                             640K Memory Size Support
  5.  
  6.                         A Modification to PC-DOS 2.0 BIOS
  7.  
  8.                                       By
  9.                                 John A. Chapman
  10.                                CIS [70205,1217]
  11.  
  12.                               844 S. Madison St.
  13.                            Hinsdale, Illinois  60521
  14.  
  15.   Machine Configuration
  16.  
  17.   This  modification  applies ONLY to those machines which  have  installed
  18.   more  than 544K byte of contiguous main storage,  AND DO NOT HAVE THE NEW
  19.   BIOS  CHIP.  The  new BIOS chip IBM supplies,  both  with  the  expansion
  20.   interface  and new 256K motherboard PC's already supports 640K of memory.
  21.   Please note that attempts to use this modification on machines with  less
  22.   than 608K storage may cause the system to fail.
  23.  
  24.   Limitation and Disclaimer
  25.   Since  this modification alters the behavior of BIOS in a static fashion,
  26.   use  of  the modified system is thereafter LIMITED to machines  WITH  THE
  27.   SAME MEMORY SIZE, since there is no dynamic size determination capability
  28.   in this version of the mod.
  29.  
  30.   THIS MODIFICATION IS SUPPLIED ON AN AS-IS BASIS. EACH USER MUST DETERMINE
  31.   THE FITNESS AND APPLICABILITY OF THIS CHANGE FOR THE SPECIFIC ENVIRONMENT
  32.   IN  WHICH  IT  WILL BE INSTALLED.   THE AUTHOR ASSUMES NO  LIABILITY  FOR
  33.   FAILURE  OR  DAMAGE  CAUSED  BY  THIS  MODIFICATION.
  34.  
  35.   This  modification  is  in  use  on the  author's  system,  which  is  an
  36.   "original"  PC  (the old 16K mother board with the OLD bios  chip)  which
  37.   has the following equipment installed on it:
  38.  
  39.              Vista MAXI-RAM     (576K memory board)
  40.              ABM OMNI-Board     (Clock 2-serial, 1-parallel, game adapter)
  41.              IBM Disk Controller (2 TEAC FD-55B's 1 Tandon 101-4)
  42.              IBM Color Graphics Adapter
  43.  
  44.   This  modification  works on the configuration described  above.  If  you
  45.   report a bug,  please include a description of the configuration on which
  46.   the  bug  was encountered.   No known bugs exist in this version  of  the
  47.   modification,  which has been in use since DOS 2.0 was released.   Please
  48.   report any bugs you find to the author, at the address shown above.
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.                                        1
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.   Overview
  72.  
  73.   Older  PC's are limited by the BIOS code and switch setting  support  (in
  74.   the  ROM  BIOS chip) to 544K.  It is possible to add 576K to the machine,
  75.   giving a total memory of 640K, or even 704K, if you don't have, and don't
  76.   need  the monochrome display.   To access this memory it is necessary  to
  77.   have it recognized at BOOT time.   DOS 2.0 maintains pointers to the  top
  78.   of memory which are set at initialization.  This modification to the INIT
  79.   routine of DOS 2.0 BIOS,  initializes the memorsize field in low memory
  80.   to 640K, and leaves a "footprint" similar to the one left by the keyboard
  81.   routine when ALT-CTRL-DEL sequence is detected.
  82.  
  83.   The code added to BIOS does three things:
  84.  
  85.             1) Checks for the "footprint" and skips all MEM640 processing
  86.                if the footprint is present (We've been here before) -
  87.                This prevents conflict with RAMDRIVE software that causes
  88.                a "warm" re-boot to alter memory size, to allocate memory
  89.                for the ramdrive.
  90.  
  91.             2) Modifies the memory locations containing memory size and
  92.                I/O-bus memory size, in the system data segment at X'40'
  93.  
  94.             3) Clears the memory above 544K to zeros.
  95.  
  96.   Installing the Modification
  97.  
  98.   To use this modification on a 640K machine, simply run the DEBUG script
  99.   contained in the file MEM640.ZAP, as follows:
  100.  
  101.         a) B: drive must contain the DOS 2.0 formatted disk to be modified
  102.         b) A: drive must contain the DEBUG command, and the file MEM640.ZAP
  103.  
  104.   When the disks are in the correct drives, the command:
  105.  
  106.               a:debug <b:MEM640.ZAP
  107.  
  108.   will  invoke  the DEBUG script supplied.  A listing of the actions  taken
  109.   will  display on the screen,  and eventually the DOS prompt will  return.
  110.   After the script has run,  the newly modified diskette should be  booted,
  111.   to  assure  that the modification was correctly  installed.   The  CHKDSK
  112.   command can be used to verify that the additional memory is accessable.
  113.  
  114.   The  code  sequences to support greater that 544K are simple and  static.
  115.   The code should be easy to understand,  and easy to modify.  A listing of
  116.   the debug script, with the comments and indications of where changes must
  117.   be  made to support other memory sizes,  is included as Attachment  I  to
  118.   this document.
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                        2
  130.  
  131.  
  132.  
  133.   ATTACHMENT I: The DEBUG Script
  134.  
  135.  
  136.  
  137.   l100,1,5,1              <======== First line of script
  138.   e10b,20
  139.   w100,1,5,1
  140.   nb:ibmbio.com
  141.   l
  142.   r                       <==== Action of script begins here
  143.   R CX
  144.   1230                    <== change length of BIOS before rewriting
  145.   A12d0,12ff              <== Begin assembly entry of mod
  146.   PUSH    AX
  147.   PUSH    ES
  148.   PUSH    DI
  149.   XOR     AX,AX
  150.   MOV     ES,AX
  151.   MOV     DI,0472          Change the two values pointed to below if
  152.   MOV     AX,4321           you wish to support a memory size between
  153.   ES:                       544 and 640.
  154.   CMP     AX,[DI]
  155.   JZ      12F7
  156.   MOV     DI,0413
  157.   MOV     AX,0280         <-- TOTAL MEMORY SIZE IN HEX        <<CHANGE>>
  158.   STOSW
  159.   MOV     AX,0240        <-- I/O bus Memory  (Total - 64K)    <<CHANGE>>
  160.   STOSW
  161.   CALL    1300           <-- invoke memory clear routine to prevent
  162.   MOV     DI,0472            parity checks on read references to memory
  163.   MOV     AX,4321        <-- OUR FOOTPRINT !!!
  164.   STOSW
  165.   POP     DI
  166.   POP     ES
  167.   POP     AX
  168.   MOV     AL,02
  169.   STOSB
  170.   JMP     08DC             <-- Jump back to BIOS init code
  171.   PUSH    CX   <===========Routine to clear ememory above 544K
  172.   PUSH    DX                (If you have less than 640K you don't have
  173.   PUSH    SI                 to change this routine, but If you have
  174.   MOV     DX,8800            704K or 768K, start and length values
  175.   MOV     AH,03              must be changed.
  176.   MOV     AL,00
  177.   MOV     ES,DX
  178.   MOV     CX,8000
  179.   SUB     DI,DI
  180.   REPZ
  181.   STOSB
  182.   ADD     DX,0800
  183.   DEC     AH
  184.   JNZ     130A
  185.   XOR     AX,AX
  186.   MOV     ES,AX
  187.   POP     SI
  188.   POP     DX
  189.   POP     CX
  190.   RET
  191.   NOP                    [[[ Continued on next Page ]]]
  192.  
  193.  
  194.                                        3
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.   ATTACHMENT I: The DEBUG Script
  202.  
  203.  
  204.   NOP
  205.   NOP
  206.   NOP       <======= This section pads out the MOD to an even boundary
  207.   NOP
  208.   NOP
  209.  
  210.   E,3E7,B0,00
  211.   A8D9
  212.   JMP     12D0       <====== Jump to the additional INIT code
  213.  
  214.   W
  215.   l100,1,5,1
  216.   e10b,27            <====== This sequence resets IBMBIO.COM to Hidden
  217.   w100,1,5,1                 and System attributes, updating the directory
  218.   Q
  219.  
  220.  
  221.  
  222.