;		   Osborne Executive Auto-Start Program
;
;				   By
;
;			  Guy  Gamble  05/03/84
;
;	-------------------------------------------------------------
; EXAUTO.ASM --	is intended to replace the original auto start
;		 program that came with the Osborne Executive.
;		 I wrote this very short program because I felt
;		 EXECST.COM program took to much time by displaying
;		 the Osborne Logo, etc. also EXAUTO uses only 1k
;		 of disk space.
;	-------------------------------------------------------------
;
;	Customization instructions:
;
;	1. 	Insert the filename for the program you want to
;		 auto run into location NEWPRG: see below.
;		 If you want to execute a program other than a
;		 .COM file you will have to add the file extent.
;
;		   Examples:
;		    'WS'	;for the filename WS.COM
;		    'DATE.INT'	;for the filename DATE.INT (CBASIC)
;			 ||||
;			 ------
;			 extent
;
;
;	2.	Use MAC.COM and HEXCOM.COM to compile EXAUTO.ASM 
;
;               (Remainder of step 2 added by Jim Switz, FOG, 6 Feb 85)
;               Here's How:
;                a) Place this file, MAC.COM and HEXCOM.COM on one
;                   disk, with 20 or 30 K of space remaining (just
;                   to be safe). Then type the following (assuming
;                   you are using the A drive):
;
;                b) A>MAC EXAUTO $PZ SZ<return>
;                     ....some stuff appears....
;                   A>HEXCOM EXAUTO<return>
;                     ....more stuff appears....
;
;	3.	The compiled EXAUTO.COM now has to be renamed to
;		 EXECST.COM because this is the name that is used
;		 in the operating system. You must also change the
;		 attribute of the file to SYS.
;
;		   Example:
;		    REN EXECST.COM=EXAUTO.COM
;		    SET EXECST.COM[SYS]
;
;	4.	This will now automatically run whatever program
;		 you inserted at the NEWPRG: location below.
;
;		 I hope I explained everything so people with little
;		 programing experience are able to implement this
;		 useful program. If you need any help leave questions
;		 either on the CPM SIG, EMAIL on Compuserve or FOG.
;
;			Guy Gamble 74375,257
;
;	---------------------------------------------------------------
;
;Program Listing
;
WBOOT:	EQU	0000H
BDOS:	EQU	0005H
DMA:	EQU	0080H		;Default DMA address
CHAIN:	EQU	47		;CPM Plus CHAIN to program
;
;
	ORG	0100H		;Beginning of TPA
;
	LXI	H,CMDLN		;Start of new command line
	MOV	A,M		;Check first byte of CMDLN
	ORA	A
	JNZ	MOVE		;If file found on default drive
				; move info to default DMA
;
	MVI	C,0		;File not found so reset system
	JMP	BDOS
;....
;
;  Routine to move new command line into the default DMA for
;  processing by the CPM Plus BDOS command 47 (Chain to program)
;
MOVE:	MOV	C,M
	MVI	B,0
	LXI	H,NEWPRG
	LXI	D,DMA
;
	DB	0EDH,0B0H	;Z80 LDIR instruction tranfers
				; the new command line to DMA
;
	MVI	C,CHAIN		;CPM Plus (Chain to program)
	JMP	BDOS
;....
;
CMDLN:	EQU	$		;length of filename for program
;
	DB	LENGTH
;
;....
;
;   **********************************************************************
;
;		 FILENAME.EXT	;Insert filename.ext for program
;		 12345678.123	; you wish to auto run
;				; .COM files do not need the .EXT
;		'	 .   '	; put an apostrophe at the beginning
;				; and the end of program name.
NEWPRG:	DB	'WS'
;
;   **********************************************************************
;
CMDEND:	EQU	$
;
;....
;
;  Don't change the following necessary data
;
	DB	0		;Mandatory filename termiator
;
	DB	'            '	;Pad with 12 spaces
;
LENGTH:	EQU	CMDEND-CMDLN	;Calculate new filename length +1
;
	END
 termiator
;
	