/*
 *  INSTALL.DAT
 *
 *  Installation script file for COMPASS/Z8
 *
 *  Copyright 1995 (C)
 *  Production Languages Corporation
 *
 *  No part of the file can be changed without written or verbal permission
 *  from Production Languages Corporation.
 *
 */

@DefineProject
	@Name = "COMPASS/Z8"
	@Version = "3.04"
  @Subdir = "\\Z8IDE"
  @OutDrive   = C                       // Default output drive
  @InDiskBell = @True                   // Beep for new disk
  @Verify                               // Verify disk integrity
@EndProject

@DefineVars
  //
  // Distributors, resellers, VARs can change the contact information
  // below.  Before you change the information, you must receive
  // written authorization from Production Languages Corporation.
  //
  @Qstring @Company = "Production Languages Corporation"
  @Qstring @Address1 = "P. O. Box 109"
  @Qstring @Address2 = "Weatherford, TX  76086"
  @Qstring @Address3 = "U. S. A."
  @Qstring @Address4 = ""
  @Qstring @Phone1 = "U. S. Sales:;1-800-525-6289"
  @Qstring @Phone2 = "International Sales:;1-817-599-8363"
  @Qstring @Phone3 = "Fax:;1-817-599-5098"
  @Qstring @Phone4 = "Email:;PLCorp\@aol.com"

  @Integer @EvaluationRelease = @True

  // TARGET SPECIFIC VARIABLES
  @Qstring @TargetEnVar = "Z8"
  @Qstring @TargetName = "Z8"
  @Qstring @ComCon = "Z8CC.CON"
  @Qstring @BugCon = "Z8BUG.WIN"
  @Qstring @DriverFileName = "Z8SIM.EXE"
  @Qstring @IDEFileName = "Z8IDE.EXE"
  @Qstring @IDEINIFileName = "Z8IDE.INI"
  @Qstring @CPUID = "Z8"
  @Qstring @GroupName  = "COMPASS/Z8"
  // end target specific variables

  // TARGET LIST
  @Integer @8051 = 0
  @Integer @Z8 = 1
  @Integer @251 = 2
  @Integer @MCS51GB = 3
  @Integer @MCS51FX = 4
  @Integer @X39 = 5
  @Integer @C24 = 6
  @Integer @462 = 7
  @Integer @TargetID = @Z8
  // target list

  // DRIVER TYPES
  @Integer @Simulator = 0
  @Integer @Emulator = 1
  @Integer @TargetBoard = 2
  @Integer @EvalBoard = 3
  @Integer @DriverType = @Simulator
  // driver types

  // Send Compiler
  @Integer @SendCompiler = 1

  // Send Debugger
  @Integer @SendDebugger = 1

  // Send Assembler
  @Integer @SendAssembler = 1

  // Send Benchmark Tutorial
  @Integer @SendBench = 0

  // EXTENSIONS (these are default values that should change)
  @Qstring @ExtINIPath        = "C:\\WINDOWS\\DEFAULT.INI"
  @Qstring @ExtHelpINIPath    = "C:\\WINDOWS\\DEFAULT.INI"
  // extensions

  @Qstring @Ext1HelpName       = "DEFAULT"
  @Qstring @Ext1HelpINISection = "DEFAULT"

  @Qstring @Ext2HelpName       = "DEFAULT"
  @Qstring @Ext2HelpINISection = "DEFAULT"

//======= End of File Z8IDE.DAT =======
//======= File IDE2.DAT Follows =======

  // DEBUGGER CON FILE NAMES
  @Qstring @BugGen = "BUG.GEN"
  // debugger con file names

  // ASSEMBLY CONFIGURATION VARIABLES (Z8 only)
  @Qstring @ConfigLargeIncPath = "DEFAULT                               "
  @Qstring @ConfigSmallIncPath = "DEFAULT                               "
  @Qstring @CPUName = "DEFAULT"
  @Qstring @ROMValue = "DEFAULT"
  @Qstring @RAMValue = "DEFAULT"
  @Qstring @ROMRange = "DEFAULT"
  @Qstring @A12A15 = "DEFAULT"
  @Qstring @A8A11 = "DEFAULT"
  @Qstring @AD0AD7 = "DEFAULT"
  @Qstring @Slow = "DEFAULT"
  // assembly configuration variables (Z8 only)

  // PATHNAMES
  @Qstring @ConPath =    "DEFAULT                            "
  @Qstring @BugConPath = "DEFAULT                            "
  @Qstring @TemPath =    "DEFAULT                            "

  // Help File Paths and link numbers
  @Qstring @IDEHelpFileName       = "COMPASS.HLP,2000"
  @Qstring @AssemblerHelpFileName = "COMPASS.HLP,15000"
  @Qstring @LinkerHelpFileName    = "COMPASS.HLP,40000"
  @Qstring @LibrarianHelpFileName = "COMPASS.HLP,42000"
  @Qstring @CompilerHelpFileName  = "COMPASS.HLP,10000"
  @Qstring @DebuggerHelpFileName  = "COMPASS.HLP,26000"
  @Qstring @QTHelpFileName        = "COMPASS.HLP,1000"
  @Qstring @PBHelpFileName        = "QT.HLP"
  @Qstring @HelpFileName          = "BIN\\COMPASS.HLP"

  // INSTALL SIZE IN MB
  @Integer @InstallSize = 5

  // DEFINE COLORS
  @Integer @White      = @RGB(255,255,255)   // define color white
  @Integer @Red        = @RGB(255,000,000)   // define color red
  @Integer @Blue       = @RGB(000,000,255)   // define color blue
  @Integer @Magenta    = @RGB(000,000,128)   // define color magenta
  @Integer @Black      = @RGB(000,000,000)   // define color black

  // DEFINE DIALOG BOX SIZES
  @Integer @Null = 0
  @Integer @RightCol = 60                    // right hand column

  @Integer @BaseRow = 4                      // range = (1-23)
  @Integer @BaseCol = 1                      // range = (1-78)

  @Integer @InstallRow = 3                   // default dialog row
  @Integer @OutDriveRow = 4                  // OutDrive dialog row
  @Integer @PathNameRow = 5                  // PathName dialog row
  @Integer @YesNoRow = 4                     // Yes/No dialog row

  @Integer @YesNoRowConst = 4                // row number for yes/no questions
  @Integer @YesNoColConst = 12               // col number for yes/no questions
  @Integer @OptionsRowConst = 20             // row number for misc questions
  @Integer @OptionsColConst = 20             // col number for misc questions

  // PLATFORMS
  @Integer @MSWindows  = 3                   // define MSWindows constant

  @If (@Platform == @MSWindows)
    @Qstring @MDriver    = "@GetINI("boot.description","mouse.drv","system.ini")"
    @Qstring @DispDriver = "@GetINI("boot","display.drv","system.ini")"
    @Qstring @DisplayMethod = "Windows NotePad program"
  @Else
    @Qstring @MDriver    = "N/A"
    @Qstring @DispDriver = "N/A"
    @Qstring @DisplayMethod = "DOS system command \"TYPE\""
  @EndIf // Platform is Windows
@EndVars

@If (@Platform == @MSWindows)
  @Backgroundmode(2,@Blue,@Magenta)
@EndIf // Platform is Windows, set background

@Display // INTRO, INSTRUCTIONS, AND SYS INFO
@If (@EvaluationRelease==@False)
SOFTWARE LICENSING AGREEMENT

By installing the software you agree to the following software licensing
agreement:

LICENSE GRANT:
     Production Languages Corporation (PLC) grants you the right to use
     @Name software ("Software") only as development tool.
RESTRICTIONS:
     You may not modify, make into a derivative work, or pass through to
     third parties.
DISCLAIMER:
     The Software is provided "AS IS" without warranty of any kind.

Do you wish to continue the installation?
  @Pause
OWNERSHIP AND COPYRIGHT OF SOFTWARE:
     Title to the Software and all copies remain with PLC.  The Software
     is copyrighted and is protected by U.S.  copyright laws and
     international treaty provisions.  You will not remove the copyright
     notice from the Software.  You agree to prevent any unauthorized
     copying of the Software.
LIMITATIONS OF LIABILITY:
     PLC gives no warranty of any kind either express or implied
     including warranties of merchantability or fitness for any
     particular purpose.  Neither PLC nor its distributors shall be
     liable for any loss of profits, loss of use, interruption of
     business, nor indirect, special, incidental, or consequential
     damages of any kind whether under this agreement or otherwise.
APPLICABLE LAW:
     This agreement is governed by the laws of the State of Texas and
     the United States including patent and copyright laws.  Any claim
     arising out of this agreement will be brought in Parker County,
     Texas.

Do you wish to continue the installation?
  @Pause
@ElseIf (@EvaluationRelease == @True)
This is an evaluation version of @Name.  Please notice that
this package is for evaluation purpose only.
  @Pause
@EndIf // evaluation release is true
Hello!

  Production Languages Corporation (PLC) welcomes you to
  @Name, a Windows-based cross development
  tool for the @TargetName microcontroller
  @Pause
The installation program has found the following system information:

Processor:  80@CPU
Co-processor:  @If(@NDP)@!PRESENT @Else@!NOT PRESENT @EndIf
Total RAM memory:  @Eval(@RAMTotal/1024)K
Total EXT memory:  @Eval(@EXTTotal/1024)K
Video card:  @If(@VideoCard == 77 || @VideoCard == 72) MONO @ElseIf(@VideoCard == 69) EGA @ElseIf(@VideoCard == 86) VGA or better @ElseIf(@VideoCard == 67) CGA @Else UNKNOWN @EndIf
Video RAM:  @VideoRam@!K

DOS version:  @OSMajor.@OSMinor
Windows location:  @If(@Platform==@MSWindows)@WindowsDrive:@WindowsDir @Else@!NOT PRESENT @EndIf
Windows version:  @If(@Platform==@MSWindows)@WindowsMajor.@WindowsMinor @Else@!N/A @Endif
Windows mouse driver:  @MDriver
Windows display driver:  @DispDriver
Network:  @If(@Netbios)@!PRESENT @Else NOT PRESENT @EndIf
  @Pause
@EndDisplay // intro, instructions, and sys info


DRIVE:
@GetOutDrive
The installation program must know the name of the destination disk
drive.  On which disk drive do you wish to install the tools?

                                Drive @Outdrive: Space Free: @Eval(@DiskFree(@outdrive)/1024000) MB
                                PLC File Space Required: @InstallSize MB

  @Prompt = "Select Destination Drive ([Enter] = @OutDrive:)"
  @DlgCtrlSize(@Null,@OutDriveRow,@BaseCol,(@OutDriveRow+6),(@BaseCol+12))
@EndOutDrive

//@If (@Removable)
//  @If (@Platform == @MSWindows)
//    @Backgroundmode(3,@Red,@Black)
//  @EndIf // Platform is Windows, set background
//  @Display
//WARNING: You may only install @Name on a local hard drive.
//    @Pause
//  @EndDisplay
//  @If (@Platform == @MSWindows)
//    @Backgroundmode(2,@Blue,@Magenta)
//  @EndIf // Platform is Windows, set background
//  @Goto DRIVE
//@EndIf // if removable drive

@If (@Eval(@DiskFree(@Outdrive)/1024000) < @InstallSize)
  @Display
INFORMATION FOR DRIVE @OutDrive:

Drive @OutDrive: type:  @If(@Removable(@outdrive))@!REMOVABLE @Else@!NON-REMOVABLE @EndIf
Drive @OutDrive: location:  @if(@DriveRemote(@outdrive))@!REMOTE @Else@!LOCAL @Endif
Drive @OutDrive: size:  @Eval(@DiskSize(@outdrive)/1024000) MB
Drive @OutDrive: free space:  @Eval(@DiskFree(@outdrive)/1024000) MB

The @OutDrive: drive does not have enough free space to install the PLC
tools.  Please choose another drive.
    @Pause
  @EndDisplay // Outdrive information
  @Goto DRIVE
@EndIf // if not enough room


@GetSubdir
Now you need to specify the hard disk destination subdirectory.  The
subdirectory is the location on your disk drive where the tools will be
installed.
  @Prompt = "Specify Subdirectory ([Enter] = @SUBDIR)"
  @DlgCtrlSize(@Null,@PathNameRow,@BaseCol,(@PathNameRow+1),@RightCol)
@EndSubdir

//CREATE INITIAL DIRECTORIES

@MkDir("@OutDrive:@Subdir")                 // create main subdirectory
@MkDir("@OutDrive:@Subdir\\BIN")            // create BIN subdirectory
@MkDir("@OutDrive:@Subdir\\RTL")            // create RTL subdirectory
@MkDir("@OutDrive:@Subdir\\RTL\\SRC")       // create SRC subdirectory

//create initial directories

//SET DEFAULT TEMPATH TO TOOL DIRECTORY
@TemPath = "@Outdrive:@Subdir"
//set default tempath to tool directory

// Define for creating Windows program groups
@DefineVars
   @Qstring @Item1 = "@Outdrive:\\@Subdir\\@IDEFileName,@Name,@Outdrive:\\@Subdir\\@IDEFileName"
// COMPASS Q&A is for 8051 only
   @Qstring @Item2 = "@Outdrive:\\@Subdir\\IDEQA.WRI,\"COMPASS Q&A\""
   @Qstring @Item3 = "@Outdrive:\\@Subdir\\BIN\\COMPASS.HLP,\"COMPASS Help\""
   @Qstring @Item4 = "@Outdrive:\\@Subdir\\README.TXT,\"README.TXT\""
@EndVars

@If (@SendAssembler != 0)

@GetOption // AUTOEXEC
The PLC tools require certain settings in your AUTOEXEC.BAT file.  Would
you like the installation program to make these changes to AUTOEXEC.BAT?

                                 The change is as follows:

                                 insert SET @TargetEnVar=@Outdrive:@Subdir\BIN


The installation program will create a back-up version of your
AUTOEXEC.BAT called AUTOEXEC.BAK in case anything unexpected happens.
  @Option 101 = "Yes"
  @Option 100 = "No"
  @Prompt = "Update AUTOEXEC.BAT ([Enter] = Yes)"
  @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+@YesNoRowConst),(@BaseCol+@YesNoColConst))
@EndOption // autoexec

@If (101 [= @Option)
  @SetAutoexec
    @Overwrite
    @SetReplace("@TargetEnVar","@Outdrive:@Subdir\\BIN")
  @EndAutoexec
@ElseIf (100 [= @Option)
  @Display
Be sure to set the environment variable and path before running the PLC tools.
    @Pause
  @EndDisplay
@Else
  @Goto ABORT
@Endif // Yes, update AUTOEXEC.BAT

@EndIf // SendAssembler option

@If (@SendDebugger != 0)

// Initialize Debugger Options (must come before hi/low res question)
@If (@TargetID==@X39)
    @SetOption(5011)
@Else
    @SetOption(5010)  // com port
@EndIf

@If (@DriverType == @Emulator || @DriverType == @TargetBoard || @DriverType == @EvalBoard)
  @GetOption
  Which COM port should the Debugger use?
    @Option 5010 = "com1"
    @Option 5011 = "com2"
    @Option 5012 = "com3"
    @Option 5013 = "com4"
    @Prompt = "Set COM port: COM1 / COM2 / COM3 / COM4"
    @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+@YesNoRowConst),(@BaseCol+@OptionsColConst))
  @EndOption
@EndIf
// end debugger options

// DEBUGGER CON FILE
@BugConPath = "@OutDrive:@Subdir\\BIN\\@BugCon"

@Write(@BugConPath,"wt","\n")
@Write(@BugConPath,"at","; @BugCon\n")
@Write(@BugConPath,"at","; @Name Debugger Configuration File\n")
@Write(@BugConPath,"at","\n")

// COM1 OR COM2
@Write(@BugConPath,"at",";Set Communications Port\n")
@DefineVars
  @If (5010 [= @Option) // COM1
    @QString @PortName = "com1"
  @ElseIf (5011 [= @Option) // COM2
    @QString @PortName = "com2"
  @ElseIf (5012 [= @Option) // COM3
    @QString @PortName = "com3"
  @ElseIf (5013 [= @Option) // COM4
    @QString @PortName = "com4"
  @Else
    @QString @PortName = "com1"
  @EndIf // com1-com4
@EndVars

@If (5010 [= @Option) // COM1
  @Write(@BugConPath,"at","set $port = $com1\n")
@ElseIf (5011 [= @Option) // COM2
  @Write(@BugConPath,"at","set $port = $com2\n")
@ElseIf (5012 [= @Option) // COM3
  @Write(@BugConPath,"at","set $port = $com3\n")
@ElseIf (5013 [= @Option) // COM4
  @Write(@BugConPath,"at","set $port = $com4\n")
@EndIf
@Write(@BugConPath,"at","\n")
@Write(@BugConPath,"at",";Set Target Argument\n")
@Write(@BugConPath,"at","set $init_target_arg = \"\"\n")
@If ( @TargetID == @251)
  @Write(@BugConPath,"at","var %51windows type=int value=$off\n")
@EndIf

@Write(@BugConPath,"at","\n")
@Write(@BugConPath,"at",";Set Initialize Context\n")
@Write(@BugConPath,"at","set $init_context = $off\n")

@Write(@BugConPath,"at","\n")
@If( @TargetID != @X39)
  @Write(@BugConPath,"at","set $default_format = $omf\n")
@Else
  @Write(@BugConPath,"at","set $default_format = $srec\n")
@EndIf
 
@Write(@BugConPath,"at",";Set Driver Name\n")
@Write(@BugConPath,"at","set $driver = \"@DriverFileName\"\n")
// misc debugger items

@Write(@BugConPath,"at","\n")
@Write(@BugConPath,"at",";Set HIGH or LOW Resolution\n")
@Write(@BugConPath,"at","batch \"@BugGen\"\n")
@Write(@BugConPath,"at","upload\n")
@Write(@BugConPath,"at","reset\n")

// debugger con file

//  Initialize Compiler Options (must set before manual/default question)
@SetOption(90)    // compiler options: default
@SetOption(11)    // autoexec: yes
@If( @TargetID == @C24)
  @SetOption(1022)  // model:compact
@ElseIf ( @TargetID == @251)
  @SetOption(1023)  // model:large
@Else
  @SetOption(1020)  // model:small
@EndIf
@SetOption(1031)  // optspeed
@SetOption(1040)  // nostkck
@SetOption(1050)  // fplib
@SetOption(1060)  // nolink
@SetOption(1070)  // nokeepasm
@SetOption(1080)  // nokeeplst
@SetOption(1090)  // nokeeplnk
@SetOption(1100)  // noexpmac
@SetOption(1110)  // nolist
@SetOption(1120)  // nodebug
@If (@TargetID == @251)
  @SetOption(1130)  // source or binary mode for 251
@EndIf

@EndIf // End of debugger configuration file modification

@If (@SendCompiler != 0)

// SET COMPILER OPTIONS
@GetOption @Prompt = "Set Options" 
The C Compiler has several options.  Would you like to manually set the
standard options or use the default setup?






If this is your first time using the installation program, we strongly
recommend using the Default setup.
  @Option 90 = "Default setup"
  @Option 91 = "Manual setup"
  @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+@YesNoRowConst),(@BaseCol+@OptionsColConst))
@EndOption

@If (90 [= @Option)
  @Goto EndCompilerOptions
@EndIf // SET COMPILER OPTIONS

@Display // Compiler Options
The installation program will now ask you several questions so that it
can configure the compiler to suit your needs. 
  @Pause
@EndDisplay // Compiler Options

// TEMPATH
@GetString  @TemPath  @Prompt = "Compiler Options ([Enter] = @TemPath)"
Please specify the drive and full path of a temporary directory.
  @DlgCtrlSize(@Null,@PathNameRow,@BaseCol,(@PathNameRow+1),@RightCol)
@EndString // tempath

// MODEL
@GetOption  @Prompt = "Compiler Options"
Which memory model would you like?
  @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+6),(@BaseCol+@OptionsColConst))
@If (@TargetID == @Z8)
  @Option 1020 = "Small"
  @Option 1023 = "Large"
@ElseIf (@TargetID == @251)
  @Option 1020 = "Small"
  @Option 1022 = "Medium"
  @Option 1023 = "Large"
  @Option 1025 = "Huge"
@ElseIf (@TargetID == @8051)
  @Option 1020 = "Small"
  @Option 1022 = "Medium"
  @Option 1021 = "Compact"
  @Option 1023 = "Large"
  @Option 1024 = "Tiny"
@Else
  @Option 1020 = "Small"
  @Option 1022 = "Medium"
  @Option 1021 = "Compact"
  @Option 1023 = "Large"
@EndIf
@EndOption // model

// OPTSPEED/OPTSIZE
@GetOption  @Prompt = "Compiler Options"
Would you like to optimize for speed or size?
  @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+@YesNoRowConst),(@BaseCol+@OptionsColConst))
  @Option 1031 = "Speed"
  @Option 1030 = "Size"
@EndOption // optspeed/optsize

// NOSTKCK/STKCK
@GetOption  @Prompt = "Compiler Options"
Would you like to check run-time stack overflow?
  @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+@YesNoRowConst),(@BaseCol+@YesNoColConst))
  @Option 1040 = "No"
  @Option 1041 = "Yes"
@EndOption // nostkck/stkck

// FPLIB/NOFPLIB
@GetOption  @Prompt = "Compiler Options"
Would you like to use the floating-point library?
  @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+@YesNoRowConst),(@BaseCol+@YesNoColConst))
  @Option 1051 = "Yes"
  @Option 1050 = "No"
@EndOption // fplib/nofplib

// AUTO-INVOKE LINKER
@GetOption  @Prompt = "Compiler Options"
Would you like to automatically invoke the linker?
  @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+@YesNoRowConst),(@BaseCol+@YesNoColConst))
  @Option 1060 = "No"
  @Option 1061 = "Yes"
@EndOption // auto-invoke linker

// KEEP ASM
@GetOption   @Prompt = "Compiler Options"
Would you like to keep the assembly source file?
  @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+@YesNoRowConst),(@BaseCol+@YesNoColConst))
  @Option 1070 = "No"
  @Option 1071 = "Yes"
@EndOption // keep asm

// KEEP LST
@GetOption  @Prompt = "Compiler Options"
Would you like to keep the assembly listing file?
  @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+@YesNoRowConst),(@BaseCol+@YesNoColConst))
  @Option 1080 = "No"
  @Option 1081 = "Yes"
@EndOption // keep lst

// KEEP LNK
@GetOption  @Prompt = "Compiler Options"
Would you like to keep the link control file?
  @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+@YesNoRowConst),(@BaseCol+@YesNoColConst))
  @Option 1090 = "No"
  @Option 1091 = "Yes"
@EndOption // keep lnk

// EXPAND MACROS
@GetOption  @Prompt = "Compiler Options"
Would you like to expand macros?
  @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+@YesNoRowConst),(@BaseCol+@YesNoColConst))
  @Option 1100 = "No"
  @Option 1101 = "Yes"
@EndOption // expand macros

// COMPILED LISTING
@GetOption  @Prompt = "Compiler Options"
Would you like to generate a compiled listing?
  @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+@YesNoRowConst),(@BaseCol+@YesNoColConst))
  @Option 1110 = "No"
  @Option 1111 = "Yes"
@EndOption // compiled listing

// DEBUG INFO
@GetOption  @Prompt = "Compiler Options"
Would you like to generate debug information?
  @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+@YesNoRowConst),(@BaseCol+@YesNoColConst))
  @Option 1120 = "No"
  @Option 1121 = "Yes"
@EndOption // debug info

// BINARY OR SOURCE MODE
@If( @TargetID == @251 )
@GetOption  @Prompt = "Compiler Options"
Would you like to use source or binary mode?
  @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+@YesNoRowConst),(@BaseCol+@YesNoColConst))
  @Option 1130 = "Source"
  @Option 1131 = "Binary"
@EndOption // binary or source mode
@EndIf

EndCompilerOptions:  // ------------------------------------------

// CREATE COMPILER CONFIG FILE AND INSTALL

// BEGIN WRITING TO CONFIG FILE

@ConPath = "@OutDrive:@Subdir\\BIN\\@ComCon"

@Write(@ConPath,"wt","\n")
@Write(@ConPath,"at","/* @ComCon */\n")
@Write(@ConPath,"at","/* @Name Compiler Configuration File */\n")
@Write(@ConPath,"at","\n")
@Write(@ConPath,"at","-EMBEDDED                 /* Allow embedded application keywords (DEFAULT) */\n")
@Write(@ConPath,"at","-MAXERRS:50               /* Set maximum error count (DEFAULT) */\n")
@If (@TargetID == @X39 || @TargetID == @C24)
  @Write(@ConPath,"at","-STRTABSZ:40000           /* Set string table size (DEFAULT) */\n")
@Else
  @Write(@ConPath,"at","-STRTABSZ:32000           /* Set string table size (DEFAULT) */\n")
@EndIf
@If (@TargetID != @251)
  @Write(@ConPath,"at","-OPTLINK                  /* Use static frames (DEFAULT) */\n")
@Else
  @Write(@ConPath,"at","-NOOPTLINK                /* Do not use static frames (DEFAULT) */\n")
@EndIf
@Write(@ConPath,"at","-INTSIZE:16               /* Set integer size (DEFAULT) */\n")
@If (@TargetID == @251 )
  @Write(@ConPath,"at","-FLOATSIZE:32             /* Set floating point size (DEFAULT) */\n")
  @Write(@ConPath,"at","-DOUBLESIZE:32            /* Set double floating point size (DEFAULT) */\n")
@EndIf
@Write(@ConPath,"at","-STRICT                   /* Adhere to ANSI standard (DEFAULT) */\n")
@Write(@ConPath,"at","-NOSTKCK                  /* Inhibit stack checking (DEFAULT) */\n")
@Write(@ConPath,"at","-ASM                      /* Assemble after compile (DEFAULT) */\n")
@If (@TargetID == @251)
  @Write(@ConPath,"at","-NOLOCALCSE\n")
@EndIf
@If (@TargetID == @X39)
  @Write(@ConPath,"at","-EMBEDDED\n")
@EndIf
@If (@TargetID != @Z8)
  @Write(@ConPath,"at","-CPU=@CPUID               /* Set CPU (DEFAULT) */\n")
@EndIf
@Write(@ConPath,"at","\n")

// TEMPATH
@Write(@ConPath,"at","-tempath=@TemPath         /* Temp path */\n")
// tempath

// MODEL
@If (1020 [= @Option) 
  @Write(@ConPath,"at","-model:small              /* Small model */\n")
@ElseIf (1021 [= @Option)
  @Write(@ConPath,"at","-model:compact            /* Compact model */\n")
@ElseIf (1022 [= @Option)
  @Write(@ConPath,"at","-model:medium             /* Medium model */\n")
@ElseIf (1023 [= @Option)
  @Write(@ConPath,"at","-model:large              /* Large model */\n")
@ElseIf (1024 [= @Option)
  @Write(@ConPath,"at","-model:tiny               /* Tiny model */\n")
@ElseIf (1025 [= @Option)
  @Write(@ConPath,"at","-model:huge               /* Huge model */\n")
@EndIf // model

// OPTSPEED/OPTSIZE
@If (1031 [= @Option)
  @Write(@ConPath,"at","-optspeed                 /* Optimize for speed (DEFAULT) */\n")
@ElseIf (1030 [= @Option)
  @Write(@ConPath,"at","-optsize                  /* Optimize for size */\n")
@EndIf // optspeed/optsize

// NOSTKCK/STKCK
@If (1040 [= @Option)
  @Write(@ConPath,"at","-nostkck                  /* No stack checking (DEFAULT) */\n")
@ElseIf (1041 [= @Option)
  @Write(@ConPath,"at","-stkck                    /* Stack checking */\n")
@EndIf // nostkck/stkck

// FPLIB/NOFPLIB
@If (1051 [= @Option)
  @Write(@ConPath,"at","-fplib                    /* Use floating-point library (DEFAULT) */\n")
@ElseIf (1050 [= @Option)
  @Write(@ConPath,"at","-nofplib                  /* Do not use floating-point library */\n")
@EndIf // fplib/nofplib

// AUTO-INVOKE LINKER
@If (1060 [= @Option)
  @Write(@ConPath,"at","-nolink                   /* Do not auto-invoke linker (DEFAULT) */\n")
@ElseIf (1061 [= @Option)
  @Write(@ConPath,"at","-link                     /* Auto-invoke linker */\n")
@EndIf // auto-invoke linker

// KEEP ASM
@If (1070 [= @Option)
  @Write(@ConPath,"at","-nokeepasm                /* Do not keep assembly source file (DEFAULT) */\n")
@ElseIf (1071 [= @Option)
  @Write(@ConPath,"at","-keepasm                  /* Keep assembly source file */\n")
@EndIf // keep asm

// KEEP LST
@If (1080 [= @Option)
  @Write(@ConPath,"at","-nokeeplst                /* Do not keep assembly listing file (DEFAULT) */\n")
@ElseIf (1081 [= @Option)
  @Write(@ConPath,"at","-keeplst                  /* Keep assembly listing file */\n")
@EndIf // keep lst

// KEEP LNK
@If (1090 [= @Option)
  @Write(@ConPath,"at","                          /* Do not keep link control file (DEFAULT) */\n")
@ElseIf (1091 [= @Option)
  @Write(@ConPath,"at","-keeplnk                  /* Keep link control file */\n")
@EndIf // keep lnk

// EXPAND MACROS
@If (1100 [= @Option)
  @Write(@ConPath,"at","-noexpmac                 /* Do not expand macros (DEFAULT) */\n")
@ElseIf (1101 [= @Option)
  @Write(@ConPath,"at","-expmac                   /* Expand macros */\n")
@EndIf // expand macros

// COMPILED LISTING
@If (1110 [= @Option)
  @Write(@ConPath,"at","-nolist                   /* Do not generate compiled listing (DEFAULT) */\n")
@ElseIf (1111 [= @Option)
  @Write(@ConPath,"at","-list                     /* Generate compiled listing */\n")
@EndIf // compiled listing

// DEBUG INFO
@If (1121 [= @Option)
  @Write(@ConPath,"at","-debug                    /* Generate debug information */\n")
@ElseIf (1120 [= @Option)
  @Write(@ConPath,"at","                          /* Do not generate debug information (DEFAULT) */\n")
@EndIf // debug info

// DEBUG INFO
@If (@TargetID == @251)
  @If (1131 [= @Option)
    @Write(@ConPath,"at","-mode=binary              /* Use Binary mode for 251 */\n")
  @ElseIf (1130 [= @Option)
    @Write(@ConPath,"at","-mode=source              /* Use Source mode for 251 */\n")
  @EndIf // debug info
@EndIf

// 8051 SPECIFIC ITEMS
@If (@DriverType == @TargetBoard )
  @Write(@ConPath,"at","-rom:\"4000-9FFF\"          /* Range for ROM */\n")
  @Write(@ConPath,"at","-xram:\"A000-FFFF\"         /* Range for XRAM */\n")
  @Write(@ConPath,"at","-ram:\"40-7F\"              /* Range for RAM */\n")
@ElseIf (@DriverType == @EvalBoard )
  @Write(@ConPath,"at","-rom:\"0000-7FFF\"          /* Range for ROM */\n")
  @Write(@ConPath,"at","-xram:\"8000-FFFF\"         /* Range for XRAM */\n")
  @Write(@ConPath,"at","-ram:\"40-7F\"              /* Range for RAM */\n")
@ElseIf (@TargetID == @Z8)
  @Write(@ConPath,"at","-rom:\"0000-3FFF\"          /* Range for ROM */\n")
  @Write(@ConPath,"at","-xram:\"4000-BFFF\"         /* Range for XRAM */\n")
  @Write(@ConPath,"at","-rdata:\"20-7F\"            /* Range for RDATA */\n")
@ElseIf (@TargetID == @251 && @DriverType == @Simulator)
  @Write(@ConPath,"at","-rom:\"FF0000-FFFFFF\"      /* Range for ROM */\n")
  @Write(@ConPath,"at","-eram:\"100000-10FFFF\"     /* Range for ERAM */\n")
  @Write(@ConPath,"at","-ram:\"20-420\"             /* Range for RAM */\n")
@ElseIf (@TargetID == @251 && @DriverType == @Emulator)
  @Write(@ConPath,"at","-rom:\"4000-7FFF\"          /* Range for ROM */\n")
  @Write(@ConPath,"at","-eram:\"0000-0000\"         /* Range for ERAM */\n")
  @Write(@ConPath,"at","-ram:\"40-3FFF\"            /* Range for RAM */\n")
@ElseIf (@TargetID == @C24)
  @Write(@ConPath,"at","-ram:\"00-7FF\"             /* Range for RAM */\n")
  @Write(@ConPath,"at","-rom:\"800-7FFF\"           /* Range for ROM */\n")
@ElseIf (@TargetID == @X39)
  @Write(@ConPath,"at","-ram:\"8000-BFFF\"             /* Range for RAM */\n")
  @Write(@ConPath,"at","-rom:\"C000-FFFF\"           /* Range for ROM */\n")
@ElseIf (@TargetID != @Z8) // 8051 with simulator or emulator
  @Write(@ConPath,"at","-rom:\"0000-FFFF\"          /* Range for ROM */\n")
  @Write(@ConPath,"at","-xram:\"0000-FFFF\"         /* Range for XRAM */\n")
  @Write(@ConPath,"at","-ram:\"20-7F\"              /* Range for RAM */\n")
@EndIf

// Z8 SPECIFIC CONFIG FILE ITEMS
@If (@TargetID == @Z8)
  // CPU
  @GetOption  @Prompt = "Compiler Options"
Which target are you using?
  @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+@OptionsRowConst),(@BaseCol+@OptionsColConst))
      // Z8 CPU "TABLE"
      // CMOS
      @Option 1500 = "Z86C00"  // 0
      @Option 1501 = "Z86C06"  // 1
      @Option 1502 = "Z86L06"  // 2
      @Option 1503 = "Z86C07"  // 3
      @Option 1504 = "Z86C08"  // 4
      @Option 1505 = "Z86C09"  // 5
      @Option 1506 = "Z86C10"  // 6
      @Option 1507 = "Z86C11"  // 7
      @Option 1508 = "Z86C17"  // 8
      @Option 1509 = "Z86C18"  // 9
      @Option 1510 = "Z86C19"  // 10
      @Option 1511 = "Z86C20"  // 11
      @Option 1512 = "Z86C21"  // 12
      @Option 1513 = "Z86C30"  // 13
      @Option 1514 = "Z86C40"  // 14
      @Option 1515 = "Z86C61"  // 15
      @Option 1516 = "Z86C62"  // 16
      @Option 1517 = "Z86C89"  // 17
      @Option 1518 = "Z86C90"  // 18
      @Option 1519 = "Z86C91"  // 19
      @Option 1520 = "Z86C93"  // 20
      @Option 1536 = "Z86C95"  // 36
      @Option 1521 = "Z86C96"  // 21
      @Option 1522 = "Z86C27"  // 22
      @Option 1523 = "Z86127"  // 23
      @Option 1524 = "Z86C97"  // 24
      // NMOS
      @Option 1525 = "Z8600"   // Z86C00
      @Option 1526 = "Z8601"   // 25
      @Option 1527 = "Z8602"   // 26
      @Option 1528 = "Z8604"   // 27
      @Option 1529 = "Z8610"   // Z86C10
      @Option 1530 = "Z8611"   // Z86C11
      @Option 1531 = "Z8614"   // 28
      @Option 1532 = "Z8681"   // 29
      @Option 1533 = "Z8682"   // 30
      @Option 1534 = "Z8691"   // Z86C91
//      @Option 1535 = "Z86C10"  // Z86C10
      // z8 cpu "table"
  @EndOption // cpu

  // FIND DEFAULT CPU, ROM, AND RAM VALUES
  @If (1500 [= @Option)
    @CPUName  = "Z86C00"
    @ROMValue = "3FFF"
    @RAMValue = "8F"
  @ElseIf (1501 [= @Option)
    @CPUName  = "Z86C06"
    @ROMValue = "3FF"
    @RAMValue = "8F" 
  @ElseIf (1502 [= @Option)
    @CPUName  = "Z86L06"
    @ROMValue = "3FF"
    @RAMValue = "8F" 
  @ElseIf (1503 [= @Option)
    @CPUName  = "Z86C07"
    @ROMValue = "7FF"
    @RAMValue = "8F" 
  @ElseIf (1504 [= @Option)
    @CPUName  = "Z86C08"
    @ROMValue = "7FF"
    @RAMValue = "8F" 
  @ElseIf (1505 [= @Option)
    @CPUName  = "Z86C09"
    @ROMValue = "FFF"
    @RAMValue = "8F" 
  @ElseIf (1535 [= @Option)
    @CPUName  = "Z86C10"
    @ROMValue = "FFF"
    @RAMValue = "8F" 
  @ElseIf (1506 [= @Option)
    @CPUName  = "Z86C10"
    @ROMValue = "FFF"
    @RAMValue = "8F" 
  @ElseIf (1507 [= @Option)
    @CPUName  = "Z86C11"
    @ROMValue = "FFF"
    @RAMValue = "DF" 
  @ElseIf (1508 [= @Option)
    @CPUName  = "Z86C17"
    @ROMValue = "7FF"
    @RAMValue = "8F" 
  @ElseIf (1509 [= @Option)
    @CPUName  = "Z86C18"
    @ROMValue = "7FF"
    @RAMValue = "8F" 
  @ElseIf (1510 [= @Option)
    @CPUName  = "Z86C19"
    @ROMValue = "FFF"
    @RAMValue = "8F" 
  @ElseIf (1511 [= @Option)
    @CPUName  = "Z86C20"
    @ROMValue = "1FFF"
    @RAMValue = "DF" 
  @ElseIf (1512 [= @Option)
    @CPUName  = "Z86C21"
    @ROMValue = "1FFF"
    @RAMValue = "DF" 
  @ElseIf (1513 [= @Option)
    @CPUName  = "Z86C30"
    @ROMValue = "FFF"
    @RAMValue = "DF" 
  @ElseIf (1514 [= @Option)
    @CPUName  = "Z86C40"
    @ROMValue = "FFF"
    @RAMValue = "DF" 
  @ElseIf (1515 [= @Option)
    @CPUName  = "Z86C61"
    @ROMValue = "3FFF"
    @RAMValue = "DF" 
  @ElseIf (1516 [= @Option)
    @CPUName  = "Z86C62"
    @ROMValue = "3FFF"
    @RAMValue = "DF" 
  @ElseIf (1517 [= @Option)
    @CPUName  = "Z86C89"
    @ROMValue = "2000"
    @RAMValue = "DF" 
  @ElseIf (1518 [= @Option)
    @CPUName  = "Z86C90"
    @ROMValue = "2000"
    @RAMValue = "DF" 
  @ElseIf (1519 [= @Option)
    @CPUName  = "Z86C91"
    @ROMValue = "2000"
    @RAMValue = "DF" 
  @ElseIf (1520 [= @Option)
    @CPUName  = "Z86C93"
    @ROMValue = "2000"
    @RAMValue = "DF" 
  @ElseIf (1536 [= @Option)
    @CPUName  = "Z86C95"
    @ROMValue = "2000"
    @RAMValue = "DF" 
  @ElseIf (1521 [= @Option)
    @CPUName  = "Z86C96"
    @ROMValue = "2000"
    @RAMValue = "DF" 
  @ElseIf (1522 [= @Option)
    @CPUName  = "Z86C27"
    @ROMValue = "1FFF"
    @RAMValue = "DF" 
  @ElseIf (1523 [= @Option)
    @CPUName  = "Z86127"
    @ROMValue = "1FFF"
    @RAMValue = "DF" 
  @ElseIf (1524 [= @Option)
    @CPUName  = "Z86C97"
    @ROMValue = "2000"
    @RAMValue = "DF" 
  @ElseIf (1525 [= @Option)
    @CPUName  = "Z8600"
    @ROMValue = "7FF"
    @RAMValue = "8F" 
  @ElseIf (1526 [= @Option)
    @CPUName  = "Z8601"
    @ROMValue = "7FF"
    @RAMValue = "8F" 
  @ElseIf (1527 [= @Option)
    @CPUName  = "Z8602"
    @ROMValue = "7FF"
    @RAMValue = "8F" 
  @ElseIf (1528 [= @Option)
    @CPUName  = "Z8604"
    @ROMValue = "3FF"
    @RAMValue = "5C" 
  @ElseIf (1529 [= @Option)
    @CPUName  = "Z8610"
    @ROMValue = "FFF"
    @RAMValue = "8F" 
  @ElseIf (1530 [= @Option)
    @CPUName  = "Z8611"
    @ROMValue = "FFF"
    @RAMValue = "8F" 
  @ElseIf (1531 [= @Option)
    @CPUName  = "Z8614"
    @ROMValue = "FFF"
    @RAMValue = "8F" 
  @ElseIf (1532 [= @Option)
    @CPUName  = "Z8681"
    @ROMValue = "2000"
    @RAMValue = "8F" 
  @ElseIf (1533 [= @Option)
    @CPUName  = "Z8682"
    @ROMValue = "2000"
    @RAMValue = "8F" 
  @ElseIf (1534 [= @Option)
    @CPUName  = "Z8691"
    @ROMValue = "2000"
    @RAMValue = "8F"
  @EndIf  // find default cpu, rom, and ram values

  @Write(@ConPath,"at","-CPU=@CPUName             /* Set CPU (DEFAULT) */\n")

  // EXTERNAL RAM SUPPORT
  @GetOption  @Prompt = "Compiler Options"
Does your hardware support external memory (XRAM)?
    @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+@YesNoRowConst),(@BaseCol+@YesNoColConst))
      @Option 1211 = "Yes"
      @Option 1210 = "No"
  @EndOption

  @If (1211 [= @Option) // allram
    @Write(@ConPath,"at","-xram:\"4000-BFFF\"         /* Range for XRAM */\n")
    @Write(@ConPath,"at","-allram                   /* All RAM memory */\n")
  @Else
    @Write(@ConPath,"at","-xram:\"0000-0000\"         /* Range for XRAM */\n")
    @Write(@ConPath,"at","-define:NO_XRAM=1         /* No XRAM memory */\n")
  @EndIf

  // CONFIGURE MEMORY
  @GetOption  @Prompt = "Compiler Options"
Would you like to configure the memory ranges?  If you do
not want to configure the memory ranges, the installation 
program will use the default settings.  But you can
always go to Configure the Target when you are using the
package.





    @DlgCtrlSize(@Null,7,5,11,25)
    @Option 1201 = "No"
    @Option 1200 = "Yes"
  @EndOption // configure memory

  // CONFIGURE MEMORY
  @If (1201 [= @Option) // Not configure memory
    @Write(@ConPath,"at","-rom:\"0000-@ROMValue\"   /* ROM memory when not using all RAM */\n")
    @Write(@ConPath,"at","-rdata:\"20-@RAMValue\"   /* RAM memory when not using all RAM*/\n")
  @ElseIf (1200 [= @Option) // Yes, configure memory
    @If (1210 [= @Option) // Not all RAM 
      @ROMRange = "0000-01ff"
      @GetString  @ROMRange  @Prompt = "Compiler Options ([Enter] = @ROMRange)"
Please specify the address range (base 16) for ROM.
        @DlgCtrlSize(@Null,@PathNameRow,@BaseCol,(@PathNameRow+1),@RightCol)
      @EndString
      @Write(@ConPath,"at","-rom:\"@ROMRange\"        /* ROM memory */\n")
    @EndIf
  @EndIf // configure memory

  // IF EXTERNAL DATA LINES
  @If (1210 [= @Option) // NO external RAM
    @A12A15 = "EXT"
    @A8A11  = "EXT"
    @AD0AD7 = "EXT"
  @ElseIf (1211 [= @Option) // Yes external RAM
    // SET A12A15
    @GetOption  @Prompt = "Compiler Options"
Choose to set the address lines 12 to 15 of the Port 0-1.
      @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+@YesNoRowConst),(@BaseCol+@YesNoColConst))
      @Option 1310 = "Input"
      @Option 1311 = "Output"
      @Option 1312 = "External"
    @EndOption
    @If (1310 [= @Option)
      @A12A15 = "INPUT"
    @ElseIf (1311 [= @Option)
      @A12A15 = "OUTPUT"
    @ElseIf (1312 [= @Option)
      @A12A15 = "EXT"
    @EndIf // set a12a15

    // SET A8A11
    @GetOption  @Prompt = "Compiler Options"
Choose to set the address lines 8 to 11 of the Port 0-1.
      @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+@YesNoRowConst),(@BaseCol+@YesNoColConst))
      @Option 1320 = "Input"
      @Option 1321 = "Output"
      @Option 1322 = "External"
    @EndOption
    @If (1320 [= @Option)
      @A8A11  = "INPUT"
    @ElseIf (1321 [= @Option)
      @A8A11  = "OUTPUT"
    @ElseIf (1322 [= @Option)
      @A8A11  = "EXT"
    @EndIf // set a8a11

    // SET AD0AD7
    @GetOption  @Prompt = "Compiler Options"
Choose to set the address lines 0 to 7 of the Port 0-1.
      @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+@YesNoRowConst),(@BaseCol+@YesNoColConst))
      @Option 1330 = "Input"
      @Option 1331 = "Output"
      @Option 1332 = "External"
    @EndOption
    @If (1330 [= @Option)
      @AD0AD7 = "INPUT"
    @ElseIf (1331 [= @Option)
      @AD0AD7 = "OUTPUT"
    @ElseIf (1332 [= @Option)
      @AD0AD7 = "EXT"
    @EndIf // set ad0ad7
  @EndIf // if external data lines

  // EXTERNAL MEMORY TIMING
  @GetOption  @Prompt = "Compiler Options"
Would you like extended external memory timing?
    @DlgCtrlSize(@Null,@YesNoRow,@BaseCol,(@YesNoRow+@YesNoRowConst),(@BaseCol+@YesNoColConst))
    @Option 1401 = "Yes"
    @Option 1400 = "No"
  @EndOption
  @If (1400 [= @Option)
    @Slow = "%0"
  @ElseIf (1401 [= @Option)
    @Slow = "%20"
  @EndIf // external memory timing

  // BUILD CONFIG.L and CONFIG.S
  @ConfigLargeIncPath = "@OutDrive:@Subdir\\RTL\\SRC\\CONFIG.L"
  @ConfigSmallIncPath = "@OutDrive:@Subdir\\RTL\\SRC\\CONFIG.S"

  // Write all similiar info to LARGE
  @Write(@ConfigLargeIncPath,"wt","\n")
  @Write(@ConfigLargeIncPath,"at",";CONFIG.INC\n")
  @Write(@ConfigLargeIncPath,"at",";@Name Assembler Configuration File\n")
  @Write(@ConfigLargeIncPath,"at","\n")
  @Write(@ConfigLargeIncPath,"at","\t;\n")
  @Write(@ConfigLargeIncPath,"at","\t; CPU equates\n")
  @Write(@ConfigLargeIncPath,"at","\t;\n")
  @Write(@ConfigLargeIncPath,"at","\t; CMOS\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C00\tEQU\t0\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C06\tEQU\t1\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86L06\tEQU\t2\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C07\tEQU\t3\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C08\tEQU\t4\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C09\tEQU\t5\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C10\tEQU\t6\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C11\tEQU\t7\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C17\tEQU\t8\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C18\tEQU\t9\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C19\tEQU\t10\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C20\tEQU\t11\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C21\tEQU\t12\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C30\tEQU\t13\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C40\tEQU\t14\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C61\tEQU\t15\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C62\tEQU\t16\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C89\tEQU\t17\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C90\tEQU\t18\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C91\tEQU\t19\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C93\tEQU\t20\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C95\tEQU\t35\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C96\tEQU\t21\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C27\tEQU\t22\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86127\tEQU\t23\n")
  @Write(@ConfigLargeIncPath,"at","\tZ86C97\tEQU\t24\n")
  @Write(@ConfigLargeIncPath,"at","\t; NMOS\n")
  @Write(@ConfigLargeIncPath,"at","\tZ8600\tEQU\tZ86C00\n")
  @Write(@ConfigLargeIncPath,"at","\tZ8601\tEQU\t25\n")
  @Write(@ConfigLargeIncPath,"at","\tZ8602\tEQU\t26\n")
  @Write(@ConfigLargeIncPath,"at","\tZ8604\tEQU\t27\n")
  @Write(@ConfigLargeIncPath,"at","\tZ8610\tEQU\tZ86C10\n")
  @Write(@ConfigLargeIncPath,"at","\tZ8611\tEQU\tZ86C11\n")
  @Write(@ConfigLargeIncPath,"at","\tZ8614\tEQU\t28\n")
  @Write(@ConfigLargeIncPath,"at","\tZ8681\tEQU\t29\n")
  @Write(@ConfigLargeIncPath,"at","\tZ8682\tEQU\t30\n")
  @Write(@ConfigLargeIncPath,"at","\tZ8691\tEQU\tZ86C91\n")
  @Write(@ConfigLargeIncPath,"at","\n")
  @Write(@ConfigLargeIncPath,"at","\tTRUE\tEQU\t1\n")
  @Write(@ConfigLargeIncPath,"at","\tFALSE\tEQU\t0\n")
  @Write(@ConfigLargeIncPath,"at","\n")
  @Write(@ConfigLargeIncPath,"at",";\tModel equates\n")
  @Write(@ConfigLargeIncPath,"at",";\n")
  @Write(@ConfigLargeIncPath,"at",";\tLS bit is 1 if stack is to be placed\n")
  @Write(@ConfigLargeIncPath,"at",";\tin internal RAM.\n")
  @Write(@ConfigLargeIncPath,"at",";\n")
  @Write(@ConfigLargeIncPath,"at","\tSMALL\tEQU\t1\n")
  @Write(@ConfigLargeIncPath,"at","\tLARGE\tEQU\t0\n")
  @Write(@ConfigLargeIncPath,"at","\n")
  @Write(@ConfigLargeIncPath,"at","\n")
  @Write(@ConfigLargeIncPath,"at","\tSP\tEQU\t255\n")
  @Write(@ConfigLargeIncPath,"at","\tFP\tEQU\t254\n")
  @Write(@ConfigLargeIncPath,"at","\n")
  @Write(@ConfigLargeIncPath,"at","\tINPUT\tEQU\t0\n")
  @Write(@ConfigLargeIncPath,"at","\tOUTPUT\tEQU\t1\n")
  @Write(@ConfigLargeIncPath,"at","\tEXT\tEQU\t2\n")
  @Write(@ConfigLargeIncPath,"at","\n")
  @Write(@ConfigLargeIncPath,"at",";\tSet to TRUE if the stack pointer is to be initialized\n")
  @Write(@ConfigLargeIncPath,"at",";\n")
  @Write(@ConfigLargeIncPath,"at","\tINITSP\tEQU\tTRUE\n")
  @Write(@ConfigLargeIncPath,"at","\n")
  @Write(@ConfigLargeIncPath,"at",";\n")
  @Write(@ConfigLargeIncPath,"at",";\tSet to TRUE if register ram (c_nearbss) is to be initialized\n")
  @Write(@ConfigLargeIncPath,"at",";\tto 0's.\n")
  @Write(@ConfigLargeIncPath,"at",";\n")
  @Write(@ConfigLargeIncPath,"at","\tCLRRRAM\tEQU\tFALSE\n")
  @Write(@ConfigLargeIncPath,"at","\n")
  @Write(@ConfigLargeIncPath,"at",";\n")
  @Write(@ConfigLargeIncPath,"at",";\tSet to TRUE if external ram (c_farbss) is to be initialized\n")
  @Write(@ConfigLargeIncPath,"at",";\tto 0's.\n")
  @Write(@ConfigLargeIncPath,"at",";\n")
  @Write(@ConfigLargeIncPath,"at","\tCLRXRAM EQU\tFALSE\n")
  @Write(@ConfigLargeIncPath,"at","\n")
  @Write(@ConfigLargeIncPath,"at",";\n")
  @Write(@ConfigLargeIncPath,"at",";\tSet to TRUE if (c_neardata) is to be copied from ROM\n")
  @Write(@ConfigLargeIncPath,"at",";\n")
  @Write(@ConfigLargeIncPath,"at","\tCOPYRRAM EQU\tTRUE \n")
  @Write(@ConfigLargeIncPath,"at",";\n")
  @Write(@ConfigLargeIncPath,"at",";\tSet to TRUE if (c_fardata) is to be copied from ROM\n")
  @Write(@ConfigLargeIncPath,"at",";\n")
  @Write(@ConfigLargeIncPath,"at","\tCOPYXRAM EQU\tTRUE\n")
  @Write(@ConfigLargeIncPath,"at","\n")
  @Write(@ConfigLargeIncPath,"at",";\n")
  @Write(@ConfigLargeIncPath,"at",";\tHeap used - Set to TRUE if the heap is used, otherwise\n")
  @Write(@ConfigLargeIncPath,"at",";\tFALSE. If this value is set to FALSE then _malloc and _calloc\n")
  @Write(@ConfigLargeIncPath,"at",";\tcannot be used.\n")
  @Write(@ConfigLargeIncPath,"at",";\n")
  @Write(@ConfigLargeIncPath,"at","\tHEAP\tEQU \tTRUE\n")

  @Write(@ConfigLargeIncPath,"at","\tCPU\t\tEQU\t@CPUName\n")
  @Write(@ConfigLargeIncPath,"at","\tPROCESSOR\tEQU\t@CPUName\n")
  @Write(@ConfigLargeIncPath,"at","\tA12_A15\t\tEQU\t@A12A15\n")
  @Write(@ConfigLargeIncPath,"at","\tA8_A11\t\tEQU\t@A8A11\n")
  @Write(@ConfigLargeIncPath,"at","\tAD0_AD7\t\tEQU\t@AD0AD7\n")
  @Write(@ConfigLargeIncPath,"at","\tSLOW\t\tEQU\t@Slow\n")

  // Copy LARGE to SMALL
  @Copy(@ConfigLargeIncPath,@ConfigSmallIncPath)

  // Write all model-specific info
  @Write(@ConfigLargeIncPath,"at","\tMODEL\t\tEQU\tLARGE\n")
  @Write(@ConfigSmallIncPath,"at","\tMODEL\t\tEQU\tSMALL\n")
  // build config.l and config.s

@EndIf // z8 specific config file items

@EndIf // End SendCompiler con files modification

// BLANK DEFINEDISK FOR DDB
@DefineDisk
	@Label = "Disk 1"
	@BeginLib FILES.001
		@File SIO.C @Size 817 @Out RTL\SRC\SIO.C
		@File STARTUP.ASM @Size 3126 @Out RTL\SRC\STARTUP.ASM
		@File PZ8.EXE @Size 343635 @Out BIN\PZ8.EXE
		@File P2.EXE @Size 65137 @Out BIN\P2.EXE
		@File P1.EXE @Size 213499 @Out BIN\P1.EXE
		@File Z8SIM.EXE @Size 94720 @Out BIN\Z8SIM.EXE
		@File Z8ICEBX.EXE @Size 75264 @Out BIN\Z8ICEBX.EXE
		@File Z8ICEBX.TXT @Size 1624 @Out BIN\Z8ICEBX.TXT
		@File Z8ICEBX.DAT @Size 227 @Out BIN\Z8ICEBX.DAT
		@File Z8CFG.O @Size 2048 @Out BIN\Z8CFG.O
		@File Z8EM_C50.O @Size 2944 @Out BIN\Z8EM_C50.O
		@File Z8EM_CCP.O @Size 3456 @Out BIN\Z8EM_CCP.O
		@File Z8EM_MON.O @Size 1792 @Out BIN\Z8EM_MON.O
		@File ICEBOX.DLL @Size 7680 @Out BIN\ICEBOX.DLL
		@File C1ERRORS.DAT @Size 5973 @Out BIN\C1ERRORS.DAT
		@File COMPASS.HLP @Size 1023285 @Out BIN\COMPASS.HLP
		@File COMPASS.DLL @Size 62768 @Out COMPASS.DLL
		@File BUG.GEN @Size 5463 @Out BIN\BUG.GEN
		@File BUG640.SF @Size 13211 @Out BIN\BUG640.SF
		@File BUG800.SF @Size 13189 @Out BIN\BUG800.SF
		@File BUG800.LF @Size 13209 @Out BIN\BUG800.LF
		@File BUG1024.SF @Size 13189 @Out BIN\BUG1024.SF
		@File BUG1024.LF @Size 13186 @Out BIN\BUG1024.LF
		@File BUG1280.SF @Size 13190 @Out BIN\BUG1280.SF
		@File BUG1280.LF @Size 13188 @Out BIN\BUG1280.LF
		@File FPDUMYS.OBJ @Size 4412 @Out RTL\FPDUMYS.OBJ
		@File FPDUMYL.OBJ @Size 5904 @Out RTL\FPDUMYL.OBJ
		@File STARTUPL.OBJ @Size 1175 @Out RTL\STARTUPL.OBJ
		@File STARTUPS.OBJ @Size 1161 @Out RTL\STARTUPS.OBJ
		@File STARTUP.OBJ @Size 1093 @Out RTL\STARTUP.OBJ
		@File STDLIB.H @Size 4439 @Out INCLUDE\STDLIB.H
		@File FORMAT.H @Size 4297 @Out INCLUDE\FORMAT.H
		@File STRING.H @Size 4313 @Out INCLUDE\STRING.H
		@File STDIO.H @Size 3391 @Out INCLUDE\STDIO.H
		@File FLOAT.H @Size 2529 @Out INCLUDE\FLOAT.H
		@File Z8.H @Size 3300 @Out INCLUDE\Z8.H
		@File MATH.H @Size 1682 @Out INCLUDE\MATH.H
		@File LIMITS.H @Size 1563 @Out INCLUDE\LIMITS.H
		@File STDDEF.H @Size 1160 @Out INCLUDE\STDDEF.H
		@File STDARG.H @Size 977 @Out INCLUDE\STDARG.H
		@File CTYPE.H @Size 927 @Out INCLUDE\CTYPE.H
		@File SETJMP.H @Size 897 @Out INCLUDE\SETJMP.H
		@File ERRNO.H @Size 824 @Out INCLUDE\ERRNO.H
		@File ASSERT.H @Size 809 @Out INCLUDE\ASSERT.H
		@File SIO.H @Size 720 @Out INCLUDE\SIO.H
		@File MESSAGE.C @Size 3776 @Out SAMPLE\MESSAGE.C
		@File ADJUST.C @Size 4187 @Out SAMPLE\ADJUST.C
		@File COUNT.C @Size 2005 @Out SAMPLE\COUNT.C
		@File MESSAGE.H @Size 1145 @Out SAMPLE\MESSAGE.H
		@File ADJUST.H @Size 1324 @Out SAMPLE\ADJUST.H
		@File STRNG.H @Size 1113 @Out SAMPLE\STRNG.H
		@File COUNT.H @Size 693 @Out SAMPLE\COUNT.H
		@File Z8LINK.EXE @Size 276627 @Out Z8LINK.EXE
		@File BBS.TXT @Size 2774 @Out BBS.TXT
		@File README.TXT @Size 2423 @Out README.TXT
		@File ASSEMBLE.TXT @Size 5250 @Out ASSEMBLE.TXT
		@File DEBUGGER.TXT @Size 6504 @Out DEBUGGER.TXT
		@File COMPILER.TXT @Size 6161 @Out COMPILER.TXT
		@File RELEASE.TXT @Size 5769 @Out RELEASE.TXT
		@File Z8IDE.INI @Size 1463 @Out Z8IDE.INI
		@File Z8ASM.EXE @Size 253335 @Out Z8ASM.EXE
		@File Z8BUG.EXE @Size 381952 @Out Z8BUG.EXE
	@EndLib
@EndDisk


@DefineDisk
	@Label = "Disk 2"
	@BeginLib FILES.002
		@File Z8BUG.EXE @AppendTo Z8BUG.EXE
		@File Z8IDE.EXE @Size 396800 @Out Z8IDE.EXE
	@EndLib
@EndDisk

@Goto FINISH

ABORT: // an unexpected error
@Display
  @If (@Platform == @MSWindows)
    @Backgroundmode(3,@Red,@Black)
  @EndIf // Platform is Windows, set background
ERROR: An unexpected error has occurred in the installation program.

Please re-install @Name.
  @Abort
@EndDisplay // an unexpected error

FINISH:
@Finish

@If (@SendAssembler != 0)
  // IDE INI FILE
  // HELP FILES
  @Copy("@OutDrive:@SubDir\\@IDEINIFileName","@WindowsDrive:@WindowsDir\\@IDEINIFileName")
  @Rename("@OutDrive:@SubDir\\@IDEINIFileName","DEFAULT.INI")

  // There's no on-line help for C24 and 462 yet  
  @If ((@TargetID != @C24) && (@TargetID != @462) && (@TargetID != @X39))
    @Copy("@OutDrive:@SubDir\\COMPASS.DLL","@WindowsDrive:@WindowsDir\\COMPASS.DLL")
    @SetINI("Help Files", "IDE...", 
      "@OutDrive:@SubDir\\BIN\\@IDEHelpFileName", 
      "@IDEINIFileName")
    @SetINI("Help Files", "Assembler...", 
      "@OutDrive:@SubDir\\BIN\\@AssemblerHelpFileName", 
      "@IDEINIFileName")
    @SetINI("Help Files", "Linker...", 
      "@OutDrive:@SubDir\\BIN\\@LinkerHelpFileName", 
      "@IDEINIFileName")
    @SetINI("Help Files", "Librarian...", 
      "@OutDrive:@SubDir\\BIN\\@LibrarianHelpFileName", 
      "@IDEINIFileName")
  @EndIf
  @If ((@TargetID == @251) && (@SendBench == 1))
    @SetINI("Help Files", "Benchmark Tutorial...", 
      "@OutDrive:@SubDir\\BIN\\QT.HLP", 
      "@IDEINIFileName")
  @EndIf
  // 8051 SPECIFIC INI FILE INFO
  @If ((@TargetID == @MCS51FX) || (@TargetID == @MCS51GB))
  // IF USER HAS APBUILDER
    @If (@Exists("@WindowsDrive:@WindowsDir\\APBLDR.INI"))
      // EXTENTIONS
      @ExtINIPath = "@WindowsDrive:@WindowsDir\\APBLDR.INI"
      @SetINI("Extensions", "ApBUILDER", 
        "@ExtINIPath,ApBUILDER,@OutDrive:@SubDir\\BIN\\APBLDR.BMP", 
        "@IDEINIFileName")
      // extentions

      // HELP EXTENTIONS
      @ExtHelpINIPath = "@WindowsDrive:@WindowsDir\\APMANUAL.INI"
      @SetINI("Help Extensions", "@Ext1HelpName", 
              "@ExtHelpINIPath,@Ext1HelpINISection", "@IDEINIFileName")
      @SetINI("Help Extensions", "@Ext2HelpName", 
              "@ExtHelpINIPath,@Ext2HelpINISection", "@IDEINIFileName")
      // help extentions
    @EndIf // if user has apbuilder
    
    @SetINI("Help Files", "Project Builder Tutorial...", 
      "@OutDrive:@SubDir\\BIN\\@PBHelpFileName", 
      "@IDEINIFileName")
  @EndIf // 8051 specific ini file info

  @Cls 
The installation program has created a @IDEINIFileName file in your
Windows directory. 
  @Pause
@EndIf // End Assembler INI file update

@If (@SendCompiler != 0 || @TargetID == @251)
  // No Quick Tutorial for C24 and X39
  @If ((@TargetID != @C24) && (@TargetID != @X39))
    @SetINI("Help Files", "Quick Tutorial...",
       "@OutDrive:@SubDir\\BIN\\@QTHelpFileName",
       "@IDEINIFileName")
  @EndIf
  // No on-line help for C24 yet
  @If ((@TargetID != @C24) && (@TargetID != @X39))
    @SetINI("Help Files", "Compiler...", 
       "@OutDrive:@SubDir\\BIN\\@CompilerHelpFileName",
       "@IDEINIFileName")
  @EndIf
@EndIf

@If (@SendDebugger != 0)
  @If ((@TargetID != @C24) && (@TargetID != @X39))
    @SetINI("Help Files", "Debugger...", 
      "@OutDrive:@SubDir\\BIN\\@DebuggerHelpFileName",
      "@IDEINIFileName")
  @EndIf
  @If (@TargetID == @X39)
    @SetINI("L39","Comm Port",@PortName,"@IDEINIFileName")
    @SetINI("D39","Comm Port",@PortName,"@IDEINIFileName")
    @SetINI("C40","Comm Port",@PortName,"@IDEINIFileName")
  @EndIf
@EndIf

@If (@EvaluationRelease==@True)
  @SetINI("Contact","Company",@Company,"@IDEINIFileName")
  @SetINI("Contact","Address line 1",@Address1,"@IDEINIFileName")
  @SetINI("Contact","Address line 2",@Address2,"@IDEINIFileName")
  @SetINI("Contact","Address line 3",@Address3,"@IDEINIFileName")
  @SetINI("Contact","Address line 4",@Address4,"@IDEINIFileName")
  @SetINI("Contact","Phone 1",@Phone1,"@IDEINIFileName")
  @SetINI("Contact","Phone 2",@Phone2,"@IDEINIFileName")
  @SetINI("Contact","Phone 3",@Phone3,"@IDEINIFileName")
  @SetINI("Contact","Phone 4",@Phone4,"@IDEINIFileName")
@EndIf

@If (@SendAssembler != 0)
  // ide ini file

  // Z8 LIBRARIES
  @If (@TargetID == @Z8)
    @If (1020 [= @Option)
      @Copy(@ConfigSmallIncPath,"@OutDrive:@SubDir\\RTL\\SRC\\CONFIG.INC")
    @ElseIf (1023 [= @Option)
      @Copy(@ConfigLargeIncPath,"@OutDrive:@SubDir\\RTL\\SRC\\CONFIG.INC")
    @EndIf
  @EndIf 
  // Z8 libraries

  @If (@Platform == @MSWindows)
    @If (@TargetID==@8051)
      // 8051 have the COMPASS Q&A file
      @ProgramManager("[CreateGroup(@GroupName)][AddItem(@Item1)][AddItem(@Item2)][AddItem(@Item3)][AddItem(@Item4)][ShowGroup(@GroupName)]")
    @ElseIf (@TargetID==@462 || @TargetID==@X39)
      // No on-line for 462 yet
      @ProgramManager("[CreateGroup(@GroupName)][AddItem(@Item1)][AddItem(@Item4)][ShowGroup(@GroupName)]")
    @Else
      @ProgramManager("[CreateGroup(@GroupName)][AddItem(@Item1)][AddItem(@Item3)][AddItem(@Item4)][ShowGroup(@GroupName)]")
    @EndIf
  @EndIf // Platform is Windows, create group window and icons
  @Cls
Be sure to reboot your computer so the environment variable and path are
correctly set before running @Name.

NOTE:

If @Name does not detect the environment variables, then try moving the
PLC environment variables toward the top of your AUTOEXEC.BAT file.  The
new PLC statements may have been placed at the end of your AUTOEXEC.BAT
file.  This can cause a problem if the new PLC statements were placed
after other programs that "take control" and ignore the new statements. 
  @Pause
  // Display README.TXT
  @If (@Platform == @MSWindows) // Platform is Windows, use Windows NotePad
    @WinExec("@WindowsDrive:@WindowsDir\\NotePad @OutDrive:@SubDir\\README.TXT",3)
    @Cls
  @Else // Platform is DOS, use DOS type command
    @System("TYPE @OutDrive:@SubDir\\README.TXT | MORE")
  @EndIf // Display README.TXT
The installation program has executed the @DisplayMethod in
order to display README.TXT, a "read me" file containing important
information about @Name.

Once the installation is complete, take a moment to read or print out
this file, which is located in the following path on your computer:

@Outdrive:@Subdir\README.TXT
  @Pause
EOF:  // end of file
@EndIf // End of assembler options
@EndFinish

//======= End of File IDE2.DAT =======
