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

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