home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
ccp
/
ezalias3.lbr
/
EZALIAS.AZM
/
EZALIAS.ASM
Wrap
Assembly Source File
|
1987-07-30
|
7KB
|
186 lines
; -={ EZalias as of 07/30/87 }=-
;
; Now EZalias can have filenames from one character to 8 characters.
; Added nine semi-colons (;;;;;;;;;) and eliminated the "A0>".
; Just overwrite the space left open for the command line immediately
; beginning after the nine semi-colons.
;
; Ruel Hernandez
; Chula Vista, California
; CompuServe: 71450,3341
; GEnie MAIL: R.HERNANDEZ
; July 30, 1987
;
;-----------------------------------------------------------------------------
;
; -={ EZalias as of 02/05/87 }=-
;
; EZalias is adapted from EZ.COM version 1.00 for EZCPR. EZ.COM
; version 1.00 was originally written by Robert C. Kuhman, which was
; based in part, on an idea from Tim Gary, Los Altos, CA. Kuhman's
; original program was Copyright (c) 1983 by Robert C. Kuhman, but
; released for non-profit use only. See EZ10.ASM for Kuhman's
; documentation. Modifications for inserting command lines were
; influenced by TXT.COM and GTXT.COM.
;
;
; EZalias is a kludge for putting together an alias or synonym type
; .COM file of regularly used commands for EZCPR. There is no SYNONYM
; or ALIAS type utility for EZCPR. SYNONYM cannot put together a .COM
; file while in EZCPR. A SYNONYM .COM file put together in regular
; CP/M cannot work in EZCPR, unless modified with a disk utility - but
; even then, problems in operation may ocassionally occur. ALIAS is
; specific to ZCPR3. There is an ALIAS for EPEX, but again that
; program is specific only to that system. Hence, this EZalias
; modification for EZCPR.
;
; NOTE, IF YOU USE REGULAR CP/M, ZCPR3 OR EPEX, USE THE SYNONYM/ALIAS
; PROGRAMS MADE FOR THOSE SYSTEMS.
;
; MODIFICATIONS:
;
; (1) Modified to be more easier to change like TXT.COM or GTXT.COM
; where user may change command line with WordStar in Non-Document
; mode with Ctrl-V Insert Off or with SuperZap (aka SPZ).
;
; (2) Provides ALIAS-type support for EZCPR. Although not as elegant
; to put together an ALIAS-type .COM file as a real ALIAS for ZCPR3, or
; SYNONYM for regular CP/M, this kludge gets the job done. This
; particular modification may or may not work for regular CP/M or other
; ZCPRs - instead try EZ10.COM enclosed in this EZ-EZCPR.LBR. For
; regular CP/M, definitely use SYNONYM. For ZCPR3, use ALIAS. For
; EPEX, use EPEX's ALIAS program.
;
; (3) To use, copy the .COM file to a newname .COM file and insert a
; command in the blank spaces within the newname .COM file using
; either a disk utility program like SPZ or a word processor like
; WordStar. Note, with WordStar, change or insert command line while
; in Non-Document mode with Ctrl-V Insert Off - OVERWRITE the blank
; spaces only - DO NOT ADD SPACES.
;
; TESTING:
;
; EZalias has been successfully tested on (1) a Kaypro 1 running CP/M
; 2.2g and EZCPR with a MicroSphere megabyte ram disk and (2) an
; ordinary Kaypro II running CP/M 2.2 with EZCPR.
;
; Ruel Hernandez
; Chula Vista, California
; CompuServe: 71450,3341
; GEnie MAIL: R.HERNANDEZ
; February 6, 1987
;
;===========================================================================
;
TRUE: EQU -1
FALSE: EQU NOT TRUE
;
; USER DEFINED EQUATES
;
Z80CPU: EQU TRUE ;TRUE IF Z80 CPU CARD, ELSE FALSE
;
ZCPR: EQU TRUE ;TRUE IF USING ZCPR, ELSE FALSE
;
CPMBAS: EQU 0000H ;CP/M BASE ADDRESS
;
; END USER DEFINED EQUATES
;
ORG CPMBAS+100H ;CP/M EXECUTION ADDRESS
JMP START
;
;---------------------------------------------------------------------------
;
; INSTRUCTIONS TELLING WHERE TO PUT IN COMMAND LINE. NOTE,
; BELOW, USE DDT, SUPERZAP (AKA SPZ), OR DU TO CHANGE "++"
; TO <0D> <0A>
;
INSTRC: DB '++ === Type command by OVERWRITING blank space === ++'
DB ' === D O N O T A D D S P A C E S === ++[START];'
;
;---------------------------------------------------------------------------
;
; THE COMMAND LINE TO EXECUTE IS THE NEXT "DB" DEFINITION.
; 128 BYTES LONG. NOTE, WHEN INSERTING COMMAND IN .COM FILE,
; USE DU, DDT, OR, PREFERABLY, SPZ. SPZ ALLOWS YOU TO INSERT
; ASCII LIKE A WORD PROCESSOR INSTEAD OF HAVING TO PAINSTAKINGLY
; INSERT HEX CODE. YOU COULD USE WORDSTAR IN NON-DOCUMENT
; MODE, BUT CTRL-V INSERT MUST BE OFF TO PREVENT ADDING SPACES.
;
CMD: EQU $ ;MARKER, DO NOT REMOVE
;
DB ';;;;;;;; '
DB ' '
DB ' '
;
;---------------------------------------------------------------------------
;
DB 0,'[END]++' ;DO NOT REMOVE - USE DDT, SUPERZAP,
;OR DU TO CHANGE "++" TO <0D> <0A>
;
ENDCMD: EQU $ ;MARKER, DO NOT REMOVE
;
;---------------------------------------------------------------------------
;
; ASSEMBLE COPYRIGHT INTO HEX FILE FOR LOAD
;
CYRGHT: DB ' EZalias adapted from EZ version 1.00'
DB ' COPYRIGHT (C) 1983 ROBERT KUHMAN '
;
; MAIN PROGRAM
;
;---------------------------------------------------------------------------
;
START: LHLD 1 ;GET WBOOT ADDR
MOV A,H ;GET HI ADDR
SUI 16H ;SUBTRACT 1600H
MOV H,A ;HL HAS CCP ADDRESS+3
SHLD CCP3 ;STORE CCP ADDRESS+3
;
INX H ;CCP + 4
INX H ;CCP + 5
INX H ;CCP + 6
INX H ;CCP + 7
;
MVI A,ENDCMD-CMD-1 ;LENGTH OF COMMAND LINE
MOV M,A ;PUT IT AT CCP + 7
;
INX H ;CCP + 8
XCHG ;DE HAS CCP + 8 DESTINATION
LXI H,CMD ;HL HAS COMMAND LINE ADDR
LXI B,ENDCMD-CMD ;BC HAS NUMBER BYTES TO MOVE
;
IF Z80CPU ;Z80 CPU AVAILABLE
DB 0EDH,0B0H ;Z80 LDIR INSTRUCTION HERE
ENDIF ;Z80
;
IF NOT Z80CPU ;EMULATE LDIR INSTRUCTION FOR 8080 CPU
MOVE: MOV A,M ;MOVE BYTE
STAX D ;MOVE IT TO ADDRESS IN DE
INX H ;INCREMENT TO NEXT BYTE
INX D ;INCREMENT TO NEXT DESTINATION
DCX B ;SUBTRACT ONE OFF OF COUNT IN BC
MOV A,C ;CHECK IF DONE
ORA B ;OR B ONTO C IF RESULT ZERO, DONE
JNZ MOVE ;GET ANOTHER BYTE TO MOVE
ENDIF ;END OF LDIR EMULATION
;
IF ZCPR ;USING ZCPR?
LDA 04H ;GET PRESENT USER/DRIVE
ENDIF ;ZCPR
;
IF NOT ZCPR ;STD CP/M
MVI A,00H ;DRIVE A> USER 0
ENDIF ;STD CP/M
;
MOV C,A ;MOVE A INTO C
LHLD CCP3 ;GET CCP ADDRESS + 3
DCX H ;DECREMENT DOWN TO CCP BASE
DCX H
DCX H ;HL HAS CCP BASE
PCHL ;JUMP THERE
;
CCP3: DS 2
;
; END OF PROGRAM
;