home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / CCP / EZALIAS3.LBR / EZALIAS.AZM / EZALIAS.ASM
Assembly Source File  |  2000-06-30  |  7KB  |  186 lines

  1. ;                         -={ EZalias as of 07/30/87 }=-
  2. ;
  3. ;       Now EZalias can have filenames from one character to 8 characters.
  4. ;       Added nine semi-colons (;;;;;;;;;) and eliminated the "A0>".
  5. ;       Just overwrite the space left open for the command line immediately
  6. ;       beginning after the nine semi-colons.
  7. ;
  8. ;                                       Ruel Hernandez
  9. ;                                       Chula Vista, California
  10. ;                                       CompuServe:  71450,3341
  11. ;                                       GEnie MAIL: R.HERNANDEZ
  12. ;                                       July 30, 1987
  13. ;
  14. ;-----------------------------------------------------------------------------
  15. ;
  16. ;                         -={ EZalias as of 02/05/87 }=-
  17. ;
  18. ;    EZalias is adapted from EZ.COM version 1.00 for EZCPR.  EZ.COM 
  19. ;    version 1.00 was originally written by Robert C. Kuhman, which was 
  20. ;    based in part, on an idea from Tim Gary, Los Altos, CA.  Kuhman's 
  21. ;    original program was Copyright (c) 1983 by Robert C. Kuhman, but 
  22. ;    released for non-profit use only.  See EZ10.ASM for Kuhman's 
  23. ;    documentation.  Modifications for inserting command lines were 
  24. ;    influenced by TXT.COM and GTXT.COM.
  25. ;
  26. ;
  27. ;    EZalias is a kludge for putting together an alias or synonym type 
  28. ;    .COM file of regularly used commands for EZCPR.  There is no SYNONYM 
  29. ;    or ALIAS type utility for EZCPR.  SYNONYM cannot put together a .COM 
  30. ;    file while in EZCPR.  A SYNONYM .COM file put together in regular 
  31. ;    CP/M cannot work in EZCPR, unless modified with a disk utility - but 
  32. ;    even then, problems in operation may ocassionally occur.  ALIAS is 
  33. ;    specific to ZCPR3.  There is an ALIAS for EPEX, but again that 
  34. ;    program is specific only to that system.  Hence, this EZalias 
  35. ;    modification for EZCPR.
  36. ;
  37. ;    NOTE, IF YOU USE REGULAR CP/M, ZCPR3 OR EPEX, USE THE SYNONYM/ALIAS 
  38. ;    PROGRAMS MADE FOR THOSE SYSTEMS.
  39. ;
  40. ;    MODIFICATIONS:
  41. ;
  42. ;    (1) Modified to be more easier to change like TXT.COM or GTXT.COM 
  43. ;    where user may change command line with WordStar in Non-Document 
  44. ;    mode with Ctrl-V Insert Off or with SuperZap (aka SPZ).
  45. ;
  46. ;    (2) Provides ALIAS-type support for EZCPR.  Although not as elegant 
  47. ;    to put together an ALIAS-type .COM file as a real ALIAS for ZCPR3, or 
  48. ;    SYNONYM for regular CP/M, this kludge gets the job done.  This 
  49. ;    particular modification may or may not work for regular CP/M or other 
  50. ;    ZCPRs - instead try EZ10.COM enclosed in this EZ-EZCPR.LBR.  For
  51. ;    regular CP/M, definitely use SYNONYM.  For ZCPR3, use ALIAS.  For 
  52. ;    EPEX, use EPEX's ALIAS program.
  53. ;
  54. ;    (3) To use, copy the .COM file to a newname .COM file and insert a
  55. ;    command in the blank spaces within the newname .COM file using 
  56. ;    either a disk utility program like SPZ or a word processor like 
  57. ;    WordStar.  Note, with WordStar, change or insert command line while 
  58. ;    in Non-Document mode with Ctrl-V Insert Off - OVERWRITE the blank
  59. ;    spaces only - DO NOT ADD SPACES.
  60. ;
  61. ;    TESTING:
  62. ;
  63. ;    EZalias has been successfully tested on (1) a Kaypro 1 running CP/M 
  64. ;    2.2g and EZCPR with a MicroSphere megabyte ram disk and (2) an 
  65. ;    ordinary Kaypro II running CP/M 2.2 with EZCPR.
  66. ;
  67. ;                    Ruel Hernandez
  68. ;                    Chula Vista, California
  69. ;                    CompuServe: 71450,3341
  70. ;                    GEnie MAIL: R.HERNANDEZ
  71. ;                    February 6, 1987
  72. ;
  73. ;===========================================================================
  74. ;
  75. TRUE:    EQU    -1
  76. FALSE:    EQU    NOT TRUE
  77. ;
  78. ;    USER DEFINED EQUATES
  79. ;
  80. Z80CPU:    EQU    TRUE        ;TRUE IF Z80 CPU CARD, ELSE FALSE
  81. ;
  82. ZCPR:    EQU    TRUE        ;TRUE IF USING ZCPR, ELSE FALSE
  83. ;
  84. CPMBAS:    EQU    0000H        ;CP/M BASE ADDRESS
  85. ;
  86. ;    END USER DEFINED EQUATES
  87. ;
  88.     ORG    CPMBAS+100H    ;CP/M EXECUTION ADDRESS
  89.     JMP    START
  90. ;
  91. ;---------------------------------------------------------------------------
  92. ;
  93. ;    INSTRUCTIONS TELLING WHERE TO PUT IN COMMAND LINE.  NOTE,
  94. ;    BELOW, USE DDT, SUPERZAP (AKA SPZ), OR DU TO CHANGE "++" 
  95. ;    TO <0D> <0A>
  96. ;
  97. INSTRC:    DB  '++ === Type command by OVERWRITING blank space === ++'
  98.     DB  ' ===    D O   N O T   A D D   S P A C E S    === ++[START];'
  99. ;
  100. ;---------------------------------------------------------------------------
  101. ;
  102. ;    THE COMMAND LINE TO EXECUTE IS THE NEXT "DB" DEFINITION.
  103. ;    128 BYTES LONG.  NOTE, WHEN INSERTING COMMAND IN .COM FILE,
  104. ;    USE DU, DDT, OR, PREFERABLY, SPZ.  SPZ ALLOWS YOU TO INSERT
  105. ;    ASCII LIKE A WORD PROCESSOR INSTEAD OF HAVING TO PAINSTAKINGLY
  106. ;    INSERT HEX CODE.  YOU COULD USE WORDSTAR IN NON-DOCUMENT 
  107. ;    MODE, BUT CTRL-V INSERT MUST BE OFF TO PREVENT ADDING SPACES.
  108. ;
  109. CMD:    EQU    $            ;MARKER, DO NOT REMOVE
  110. ;
  111.     DB    ';;;;;;;;                                     '
  112.     DB    '                                           '
  113.     DB    '                                           '
  114. ;
  115. ;---------------------------------------------------------------------------
  116. ;
  117.     DB    0,'[END]++'        ;DO NOT REMOVE - USE DDT, SUPERZAP,
  118.                     ;OR DU TO CHANGE "++" TO <0D> <0A>
  119.                     ;
  120. ENDCMD:    EQU    $            ;MARKER, DO NOT REMOVE
  121. ;
  122. ;---------------------------------------------------------------------------
  123. ;
  124. ;    ASSEMBLE COPYRIGHT INTO HEX FILE FOR LOAD
  125. ;
  126. CYRGHT:    DB    ' EZalias adapted from EZ version 1.00'
  127.     DB    ' COPYRIGHT (C) 1983 ROBERT KUHMAN '
  128. ;
  129. ;    MAIN PROGRAM
  130. ;
  131. ;---------------------------------------------------------------------------
  132. ;
  133. START:    LHLD    1        ;GET WBOOT ADDR
  134.     MOV    A,H        ;GET HI ADDR
  135.     SUI    16H        ;SUBTRACT 1600H
  136.     MOV    H,A        ;HL HAS CCP ADDRESS+3
  137.     SHLD    CCP3        ;STORE CCP ADDRESS+3
  138. ;
  139.     INX    H        ;CCP + 4
  140.     INX    H        ;CCP + 5
  141.     INX    H        ;CCP + 6
  142.     INX    H        ;CCP + 7
  143. ;
  144.     MVI    A,ENDCMD-CMD-1    ;LENGTH OF COMMAND LINE
  145.     MOV    M,A        ;PUT IT AT CCP + 7
  146. ;
  147.     INX    H        ;CCP + 8
  148.     XCHG            ;DE HAS CCP + 8 DESTINATION
  149.     LXI    H,CMD        ;HL HAS COMMAND LINE ADDR
  150.     LXI    B,ENDCMD-CMD    ;BC HAS NUMBER BYTES TO MOVE
  151. ;
  152.      IF    Z80CPU        ;Z80 CPU AVAILABLE
  153.     DB    0EDH,0B0H    ;Z80 LDIR INSTRUCTION HERE
  154.      ENDIF            ;Z80
  155. ;
  156.      IF    NOT Z80CPU    ;EMULATE LDIR INSTRUCTION FOR 8080 CPU
  157. MOVE:    MOV    A,M        ;MOVE BYTE
  158.     STAX    D        ;MOVE IT TO ADDRESS IN DE
  159.     INX    H        ;INCREMENT TO NEXT BYTE
  160.     INX    D        ;INCREMENT TO NEXT DESTINATION
  161.     DCX    B        ;SUBTRACT ONE OFF OF COUNT IN BC
  162.     MOV    A,C        ;CHECK IF DONE
  163.     ORA    B        ;OR B ONTO C IF RESULT ZERO, DONE
  164.     JNZ    MOVE         ;GET ANOTHER BYTE TO MOVE
  165.      ENDIF            ;END OF LDIR EMULATION
  166. ;
  167.      IF    ZCPR        ;USING ZCPR?
  168.     LDA    04H        ;GET PRESENT USER/DRIVE
  169.      ENDIF            ;ZCPR
  170. ;
  171.      IF    NOT ZCPR    ;STD CP/M
  172.     MVI    A,00H        ;DRIVE A> USER 0
  173.      ENDIF            ;STD CP/M
  174. ;
  175.     MOV    C,A        ;MOVE A INTO C
  176.     LHLD    CCP3        ;GET CCP ADDRESS + 3
  177.     DCX    H        ;DECREMENT DOWN TO CCP BASE
  178.     DCX    H
  179.     DCX    H        ;HL HAS CCP BASE
  180.     PCHL            ;JUMP THERE
  181. ;
  182. CCP3:    DS    2
  183. ;
  184. ;    END OF PROGRAM
  185. ;
  186.