home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / enterprs / cpm / utils / a / cpm30.arc / CPM30.PAT < prev    next >
Encoding:
Text File  |  1991-10-05  |  30.3 KB  |  866 lines

  1. d
  2.                   -^c
  3.  
  4.  
  5.                Licensed users are granted the right to include  these  changes 
  6.           in CP/M-86 V1.1 software.
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.           All Information Presented Here is Proprietary to Digital Research
  56.  
  57.                                           2
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.                                      CP/M 86   V1.1
  65.                                 Patch 10, BDOS, 5/20/82
  66.  
  67.                           Copyright   1982 by Digital Research
  68.                  CP/M-86 is a registered trademark of Digital Research.
  69.                  ASM-86 and DDT-86 are trademarks of Digital Research.
  70.  
  71.  
  72.           Program:  CPM.SYS and CPM.H86
  73.           Products and Serial Numbers Affected:  CP/M-86   V1.1  C86-000-00746 
  74.           through C86-000-01001
  75.  
  76.  
  77.           Error Description:
  78.  
  79.                CP/M-86 does not return an error indication code for an invalid 
  80.           function  code.  This  patch  forces the BDOS to return 0FFFFH in AX 
  81.           and BX if a function code is out of range.
  82.  
  83.  
  84.           Patch Procedure:
  85.  
  86.                To patch the CPM.H86 file, assemble the following program  stub 
  87.           with  ASM-86    and name it BADFUNC.H86.  Concatenate BADFUNC.H86 to 
  88.           the end of the CPM.H86 file using the PIP command:
  89.  
  90.                   A>PIP CPM.H86=CPM.H86,BADFUNC.H86
  91.  
  92.           The modified CPM.H86 file replaces the original.  You  can  use  the 
  93.           modified  CPM.H86  file with your CBIOS to build a system.  Refer to 
  94.           the  CP/M-86  Microcomputer  Control  Program   System   Guide   for 
  95.           information  on the organization of CPM.SYS.  Make a back-up copy of 
  96.           CPM.SYS and CPM.H86 before making the following changes:
  97.  
  98.  
  99.                   Title   'BAD FUNC NUMB 5/20/82'
  100.  
  101.                   ;
  102.                   ; This program patches CPM86 V1.1 so it returns an 0FFFFH
  103.                   ; in BX and AX.
  104.                   ;
  105.                           CSeg
  106.                           Org     0A50H
  107.                   Label_0:
  108.                           Jb      OK
  109.                           Mov     Word ptr .249bH, 0FFFFH
  110.                           Ret
  111.                   Ok:
  112.                           Jmp     Label_1
  113.  
  114.                           Org     0B94H
  115.                           Jmp     Label_0
  116.  
  117.                           Org     0B97H
  118.                   Label_1:
  119.  
  120.  
  121.           All Information Presented Here is Proprietary to Digital Research
  122.  
  123.                                           1
  124.  
  125.  
  126.  
  127.           CP/M-86 V1.1                                             Patch 10
  128.  
  129.  
  130.                           End
  131.  
  132.  
  133.                Or, you can patch the CPM.SYS file directly  using  DDT-86    .  
  134.           Make a back-up copy of CPM.SYS before making the following changes:
  135.  
  136.  
  137.                   A>ddt86
  138.                   DDT86 1.1
  139.  
  140.                    -rcpm.sys
  141.                       START      END
  142.                     NNNN:0000 NNNN:397f
  143.                    -s0ad0
  144.                     NNNN:0AD0 44 72
  145.                     NNNN:0AD1 65 07
  146.                     NNNN:0AD2 63 c7
  147.                     NNNN:0AD3 65 06
  148.                   NNNN:0AD4 6D 9b
  149.                     NNNN:0AD5 62 24
  150.                     NNNN:0AD6 65 ff
  151.                     NNNN:0AD7 72 ff
  152.                     NNNN:0AD8 20 c3
  153.                     NNNN:0AD9 32 e9
  154.                     NNNN:0ADA 38 3b
  155.                     NNNN:0ADB 20 01
  156.                     NNNN:0ADC 38 .
  157.                    -s0c14
  158.                     NNNN:0C14 72 e9
  159.                     NNNN:0C15 01 b9
  160.                     NNNN:0C16 C3 fe
  161.                     NNNN:0C17 8A .
  162.                    -wcpm.sys
  163.                   -^c
  164.  
  165.  
  166.                Licensed users are granted the right to include  these  changes 
  167.           in CP/M-86 V1.1 software.
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.           All Information Presented Here is Proprietary to Digital Research
  188.  
  189.                                           2
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.                                      CP/M-86   V1.1
  197.                                 Patch 11, BDOS, 5/20/82
  198.  
  199.                           Copyright   1982 by Digital Research
  200.                  CP/M-86 is a registered trademark of Digital Research.
  201.                  ASM-86 and DDT-86 are trademarks of Digital Research.
  202.  
  203.  
  204.           Program:  CPM.SYS and CPM.H86
  205.           Products and Serial Numbers Affected:  CP/M-86   V1.1  C86-000-00746 
  206.           through C86-000-01001
  207.  
  208.  
  209.           Error Description:
  210.  
  211.                If the system denies an absolute  memory  request,  the  system 
  212.           does not return an error-indication code.  This patch returns 0FFFFH 
  213.           in AX if the system denies a memory request.
  214.  
  215.  
  216.           Patch Procedure:
  217.  
  218.                To patch the CPM.H86 file, assemble the following program  stub 
  219.           using   ASM-86     and   name   the  file  PATCH11.A86.  Concatenate     
  220.           PATCH11.A86 to the end of the CPM.H86 file using the  following  PIP 
  221.           command:
  222.  
  223.                   A>PIP CPM.H86=CPM.H86,PATCH11.H86
  224.  
  225.           The modified CPM.H86 file replaces the original.  Use  CPM.H86  with 
  226.           your  CBIOS  to  build a system.  Refer to the CP/M-86 Microcomputer 
  227.           Control Program System Guide for information on the organization  of W 
  228.           the CPM.SYS file.
  229.  
  230.  
  231.               Title 'Patch11 5/20/82'
  232.  
  233.               Loaderr_loc Equ    0F1EH   ;Addr of load error routine
  234.               Load59_Ret  Equ    0F06H   ;Exit from load error routine
  235.               Pat_offset  Equ    0A30H   ;Patch area
  236.  
  237.               User_Parm_Seg       Equ    02323H  ;User's data segment
  238.               Aret                Equ    0249BH  ;Return value
  239.               Param_Seg   Equ    0249DH  ;User's data segment at entry
  240.  
  241.                   Cseg
  242.  
  243.                   Org     Pat_Offset
  244.  
  245.               Patch:
  246.                   Mov     Ax, .User_Parm_Seg
  247.                   Mov     .Param_seg, Ax
  248.                   Mov     Word ptr .Aret, 0FFFFH
  249.                       Jmp     loadret
  250.  
  251.  
  252.  
  253.           All Information Presented Here is Proprietary to Digital Research
  254.  
  255.                                           1
  256.  
  257.  
  258.  
  259.           CP/M-86 V1.1                                             Patch 11
  260.  
  261.  
  262.                   Org     Load59_ret
  263.               loadret:
  264.                   Org     Loaderr_loc
  265.                   Jmp     Patch
  266.  
  267.                   End
  268.  
  269.  
  270.                Or,  you  can  patch  your  CPM.SYS  file  directly  using  the 
  271.           following  DDT-86   commands.  Make a back-up copy of CPM.SYS before 
  272.           making the following changes:
  273.  
  274.  
  275.                   A>ddt86
  276.                     DDT86 1.1
  277.                    -rcpm.sys
  278.                       START      END
  279.                     NNNN:0000  NNNN:397F
  280.                    -sab0
  281.                     NNNN:0AB0 00 a1
  282.                     NNNN:0AB1 00 23
  283.                     NNNN:0AB2 00 23
  284.                     NNNN:0AB3 00 a3
  285.                     NNNN:0AB4 00 9d
  286.        
  287.  
  288.  
  289.                                      CP/M-86   V1.1
  290.                                Patch 12, SUBMIT, 5/24/82
  291.  
  292.                           Copyright   1982 by Digital Research
  293.                  CP/M-86 is a registered trademark of Digital Research.
  294.                        DDT-86 is a trademark of Digital Research.
  295.  
  296.  
  297.           Program:  SUBMIT.COM
  298.           Products and Serial Numbers Affected:  CP/M-86   V1.1  C86-000-00746      This patch modifies the SUBMIT utility to enable execution fromtch Procedure:
  299.  
  300.                Make a back-up copy of SUBMIT.COM before using DDT-86   to makees:
  301.  
  302.  
  303.                   A>ddt86
  304.                     DDT86 1.1
  305.                    -rsubmit.cmd
  306.                        START    END
  307.                     nnnn:0000 nnnn:0F7F
  308.                    -aa2
  309.                     nnnn:00A2 mov dl,ff     ;instruction was mov dx,00h
  310.                     nnnn:00A4 nop
  311.                     nnnn:00A5 .
  312.                    -wsubmit.cmd
  313.  
  314.  
  315.  
  316.  
  317.                                      CP/M-86   V1.1
  318.                                 Patch 13, BDOS, 06/08/82
  319.  
  320.                           Copyright   1982 by Digital Research
  321.                  CP/M-86 is a registered trademark of Digital Research.
  322.                  ASM-86 and DDT-86 are trademarks of Digital Research.
  323.  
  324.  
  325.           Program:  CPM.H86 and CPM.SYS
  326.           Products and Serial Numbers Affected:   CP/M-86    V1.1  0-000-00000
  327.  
  328.     An area of memory  can  be  overwritten  when  a  user  programram Load).
  329.  
  330.  
  331.           Patch Procedure:
  332.  
  333.                To patch the  CPM.H86  file,  type  the  program  stub  on  the
  334.          following  page into a file named PATCH13.A86.  Assemble PATCH13.A86 
  335.      Concatenate  PATCH13.H86  toIP CPM.H86=CPM.H86,PATCH13.H86
  336.  
  337.                The newly modified CPM.H86 file replaces the original  and  can 
  338.     used  with  your  CBIOS to build a system.  Refer to the CP/M-86
  339.     information  on  they modifications.
  340.  
  341.  
  342.                   Title   'PATCH13 6/8/82'
  343.                   ;
  344.                   ; An area of memory may be overwritten when a
  345.                   ; user program executes a Function 59 (program load).
  346.  
  347.                   Patch_Area      Equ     0A00H
  348.                   Bdos            Equ     00E0H
  349.  
  350.                           Cseg
  351.  
  352.                           Org     Patch_Area
  353.  
  354.                   Start_Patch:
  355.  
  356.                           Mov     Cs:byte ptr .2498H, 01
  357.  
  358.                           Push    Ax
  359.                           Mov     Ah, Cs:.2327H
  360.                           Mov     Al, Cs:.2313H
  361.                           Push    Ax
  362.                           Int     Bdos
  363.  
  364.                           Pop     Ax
  365.                           Mov     Cs:.2313H, Al
  366.                           Mov     Cs:.2327H, Ah
  367.                           Pop     Ax
  368.  
  369.                           Ret
  370.                           Nop
  371.  
  372.                           Org     0C42H
  373.  
  374.                           Jmp     Start_Patch
  375.  
  376.                           Nop
  377.                           Nop
  378.                           Nop
  379.                           Nop
  380.                           Nop
  381.                           Nop
  382.  
  383.                           End
  384.  
  385.  
  386.                Or, you can patch your CPM.SYS file directly using DDT-86 
  387.     using the following changes:
  388.  
  389.  
  390.                   A>ddt86
  391.                     DDT86 1.1
  392.                    -rcpm.sys
  393.                      START       END
  394.                     NNNN:0000   NNNN:397F
  395.                    -aa80
  396.                     NNNN:0A80 cs: mov byte [2498], 01
  397.                     NNNN:0A86 push ax
  398.                     NNNN:0A87 cs: mov ah, [2327]
  399.                     NNNN:0A8C cs: mov al, [2313]
  400.                     NNNN:0A90 push ax
  401.                     NNNN:0A91 int 0e0
  402.                     NNNN:0A93 pop ax
  403.                     NNNN:0A94 cs: mov [2313], al
  404.                     NNNN:0A98 cs: mov [2327], ah
  405.                     NNNN:0A9D pop ax
  406.                     NNNN:0A9E ret
  407.                     NNNN:0A9F nop
  408.                     NNNN:0AA0 .
  409.                    -acc2
  410.                     NNNN:0CC2 jmp 0A80
  411.                     NNNN:0CC5 nop
  412.                     NNNN:0CC6 nop
  413.                     NNNN:0CC7 nop
  414.                     NNNN:0CC8 nop
  415.                     NNNN:0CC9 nop
  416.                     NNNN:0CCA nop
  417.                     NNNN:0CCB .
  418.                    -wcpm.sys
  419.                    -^c
  420.  
  421.  
  422.                                      CP/M-86   V1.1
  423.                               Patch 14, TRACK.A86, 8/1/82
  424.  
  425.                           Copyright   1982 by Digital Research
  426.                  CP/M-86 is a registered trademark of Digital Research.
  427.                        ASM-86 is a trademark of Digital Research.
  428.                                  Compiled October 1982
  429.  
  430.  
  431.           Program:  TRACK.A86
  432.           Products and Serial Numbers Affected:  CP/M-86   V1.1  C86-000-007460
  433.  
  434.  
  435.           Error Description:
  436.  
  437.           Assembling TRACK.A86 produces a  syntax  error  because  of  an
  438.       improper ASM-86   directive.
  439.  
  440.  
  441.           Patch Procedure:
  442.  
  443.       Make a back-up copy of  TRACK.A86.   Install  this  patch  with
  444.                    : *#a <cr>
  445.                       1: *214:15t <cr>
  446.                     214:          dseg
  447.                     215:
  448.                     216:  cpm_disk        rb      1
  449.                     217:  cpm_track       rw      1
  450.                     218:  cpm_sec         rw      1
  451.                     219:
  452.                     220:  dma_longword    rd      1
  453.                     221:                  org     dma_longword
  454.                     222:  dma_offset      rw      1
  455.                     223:  dma_segment     rw      1
  456.                     224:
  457.                     225:  cur_disk        rb      1
  458.                     226:  cur_sec         rw      1
  459.                     227:  cur_track       rw      1
  460.                     228:  cur_dma         rw      1
  461.                     214: *220:2k <cr>
  462.                     220: *222:i <cr>
  463.                     222:  dma_longword    equ dword ptr dma_offset
  464.                     223: ^z <cr>
  465.                     224: *214:15t <cr>
  466.                     214:        dseg
  467.                     215:
  468.                     216:  cpm_disk        rb      1
  469.                     217:  cpm_track       rw      1
  470.                     218:  cpm_sec         rw      1
  471.                     219:  
  472.                     220:  dma_offset      rw      1
  473.                     221:  dma_segment     rw      1
  474.                     222:  dma_longword    equ dword ptr dma_offset
  475.                     223:
  476.                     224:  cur_disk        rb      1
  477.                     225:  cur_sec         rw      1
  478.                     226:  cur_track       rw      1
  479.                     227:  cur_dma         rw      1
  480.                     228:
  481.                     214: *e <cr>
  482.                   A>
  483.            
  484.  
  485.                                      CP/M-86   V1.1
  486.                                 Patch 15, BDOS, 11/19/82
  487.  
  488.                           Copyright   1982 by Digital Research
  489.                  CP/M-86 is a registered trademark of Digital Research.
  490.                        DDT-86 is a trademark of Digital Research.
  491.                                  Compiled December 1982
  492.  
  493.  
  494.           Program:  CPM.SYS, CPM.H86
  495.           Products and Serial Numbers Affected:  CP/M-86   V1.1  C86-000-00746scription:
  496.  
  497.           The BDOS does not load a file with  absolute  requirements  forRA or STACK segments.
  498.  
  499.  
  500.           Patch Procedure:
  501.  
  502.                Make a back-up copy of CPM.SYS before you use DDT-86   to  makeWm.sys
  503.                     START      END
  504.                   nnnn:0000  nnnn:xxxx             (note the value of nnnn)
  505.                   -hnnnn,8
  506.                   nnnn+8 nnnn-8                  (note the value of nnnn+8)
  507.  
  508.                   -xcs
  509.                   CS 0000 nnnn+8
  510.                   DS 0000 nnnn+8
  511.                   SS 0040 nnnn+8
  512.                   ES 0000 nnnn+8
  513.                   IP 0000 .
  514.                   -add4
  515.                   nnnn+8:0DD4 jmp 24e2
  516.                   nnnn+8:0DD7 .
  517.                   -a24e2
  518.                   nnnn+8:24E2 cmp word 03[si],0000
  519.                   nnnn+8:24E6 jz 24f2
  520.                   nnnn+8:24E8 push ax
  521.                   nnnn+8:24E9 mov ax,03[si]
  522.                   nnnn+8:24EC mov [22d4],ax
  523.                   nnnn+8:24EF pop ax
  524.                   nnnn+8:24FO jmps 24f5
  525.                   nnnn+8:24F2 mov [22d4],ax
  526.                   nnnn+8:24F5 jmp 0dd7
  527.                   nnnn+8:24F8 .
  528.                   -wcpm.sys
  529.                   -^C
  530.                   A>
  531.  
  532.                Or, you can assemble the following code file  (PATCH15.A86)  tooncatenate PATCH15.H86 to the end of theM.H86=CPM.H86,PATCH15.H86
  533.  
  534.                The newly modified CPM.H86 file replaces the original  and  can with your CBIOS to build a system.  Refer to Section 7.2 into study  theodifications.
  535.  
  536.  
  537.                   ;
  538.                   ;  The BDOS does not properly load a CMD file with absolute
  539.                   ;  load addresses specified in the header record for EXTRA
  540.                   ;  and/or STACK segments.
  541.  
  542.                   Patch_area          equ       24E2h
  543.                   Jmp_point           equ       0DD4h
  544.                   Patch_return        equ       0DD7h
  545.                   Pag0                equ       word ptr .22D4h
  546.                   Abs                 equ       word ptr 3
  547.  
  548.                            CSEG
  549.  
  550.                            org        jmp_point
  551.                            jmp        patch
  552.  
  553.                            CSEG
  554.  
  555.                            org        patch_return
  556.                   Patch_ret:
  557.  
  558.                            CSEG
  559.  
  560.                            org        patch_area
  561.                   Patch:
  562.                            cmp        abs[si],0 ! jz from_ax
  563.                            push       ax
  564.                            mov        ax,abs[si]
  565.                            mov        pag0,ax
  566.                            pop        ax
  567.                            jmps       end_patch
  568.                   From_ax:
  569.                            mov        pag0,ax
  570.                   End_patch:
  571.                            jmp        patch_ret
  572.  
  573.                            end
  574.  
  575.  
  576.         Licensed users are granted the right to include  these  changesed Here is Proprietary to Digital Research
  577.  
  578.  
  579. YY:1337 RCR     AL,1
  580.                     YYYY:1339 JNB     1375
  581.                     YYYY:133B MOV     BYTE [01E4],00
  582.                   -a132a
  583.                     YYYY:132a test byte [02b9],01
  584.                     YYYY:132f jz 1338
  585.                     YYYY:1331 call 13b6
  586.                     YYYY:1334 rcr al,1
  587.                     YYYY:1336 jnb 1375
  588.                     YYYY:1338 xor al,al
  589.  
  590.  
  591.  
  592.  
  593.  
  594.           All Information Presented Here is Proprietary to Digital Research
  595.  
  596.                                           1
  597.  
  598.  
  599.  
  600.           CP/M-86 V1.1                                             Patch 09
  601.  
  602.  
  603.                     YYYY:133a mov [0198],al
  604.                     YYYY:133d mov [01e4],al
  605.                     YYYY:1340 .
  606.                   -wpip.cm
  607.                        CP/M-86..V1.1 for the IBM..Displaywriter 
  608.                               Application Note 01, 9/1/83
  609.                             Nonstandard Printer Page Lengths
  610.  
  611.                        Copyright   1983 by Digital Research Inc.
  612.               CP/M-86 is a registered trademark of Digital Research Inc. 
  613.            IBM is a registered trademark of International Business Machines. 
  614.                                 Compiled September 1983
  615.  
  616.  
  617.           Program:  BIOS (Basic Input/Output System)
  618.  
  619.           Applicable  products  and  version  numbers:   CP/M-86   R1.1  (DW),
  620.           maintenance release 1.10
  621.  
  622.  
  623.           The SETUP.CMD program, distributed with CP/M-86 R1.1  for  the  IBM.
  624.           Displaywriter  (maintenance  release  1.10),  provides the user with
  625.           three alternative page length choices when  configuring  the  system
  626.           for  a specific IBM printer, paper-feed method, and paper length.  A
  627.           lengths of 0, 66, or 88 lines per page can be selected, a length  of
  628.           0 implying that the BIOS is to do no line counting.
  629.  
  630.           The file CPM.SYS may be altered  with  the following  procedure  to
  631.           allow  other  than  the  default  line  lengths.  Use DDT86.CMD, the
  632.           debugging program included with CP/M-86 DW, to  change  one  or  two
  633.           bytes in the file.  These bytes contain binary numbers corresponding
  634.           to the assumed number of lines per page when 66 lpp is  chosen  from
  635.           the SETUP menu, or 88 lpp is selected.  Before proceeding, determine
  636.           the values other than 66 or 88 you would like  to  set  and  convert
  637.           that  number  to  a 2-digit hexadecimal value.  For instance, a page
  638.           length of 58 lines would convert to 3A in the hexadecimal  base.   A
  639.           page length of 64 equals 40 hex.
  640.  
  641.           The following example below changes the 66 lpp option to 58.  The 88
  642.           lpp setting is chosen to remain at 88.  The address corresponding to
  643.           the 66-lpp byte is 4640 (hex) and the address corresponding  to  the
  644.           88-lpp byte is 4641 (hex).  Make sure you have an unmodified back-up
  645.           copy of CPM.SYS  before  executing  the  following  commands.   User
  646.           entries are in bold type, and comments follow semicolons.  The files
  647.           CPM.SYS, DDT86.CMD, and STAT.CMD must be present on the diskette  in
  648.           drive  A.  Replace  the  3A  and  58  entries  with your chosen page
  649.           lengths.
  650.  
  651.  
  652.           A>stat cpm.sys rw
  653.  
  654.           A:CPM     .SYS set to Read Write (RW)
  655.           A>ddt86
  656.           DDT86 1.1
  657.           -rcpm.sys
  658.             START      END
  659.           xxxx:yyyy xxxx:zzzz          ;these 4-digit numbers will vary
  660.           -s4640
  661.           xxxx:4640 42 3a              ;4640 is the address for 66 lpp
  662.           xxxx:4641 58 58              ;4641 is the address for 88 lpp
  663.           xxxx:4642 DC .               ;a period exits from s mode
  664.           -wcpm.sys                    ;overwrite the old file with the new
  665.           -^c                          ;code-c on the Displaywriter
  666.  
  667.           A>stat cpm.sys ro
  668.  
  669.           A:CPM     .SYS set to Read Only (RO)
  670.           A>
  671.  
  672.  
  673.           The new lines-per-page values take effect  on  the  next  cold-start
  674.           (when  "code-end"  is  typed  or when the machine is cycled off then
  675.           on).  Thereafter, when dealing with this copy of CPM.SYS, the  newly
  676.           chosen  page-lengths take effect when the 66- or 88-lines option has
  677.           been chosen from within the SETUP program.
  678.           Licensed users are granted the right to include these  modifications
  679.           in their Digital Research software.
  680.  
  681.  
  682.  
  683.  
  684.  
  685.                        CP/M-86..R1.1 for the IBM..Displaywriter 
  686.                               Application Note 02, 9/1/83
  687.                                  Keyboard Customization
  688.  
  689.                        Copyright   1983 by Digital Research, Inc.
  690.               CP/M-86 is a registered trademark of Digital Research Inc. 
  691.                     DDT-86 is a trademark of Digital Research Inc. 
  692.            IBM is a registered trademark of International Business Machines.
  693.                                 Compiled September 1983
  694.  
  695.  
  696.           Applicable products and version numbers:  CP/M-86  R1.1, maintenance
  697.           release 1.10 for the IBM. Displaywriter
  698.  
  699.  
  700.           The BIOS section of the operating system, contained in the disk file
  701.           CPM.SYS,  contains  a  translate  table  to  convert  the  hardware-
  702.           generated keyboard codes to the ASCII characters that CP/M-86  uses.
  703.           Several  of  the keys go unused by CP/M-86, and the operating system
  704.           normally  ignores  any  input  they  generate.   However,  with  the
  705.           following  instructions,  you can redefine these keys to produce any
  706.           desired ASCII character.   You should  have  access  to  a  standard
  707.           ASCII character chart.
  708.  
  709.           In addition to the 11 keys that you may define, the codes  generated
  710.           by  the  uppercase  period  and  the  uppercase  comma  may  also be
  711.           customized.
  712.  
  713.           The unused keys that you may redefine are contained in two  separate
  714.           key  groups  on  the keyboard.  The first is the 10-key group on the
  715.           extreme left; this group is 2 keys wide by 5 rows.   The  second  is
  716.           the  8-key group in the upper right area of the keyboard; this group
  717.           is 4 keys wide by 2 rows.  The  following  figure  shows  these  key
  718.           groups:
  719.  
  720.  
  721.           +---+---+   +---------------------------------+  +---+---+---+---+
  722.           |   |   |   |                                 |  |   | E | F | G |
  723.           +---+---+   |                                ++  +---+---+---+---+
  724.           |   | A |   |                                |   | H | I | J | K |
  725.           +---+---+   |                                |   +---+---+---+---+
  726.           |   |   |   |                                |
  727.           +---+---+   |                                |   +---+---+---+---+
  728.           | B | C |   |                                |   |               |
  729.           +---+---+   |                                |   +               +
  730.           | D |   |   +----+                     +-----+   |               |
  731.           +---+---+        |                     |         +---+---+---+---+
  732.                            +---------------------+
  733.  
  734.  
  735.                          Figure 1-1.  Redefinable Keyboard Keys
  736.  
  737.  
  738.           You may redefine any or all of the keys labeled A-K in  Figure  1-1,
  739.           as well as the uppercase period and comma.
  740.  
  741.           Note:  The letters A-K in the figure and in the following  table  do
  742.           not  correspond the keys labeled A-K on the DW keyboard.  They apply
  743.           only to the keys referenced in the figure.
  744.  
  745.           Each key has associated with it two particular hexadecimal addresses
  746.           within  the CPM.SYS file, corresponding to the two ASCII codes which
  747.           are generated when the key is pressed with and without the shift  or
  748.           caps lock in effect.  These addresses are tabulated in the following
  749.           table:
  750.  
  751.  
  752.                        Table 1-1.  Keyboard Hexadecimal Addresses
  753.  
  754.                Key            Address                     Address
  755.                        When key is not shifted      When key is shifted
  756.  
  757.                 A              4AD1                        4AD2
  758.                 B              4ACF                        4AD0
  759.                 C              4AED                        4AEE
  760.                 D              4AD5                        4AD6
  761.                 E              4AD7                        4AD8
  762.                 F              4AB5                        4AB6
  763.                 G              4AEF                        4AF0
  764.                 H              4AB7                        4AB8
  765.                 I              4AB9                        4ABA
  766.                 J              4ABB                        4ABC
  767.                 K              4ABD                        4ABE
  768.                 ,               N/A                        4A04
  769.                 .               N/A                        4A06
  770.  
  771.  
  772.           The following example demonstrates how to define key B, in Figure 1-
  773.           1,  to  cause  it  to generate the < character (ASCII code = 3C hex)
  774.           when shifted and unshifted; key C, in Figure 1-1, to generate the  >
  775.           character  (3E hex) when shifted and unshifted; and key G, in Figure
  776.           1-1, to generate the ASCII code for CTRL-R (12 hex) when shifted and
  777.           CTRL-C  (03) when unshifted.  Also, the uppercase comma is redefined
  778.           as < and uppercase period is redefined as >.
  779.  
  780.           The procedure shown in the  example  requires  the  files  STAT.CMD,
  781.           DDT86.CMD,  and  CPM.SYS  to  be present in drive A:.  You should be
  782.           familiar with the DDT-86  debugger before proceeding.  See the CP/M-
  783.           86 Operating System Programmer's Guide for information on DDT-86.
  784.  
  785.           Note:  Make absolutely certain you have an unmodified backup of  the
  786.           CPM.SYS file on another diskette before you customize your keyboard.
  787.  
  788.           User entries are in bold type.   Comments  follow  semicolons  on  a
  789.           line.
  790.  
  791.           A>stat cpm.sys rw
  792.  
  793.           A:CPM     .SYS set to Read Write (RW)
  794.           A>ddt86
  795.           DDT86 1.1
  796.           -rcpm.sys
  797.             START      END
  798.           xxxx:yyyy xxxx:zzzz          ;these 4-digit numbers will vary
  799.           -s4acf
  800.           xxxx:4ACF 00 3c              ;key B (unshifted) to ASCII <
  801.           xxxx:4AD0 00 3c              ;key B (shifted)   to ASCII <
  802.           xxxx:4AD1 00 .
  803.           -s4aed
  804.           xxxx:4AED 00 3e              ;key C (unshifted) to ASCII >
  805.           xxxx:4AEE 00 3e              ;key C (shifted)   to ASCII >
  806.           xxxx:4AEF 00 .
  807.           -s4aef
  808.           xxxx:4AEF 00 03              ;key G (unshifted) to CTRL-C
  809.           xxxx:4AF0 00 12              ;key G (shifted)   to CTRL-R
  810.           xxxx:4AF1 00 .
  811.           -s4a04
  812.           xxxx:4A04 2C 3c              ;uppercase comma to ASCII <
  813.           xxxx:4A05 2E .
  814.           -s4a06
  815.           xxxx:4A06 2E 3e              ;uppercase period to ASCII >
  816.           xxxx:4A07 2F .
  817.           -wcpm.sys                    ;this overwrites the old CPM.SYS
  818.           -^c                          ;code-c on the Displaywriter
  819.  
  820.           A>stat cpm.sys ro
  821.           A:CPM     .SYS set to Read Only (RO)
  822.           A>
  823.  
  824.  
  825.           The newly-programmed key codes take effect on  the  next  cold-start
  826.           (which  means,  after  "code-end"  is typed, or after the machine is
  827.           cycled off then on).  Replace the  CPM.SYS  files  on  other  system
  828.           disks  with  the  newly  patched  file to enable systems booted from
  829.           other disks to generate the same key codes.
  830.  
  831.           This Technical Note  was  developed  and  tested  by  DRI  Technical
  832.           Support  using  standard  DRI  products.  Modifications  required to
  833.           compile and execute under nonstandard or non-DRI  products  are  the
  834.           responsibility of the user, as are modifications specific to a given
  835.           application.
  836.  
  837.           DRI specifically disclaims any express or implied warranty and shall
  838.           not be liable for any loss of profits, loss of business, loss of use
  839.           or of data, interruption of business,  nor  for  indirect,  special,
  840.           incidental,  or  consequential damages of any kind caused by the use
  841.           or adaptation of this application note.
  842.  
  843.           Licensed users are granted the right to include these  modifications
  844.           in their Digital Research software.
  845.  
  846.  
  847. a segment at entry
  848.  
  849.                   Cseg
  850.  
  851.                   Org     Pat_Offset
  852.  
  853.               Patch:
  854.                   Mov     Ax, .User_Parm_Seg
  855.                   Mov     .Param_seg, Ax
  856.                   Mov     Word ptr .Aret, 0FFFFH
  857.         0 0800 0100 C8FF
  858.             #S645
  859.             0645 0D 0E
  860.             0646 00 .
  861.             #WSAVE.COM
  862.             000Eh record(s) written.
  863.             #G0
  864.             A>
  865.  
  866.