home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / xerox / 8-mod.dzc / 16_8-MOD.DOC
Encoding:
Text File  |  1988-04-07  |  9.3 KB  |  327 lines

  1.    Date: February 27, 1988
  2.      To: Users of Xerox 820-II CP/M-80/86
  3.    From: Peter H. Haas
  4. Subject: CP/M-86 Generalized RAM Support
  5.  
  6. Xerox's 820-II implementation of CP/M-80/86 is innovative in
  7. that both CP/M-80 and CP/M-86 may execute simultaneously,
  8. although only one may have access to the console at any point
  9. in time.
  10.  
  11. This is somewhat like Concurrent CP/M-86's virtual console
  12. concept.  Whereas Xerox's CP/M-80/86 implementation uses two
  13. processors (a Z80 and an 8086) to support two virtual consoles,
  14. Concurrent CP/M-86 uses a single processor (an 8086 or com-
  15. patible) to support four (or more) virtual consoles by time-
  16. slicing.
  17.  
  18. Unfortunately Xerox's implementation of CP/M-86 is not general
  19. in that only 128k and 256k of RAM are supported.  In fact, if
  20. exactly 128k or 256k of error-free RAM is not present, the system
  21. will assume exactly 128k of RAM is available (whether or not
  22. this RAM is error-free).
  23.  
  24. A hardware modification providing 512k of RAM on the 16/8 CPU
  25. board has been developed and is available now.  Hardware
  26. modifications providing 640k or 1024k of RAM on the 16/8 CPU
  27. board are under development and may be available in the near
  28. future.
  29.  
  30. A software modification has been developed which generalizes
  31. Xerox's CP/M-86 RAM support.  This modification and procedure
  32. for its installation given below provides Xerox's CP/M-86 with
  33. generalized RAM support, including support for 512k, 640k, and
  34. 1024k of RAM.  The modification replaces the entire INIT
  35. function of the Xerox CP/M-86 BIOS.
  36.  
  37. The INIT function provided by Xerox establishes a screen
  38. management area in the last 1000h bytes of the first 128k of
  39. RAM.  With 256k of RAM (or more), two regions are created,
  40. one which begins at the end of the CP/M-86 system image and
  41. ends at 1f000h, and the other which begins at 20000h and ends
  42. at the end of RAM.  This modification also eliminates this
  43. fragmentation by moving the screen management area to the end
  44. of RAM.
  45.  
  46. Before the modification can be installed, a backup copy of
  47. CPM86.COM is made.  The size of this copy is larger in order
  48. to accomodate the modification.
  49.  
  50. 1) Boot CP/M-80, load DDT and read CPM86.COM.
  51.  
  52.    A>DDT
  53.    DDT VERS 2.2
  54.    -ICPM86.COM
  55.    -R
  56.    NEXT  PC
  57.    3C00 0100
  58.  
  59. 2) Exit DDT.  Note that "<^C>" means the CTRL-C key.
  60.  
  61.    -<^C>
  62.  
  63. 3) Save NEWCPM86.COM.  Note that while CPM86.COM is 59 pages
  64.    in length, NEWCPM86.COM is 60 pages in length.  This is
  65.    necessary to accomodate the modification.
  66.  
  67.    A>SAVE 60 NEWCPM86.COM
  68.  
  69. To install the modification, execute the following steps:
  70.  
  71. 1) Boot CP/M-86, load DDT86, and read NEWCPM86.COM.
  72.  
  73.    Note that if the system has exactly 128k of RAM, the
  74.    signon message will state "128k", otherwise the signon
  75.    message will state "xxxk".
  76.  
  77.    a>DDT86
  78.    DDT86 1.1
  79.    -RNEWCPM86.COM
  80.      START      END
  81.    035C:0000 035C:3BFF
  82.  
  83. 2) Display the DRI copyright notice.  The copyright notice is
  84.    contained in the first page of the CCP which is at offset
  85.    0d00h from the beginning of CPM86.COM.  On a 128k system
  86.    the segment will be 035ch.  On a 256k or larger system the
  87.    segment will be 2000h.  In the these instructions, a 128k
  88.    system is assumed.
  89.  
  90.    -D035C:0D00
  91.  
  92.    Modify an internal table which CPM86.COM uses to write the
  93.    CP/M-86 system image into 8086 RAM.  This is necessary as
  94.    the modification to be made increases the size of the
  95.    system image.
  96.  
  97.    -S035C:0C81
  98.    035C:0C81 DF E2
  99.    035C:0C82 02 .
  100.    -S035C:0C85
  101.    035C:0C85 DF E2
  102.    035C:0C86 02 .
  103.  
  104. 3) Compute a new segment such that the CCP is at offset 0000h.
  105.    00d0h is added to the old segment.
  106.  
  107.    -H035C:00D0
  108.    042C 028C
  109.  
  110. 4) Verify that the DRI copyright notice is as displayed above.
  111.    If not, you've made a finger check, so start over.
  112.  
  113.    -D042C:0000
  114.  
  115. 5) Move the signon message out of the modification area.  It
  116.    will be moved back later.  Fill the modification area with
  117.    00h.
  118.  
  119.    -M042C:2DA5,2DD3,042C:2F00
  120.    -F042C:2D40,2EFF,00
  121.  
  122. 6) Assemble the modification.
  123.  
  124.    -A042C:2D40
  125.    042C:2D40 MOV AX,CS
  126.    042C:2D42 MOV SS,AX
  127.    042C:2D44 MOV SP,3180
  128.    042C:2D47 MOV AX,F400
  129.    042C:2D4A MOV DS,AX
  130.    042C:2D4C MOV WORD [C380],0B06
  131.    042C:2D52 MOV [C382],CS
  132.    042C:2D56 MOV WORD [C38C],2708
  133.    042C:2D5C MOV [C38E],CS
  134.    042C:2D60 MOV BX,[46BC]
  135.    042C:2D64 MOV BX,04[BX]
  136.    042C:2D67 CMP BX,2000
  137.    042C:2D6B JZ 2DBC
  138.    042C:2D6D MOV AX,BX
  139.    042C:2D6F DEC AH
  140.    042C:2D71 MOV DX,AX
  141.    042C:2D73 SUB AX,CS: [2C01]
  142.    042C:2D78 MOV CS: [2C03],AX
  143.    042C:2D7C MOV AX,DX
  144.    042C:2D7E MOV [46E6],AX
  145.    042C:2D81 MOV [4748],AX
  146.    042C:2D84 MOV [4750],AX
  147.    042C:2D87 MOV [4762],AX
  148.    042C:2D8A MOV [476A],AX
  149.    042C:2D8D ADD AX,00C0
  150.    042C:2D90 MOV [47FC],AX
  151.    042C:2D93 MOV [C2C2],AX
  152.    042C:2D96 MOV [C2C6],AX
  153.    042C:2D99 MOV [C2CA],AX
  154.    042C:2D9C MOV [C2CE],AX
  155.    042C:2D9F MOV AX,1F00
  156.    042C:2DA2 MOV DS,AX
  157.    042C:2DA4 CMP AX,DX
  158.    042C:2DA6 JB 2DAD
  159.    042C:2DA8 XOR AX,AX
  160.    042C:2DAA CLD
  161.    042C:2DAB JMPS 2DB1
  162.    042C:2DAD MOV AX,FFF
  163.    042C:2DB0 STD
  164.    042C:2DB1 MOV SI,AX
  165.    042C:2DB3 MOV ES,DX
  166.    042C:2DB5 MOV DI,AX
  167.    042C:2DB7 MOV CX,800
  168.    042C:2DBA REP MOVSW
  169.    042C:2DBC MOV AX,CS
  170.    042C:2DBE MOV DS,AX
  171.    042C:2DC0 MOV AX,BX
  172.    042C:2DC2 MOV CL,06
  173.    042C:2DC4 SHR AX,CL
  174.    042C:2DC6 MOV CL,64
  175.    042C:2DC8 DIV CL
  176.    042C:2DCA ADD AL,30
  177.    042C:2DCC MOV [2DFE],AL
  178.    042C:2DCF MOV AL,AH
  179.    042C:2DD1 CBW
  180.    042C:2DD2 MOV CL,0A
  181.    042C:2DD4 DIV CL
  182.    042C:2DD6 ADD AX,3030
  183.    042C:2DD9 MOV [2DFF],AX
  184.    042C:2DDC MOV BL,20
  185.    042C:2DDE MOV DX,31C0
  186.    042C:2DE1 INT B2
  187.    042C:2DE3 STI
  188.    042C:2DE4 MOV BX,2DEF
  189.    042C:2DE7 CALL 2D30
  190.    042C:2DEA XOR CL,CL
  191.    042C:2DEC JMP 0000
  192.    042C:2DEF
  193.  
  194. 7) Move signon message back.
  195.  
  196.    -M042C:2F00,2F2E,042C:2DEF
  197.  
  198. 8) Write NEWCPM86.COM to disk.
  199.  
  200.    -WNEWCPM86.COM
  201.  
  202. 9) Exit DDT86.
  203.  
  204.    -<^C>
  205.  
  206. To install the modification, a series of REName operations is
  207. performed.  Either CP/M-80 or CP/M-86 may be used.  The follow-
  208. ing assumes CP/M-86 is being used.
  209.  
  210. 1) Rename CPM86.COM to OLDCPM86.COM.  This creates a backup
  211.    copy of CPM86.COM without the modification.
  212.  
  213.    a>REN OLDCPM86.COM=CPM86.COM
  214.  
  215. 2) Rename NEWCPM86.COM to CPM86.COM.  This creates an executable
  216.    copy of CPM86.COM with the modification.  The patch will
  217.    become active at the next boot of CP/M-86.
  218.  
  219.    a>REN CPM86.COM=NEWCPM86.COM
  220.  
  221. To verify that the modified version of CPM86.COM is correctly
  222. installed, execute the following steps:
  223.  
  224. 1) Reboot CP/M-86 and load DDT86.
  225.  
  226.    Note that if the system has exactly 128k of RAM, the signon
  227.    message will state "128k", otherwise the signon message will
  228.    state exactly how much RAM is available.
  229.  
  230.    a>DDT86
  231.    DDT86 1.1
  232.  
  233. 2) List the modification in its actual location in the CP/M-86
  234.    system segment.  The CP/M-86 system segment is 0040h.  Note
  235.    that after system initialization the CP/M-86 BIOS uses 2d40h
  236.    through 2d55h as a scratch area so only 0040:2D56 through
  237.    0040:2DEE are listed.
  238.  
  239.    -L0040:2D56,2DEC
  240.    0040:2D56 MOV    WORD [C38C],2708
  241.    0040:2D5C MOV    [C38E],CS
  242.    0040:2D60 MOV    BX,[46BC]
  243.    0040:2D64 MOV    BX,04[BX]
  244.    0040:2D67 CMP    BX,2000
  245.    0040:2D6B JZ     2DBC
  246.    0040:2D6D MOV    AX,BX
  247.    0040:2D6F DEC    AH
  248.    0040:2D71 MOV    DX,AX
  249.    0040:2D73 CS:    SUB    AX,[2C01]
  250.    0040:2D78 CS:    MOV    [2C03],AX
  251.    0040:2D7C MOV    AX,DX
  252.    0040:2D7E MOV    [46E6],AX
  253.    0040:2D81 MOV    [4748],AX
  254.    0040:2D84 MOV    [4750],AX
  255.    0040:2D87 MOV    [4762],AX
  256.    0040:2D8A MOV    [476A],AX
  257.    0040:2D8D ADD    AX,00C0
  258.    0040:2D90 MOV    [47FC],AX
  259.    0040:2D93 MOV    [C2C2],AX
  260.    0040:2D96 MOV    [C2C6],AX
  261.    0040:2D99 MOV    [C2CA],AX
  262.    0040:2D9C MOV    [C2CE],AX
  263.    0040:2D9F MOV    AX,1F00
  264.    0040:2DA2 MOV    DS,AX
  265.    0040:2DA4 CMP    AX,DX
  266.    0040:2DA6 JB     2DAD
  267.    0040:2DA8 XOR    AX,AX
  268.    0040:2DAA CLD
  269.    0040:2DAB JMPS   2DB1
  270.    0040:2DAD MOV    AX,0FFF
  271.    0040:2DB0 STD
  272.    0040:2DB1 MOV    SI,AX
  273.    0040:2DB3 MOV    ES,DX
  274.    0040:2DB5 MOV    DI,AX
  275.    0040:2DB7 MOV    CX,0800
  276.    0040:2DBA REP    MOVSW
  277.    0040:2DBC MOV    AX,CS
  278.    0040:2DBE MOV    DS,AX
  279.    0040:2DC0 MOV    AX,BX
  280.    0040:2DC2 MOV    CL,06
  281.    0040:2DC4 SHR    AX,CL
  282.    0040:2DC6 MOV    CL,64
  283.    0040:2DC8 DIV    CL
  284.    0040:2DCA ADD    AL,30
  285.    0040:2DCC MOV    [2DFE],AL
  286.    0040:2DCF MOV    AL,AH
  287.    0040:2DD1 CBW
  288.    0040:2DD2 MOV    CL,0A
  289.    0040:2DD4 DIV    CL
  290.    0040:2DD6 ADD    AX,3030
  291.    0040:2DD9 MOV    [2DFF],AX
  292.    0040:2DDC MOV    BL,20
  293.    0040:2DDE MOV    DX,31C0
  294.    0040:2DE1 INT    B2
  295.    0040:2DE3 STI
  296.    0040:2DE4 MOV    BX,2DEF
  297.    0040:2DE7 CALL   2D30
  298.    0040:2DEA XOR    CL,CL
  299.    0040:2DEC JMP    0000
  300.  
  301. 3) Exit DDT86.
  302.  
  303.    -<^C>
  304.  
  305. If all of the above steps have been executed correctly, then
  306. the modification installation procedure is complete.
  307.  
  308. If there are any problems, then the modification should be
  309. backed-out.  To back-out the modification, execute the follow-
  310. ing steps:
  311.  
  312. 1) Reboot CP/M-80.
  313.  
  314. 2) Rename CPM86.COM to NEWCPM86.COM.
  315.  
  316.    A>REN NEWCPM86.COM=CPM86.COM
  317.  
  318. 3) Rename OLDCPM86.COM to CPM86.COM.
  319.  
  320.    A>REN CPM86.COM=OLDCPM86.COM
  321.  
  322. CPM86.COM has now been restored to its unmodified state.
  323.  
  324. Peter H. Haas
  325. Santa Cruz, California
  326.  
  327.