Integrated Editor/Compiler Environment

The ASIC integrated environment lets you edit, save, compile, and debug your ASIC programs without ever leaving ASIC! This chapter will explain the usage of the integrated environment.ASIC IDE

ASIC SCREEN CONTENTS

ASIC divides the screen into three parts. The top line is called the "Menu Bar". All of the menus available to you are listed on this line. The bottom line is called the "Status Line". It continuously displays some important program information. The middle 23 lines are the "Edit Window".
This is the section of the screen where you can make changes or additions to your program.

MENU BAR PROCESSING

Currently, there are five menus available. The "File" menu allows you to load/save your existing program files to/from disk. It is also used to exit ASIC. The "Edit" menu contains various editing commands which are available. The "Compile" menu is used to compile your program, set compiler options, and to view compiler errors. The "Run" menu allows you to run your programs, and test them using the ASIC debugger. The "Help" menu provides help in using ASIC.

To open a menu, hold down the <ALT> key and type the first letter of the menu. The menu will pop down and display the options available on that menu. If you want to close the menu without taking any action, press the <ESC> key. If you wish to open a different menu without first closing the current menu, press the left or right arrow keys.

Otherwise, to select an option, type the capitalized letter of the menu option. For example, on the "File" menu, to select the "eXit" option, type an "X" or an "x". Another way to select an option is to move the "Highlighted Bar" down to the option you wish to select, and press the <enter> key.

Some functions may be accessed outside of the menus with short cut keys.
For example, the "eXit <ALT-X>" function in the file menu can be selected by holding down the ALT key and tapping the "x" key. The short cut keys are listed on the menus following the option name (they are enclosed in brackets as in <F2> or <ALT-X>). Not all menu options have short cut keys. Note that these short cut keys do not operate when a menu is open. (A list of these short cut keys is presented later in this chapter in the Keyboard Usage Section).

MOUSE USAGE

If you are familiar with other Mouse Programs, such as Microsoft Windows, you will find that you will use the mouse in much the same way in ASIC.

Menus can be opened by moving the mouse pointer to a menu name on the menu bar, and clicking the left mouse button. Once the menu is open you can select an option by positioning the mouse pointer on the desired option, and clicking the left mouse button. To close a menu without selecting an option, click the right button.

A new feature added to several screens, is the "scroll bar". Scroll bars let you scroll through lists of items in screen window. A vertical scroll bar appears on the right side of the main editor window (and on the file open, save, and some help screens). At the top of the scroll bar is a small arrow that points upwards. At the bottom of the scroll bar is a small arrow that points downwards. Between the two arrows is a small square, called a slider.

At the bottom of the main edit window there is also a horizontal scroll bar, that lets you scroll the edit buffer left and right.

To use the scroll bar, click the left mouse button on one of the arrows to scroll the contents of a window by one line. Click on the shaded area between the arrows to scroll a page at a time. You can also "drag" the slider to any position on the scroll bar to scroll the window to the same relative position. To drag the slider, position the mouse pointer on the slider, hold down the left mouse button, and move the mouse pointer to the desired position on the scroll bar. Once at the desired position, release the mouse button.

To select a block of text in the editor, position the mouse pointer on the first line in the block you wish to select. Press and HOLD the left mouse button until the first line is highlighted. Continue holding the left mouse button down, and drag the mouse pointer to the ending line of the block. When you reach the last line you want to include in the block, release the left mouse button.

When responding to dialog box messages, the left mouse button is the same as pressing <ENTER>, and the right mouse button is the same as press the <ESC> key.

To get context sensitive help for menu options or ASIC keywords, press and briefly HOLD the right mouse button.

To position the keyboard cursor, move the mouse pointer to the desired location in the edit window, and click the left mouse button. The cursor will move to the mouse pointer location.

EDITOR COMMAND LINE OPTIONS

When you start ASIC, you may optionally specify a number of command line arguments. The command line syntax for ASIC is:
ASIC [filename] [/MONO] [/NOMOUSE]

Options shown in brackets "[]" are optional. Don't type the brackets.

filename  The filename parameter is used to specify a program that ASIC should load into the edit buffer when starting up.

/MONO     This option instructs ASIC to run in Black and White, even if a color graphics card is detected.
          This option is useful for laptops with B/W screens.

/NOMOUSE  This option instructs ASIC to ignore the Mouse.  ASIC will not attempt to detect or use your Mouse.

Examples of ASIC command lines:
ASIC LIFE.ASI
ASIC LIFE.ASI /MONO
ASIC LIFE /NOMOUSE
ASIC LIFE /MONO /NOMOUSE


GETTING HELP

ASIC provides "online" help within the integrated environment to assist you
with keyboard usage, menu options, and ASIC keywords. This section tells
you how to access this online help.

General Help

Keyboard, keyword syntax, and ASCII character codes help is available from
the Help Menu. Open the Help menu by holding down the <alt> key and
pressing the "h" key. You can also directly display keyboard help by
pressing <F1>.

MOUSE USERS: You can select help by positioning the mouse pointer on the "Help" Menu on the menu bar, and clicking the left mouse button.

Menu Help

If you open a menu, but you are not sure what a certain menu option does,
you may display a description of the highlighted menu option by pressing
the <F1> key. Doing so will open a help window which describes the menu
option. Press <ESC> to exit the help screen and return to the menu.

MOUSE USERS: You can get help for a menu option with the mouse as follows.
 Position the mouse pointer on the menu option, and press and briefly HOLD the right mouse button.


Keyword Help

Can't remember the syntax for a particular ASIC keyword? Well, help is
just a keystroke away. Position the cursor on the keyword in the edit
buffer. Then, hold down the <Ctl> key and press the <F1> key. ASIC will
display a description of the keyword, and describe proper syntax for that
keyword. For example, if you tried to compile a program, but received a
syntax error on the keyword "PRINT" in your program, you could obtain help
on the "PRINT" statement by using the arrow keys to position the cursor
anywhere on the word "PRINT" and then pressing <Ctl-F1>. If ASIC cannot
find the keyword (e.g., say the cursor was positioned on a variable called
"APPLES", which is not an ASIC keyword), then ASIC will display a list of
valid keywords. Use the cursor keys to highlight one of these keywords and
press <enter> to retrieve help for the highlighted keyword. You may also
access this keyword help list by pressing the <F1> key twice from within
the editor, or by selecting the "Keyword Index" option from the Help Menu.

MOUSE USERS: You can also get keyword help using the mouse.
Position the mouse pointer on the keyword, and press and briefly HOLD the right mouse button.

FILE MENU

"New" Option

This option allows you to clear the edit buffer and create a new program.

"Open... <F3>" Option

This option allows you to open an existing ASIC file and load it into the ASIC edit buffer where you can modify it. If you select this option another window will open to ask you the file name. If you don't wish to open a file, you can press <ESC> to close the menu without taking any action. Otherwise, enter an ASIC file name, and press the <enter> key. If the file already exists, you can also select the file name from the list displayed, by using the arrow keys or mouse to scroll through the list of file names. To select a file from the list, press <ENTER>, or position the mouse pointer on the file name, and click the left mouse button. This option may also be selected outside of the menu by pressing the <F3> key.

"Convert..." Option

This option will allow you to convert a GWBASIC program to ASIC format. When you select this option, a file dialog box will be displayed showing all files with ".BAS" extensions in the ASIC directory. Enter filename of the file to be converted, and press <enter>. You can also select the file name from the list displayed, by using the arrow keys or mouse to scroll through the list of file names. To select a file from the list, press <ENTER>, or position the mouse pointer on the file name, and click the left mouse button. The file will be converted to a file with the same name, but with a ".ASI" extension. Note: The file must have been saved by GWBASIC in ASCII format (i.e., SAVE "filename.BAS",A).

"coMments include" Option

When converting a GWBASIC program to ASIC format, if this option is set, ASIC will include the original program source lines in the converted file as comments. When this option is set, a small checkmark will appear at the left of the option name.

"Warnings include" Option

Set this option if you want ASIC to generate helpful warnings when
converting GWBASIC programs to ASIC format. When this option is set, a
small checkmark will appear at the left of the option name.

"Errors include" Option

Set this option if you want ASIC to generate error messages for unconverted
statements, when converting GWBASIC programs to ASIC format. When this
option is set, a small checkmark will appear at the left of the option
name.

"Dos shell" Option

This option allows you to temporarily exit to MS DOS to execute one or more
DOS commands or other programs. When you are ready to return to ASIC, type
EXIT <enter>.

"Save <F2>" Option

This option allows you to write the changes you've made to your program
back to the file. Changes you enter in the ASIC editor are made to memory
only. You must select this option before your changes will become
permanent. Note: Your file is saved to disk automatically whenever you
compile it or run it, if the file has been modified. This option may also
be selected outside the menu by pressing the <F2> key.

"save As..." Option

This option will allow you to write the changes you've made to the program
in the edit buffer to a new file. You will be prompted to provide ASIC
with a new file name. If you want to overlay an existing file, you can
select the file name from the list displayed by using the arrow keys or
mouse to scroll through the list of file names. To select a file from the
list, press <ENTER>, or position the mouse pointer on the file name, and
click the left mouse button. BE CAREFUL--WHEN YOU SELECT A FILE FROM THE
LIST, YOU ARE TELLING ASIC TO OVERLAY AN EXISTING FILE.

"auto Indent" Option

When this option is selected, ASIC will automatically position the cursor
on inserted lines in the same column as the first non-blank character in
the preceding row. When this option is set, a small checkmark will appear
at the left of the option name. When this option is not selected, ASIC
will position the cursor on inserted lines in column 1.

"eXit <Alt-X>" Option

This option will allow you to exit from ASIC back to MS DOS. ASIC will ask
you if you wish to save your file before you exit. This option may be
selected outside this menu by pressing <ALT-X>.

EDIT MENU

"Begin block" Option

This option will allow you to mark the beginning of a block of text for use with the block delete, copy, and move commands. To mark a block of text, move the cursor to the first line of the block, and then select this
option. The beginning line of the block will be highlighted on the screen.
Next, move the cursor to the ending line of the block, and select the "End block" option from this menu. All of the lines in the block will be highlighted. This block of lines can now be "moved", "copied", or "deleted" using the block commands. If you have a mouse, you can select text without using the "Begin Block" and "End Block" options. To select a block of text with the mouse, position the mouse pointer on the first line in the block, press and HOLD the left mouse button until the line is highlighted, and (while continuing to hold down the left mouse button) drag the mouse pointer to the ending line of the block. Once you reach the ending line of the block, you may release the left mouse button. The block should be highlighted on the screen.

"End block" Option

This option will allow you to mark the end of a block of text. Refer to
the "Begin block" Option for more information.

"Search..." Option

This option allows you to locate a string of characters in the edit buffer.
When you select this option, ASIC will ask you for a search string which
can be up to 30 characters in length. ASIC will then search forward from
the current line until it finds the string or reaches the end of the edit
buffer. If it finds the string, the cursor will be placed on the line
containing the string.

"Replace..." Option

This option will allow you to replace one or more occurrences of a string
of characters with another set of characters. When you select this option,
ASIC will ask you for a search string which can be up to 30 characters in
length. ASIC will then ask you for the string of characters which is to
replace the search string. Finally, ASIC will ask you to specify how many
occurrences of this search string are to be replaced (from 1-9999). ASIC
will search forward from the current line, and briefly display each line as
it modifies it. If it reaches the end of the edit buffer before it has
replaced the number of occurrences you've specified, ASIC will display an
"End of Buffer" message, and stop.

"Delete block" Option

This option will delete a block of lines. Refer to the "Begin block"
option for information on marking a block of lines. If you haven't marked
a block of lines, selecting this option will have no effect.

"Move block" Option

This option will move a block of lines to a new location in the edit
buffer. Refer to the "Begin block" option for information on marking a
block of lines. If you don't mark a block of lines, selecting this option
will have no effect. Once you have marked a block of lines, move the
cursor to the location in the edit buffer where you want the lines moved.
Selecting the "Move block" option will result in the block of lines being
deleted from their current location, and moved to the buffer at the line
following the cursor. ASIC will not overlay lines, it will insert enough
blank space to hold the relocated text.

"Copy block" Option

This option is the same as the "Move block" option, with one exception.
After moving the block, ASIC does NOT delete the original block of lines.
Use this option to clone a block of text. Refer to the "Begin block"
option for information on marking a block of text.

"search Again <CTL-L>" Option

This option will allow you to search for the next occurrence of the last
string you searched for with the "Search" Option, without retyping the
previous search string. This option may also be selected outside of the
Edit Menu by pressing <CTL-L>

COMPILE MENU

"Compile program <F10>" Option

Use this option to have ASIC compile the program which is currently loaded in the edit buffer. If the compile is successful, ASIC will display the
message "No Compiler Errors". Otherwise, it will display the first error message (see "View compile errors" option). ASIC will automatically save
your program before calling the compiler. This option may also be selected outside of the menu by pressing function key <F10>.

"Advanced options" Option

Select this option to bring up a menu of compiler options for the advanced
ASIC user.

"Full program listing" Option

This menu option, and the next six options are used to toggle various
compiler options on or off. When the option is on, you will see a "check
mark" symbol next to the option. This compiler option will cause ASIC to
display each source line as it compiles it. This option will slow down the
compile, but since ASIC also writes these lines to a listing file, this
option can be used to create a compile listing. The compile listing will
be contained in a file called "progname.LST", where "progname" is the name
of your program.

"Printer output" Option

This menu option will toggle the "Printer output" compiler option on or
off. When the option is on, you will see a "check mark" symbol next to the
option name. This compiler option will cause compiler messages to be
printed on your printer.

"Symbol table" Option

This menu option will toggle the "Symbol table" compiler option on or off.
When the option is on, you will see a "check mark" symbol next to the
option name. This compiler option will cause ASIC to create a symbol table
file called "progname.SYM", where "progname" is the name of your program.
The symbol table is a list of all variables, labels, and internally created
compiler addresses.

"Extended math" Option

By default, ASIC will permit regular integer variables. These variables are
very efficient and only require two bytes (or characters) of memory
storage. However, these integers can only hold numbers in the range of -
32767 to +32767. For many programs this is sufficient. However, there may
be cases when you want to represent larger integer values. Because of
this, ASIC provides a "long" integer data type. The long integer requires
four bytes of memory storage. However, it can hold a much larger range of
numbers. A long integer can store numbers in the range of -2,147,483,647
to +2,147,483,647. When you need to use long integers in your program, you
need to turn on this option, so that ASIC can generate the proper code.
When the option is on, you will see a "check mark" symbol next to the
option name. If this option is not turned on and your program contains
long integers, ASIC will generate a compiler error. If this happens, just
turn this option on, and re-compile your program. To "create" a long
integer variable or constant, simply append the "&" character to the
variable name or constant value(e.g., SAMPLEVAR& or 123456&). For further
information on using long integers, refer to Chapter 6, "Language
Elements", of the ASIC Manual.

"decimal Math" Option

Select this option if your program needs to perform decimal math. When the
option is on, you will see a "check mark" symbol next to the option name.
When you select this option, ASIC generates supporting code for your
program which supports the "Decimal" variable type. Decimal variables may
be identified by adding a "@" symbol following the variable name. (e.g.,
BALANCE@). "Decimal" type variables can contain numbers in the range of
+999,999,999,999.99999 to -999,999,999,999.99999. Unlike floating point
numbers in GWBASIC or BASICA, ASIC "Decimal" variables do not exhibit
rounding errors. Full precision is maintained through all 5 decimal places
(digits following the fifth decimal place are truncated). For further
information on using decimal variables, refer to Chapter 6, "Language
Elements", of the ASIC Manual. If this option is not turned on and your
program contains decimal variables or constants, ASIC will generate a
compiler error. If this happens, just turn this option on, and re-compile
your program.

"Debugging code" Option

This menu option will toggle the "Debugging code" compiler option on or
off. When the option is on, you will see a "check mark" symbol next to the
option name. This compiler option will cause ASIC to generate code
required by the ASIC debugger to allow you to set breakpoints, single step
through your program, and view/modify program variables. This option is
"on" by default in the integrated environment. You should leave this
option on while you are debugging your program. When you have everything
working properly, you should turn it "off" and recompile your program.
This will reduce the size of your program slightly, and will make it run
faster (of course, you can't use the debugger with it, since there is no
debugging information available to ASIC any more. If you need to debug
your program again, just recompile with the this option turned "on" again).

"View compile errors" Option

When you wish to examine the errors from a previous compile of your
program, select this option. If no errors exist, ASIC will so inform you.
Otherwise, ASIC will display the first error message at the bottom of the
screen, and it will highlight the line of your program which corresponds to
that error. If you wish to correct the program line, press the <ESC> key.
The cursor will be positioned at the beginning of that program line. You
may also view subsequent compiler errors by pressing the <ENTER> key
instead of the <ESC> key.

"Write options to disk" Option

Writes current compiler options to a file called ASIC.CFG. When you enter
ASIC, ASIC always reads options from this file. Note that when you open a
program, ASIC first checks for a "progname.PRJ" file. The ".PRJ" file ,if
found, will override ASIC.CFG. Since ASIC automatically creates/updates
the ".PRJ" file whenever you save a program, normally the only time that
the ASIC.CFG options will be used is when you enter the editor with a new
file. Once you save a program the first time, ASIC creates the custom
".PRJ" file for the program. Think of the ASIC.CFG file, then, as the
default options for new programs.

ADVANCED OPTIONS

(SUBMENU OF "COMPILE" MENU)
When you select the "Advanced options" option from the "Compile" menu, this
sub-menu will be displayed. These give the advanced programmer the ability
to tell ASIC how to produce the compiler output files.

"Com output file" Option

This option, the "Exe output file", and the "Obj output file" options allow
you to tell ASIC what type of output file to produce when compiling. Only
one of these three options may be selected at the same time. The option
that is currently selected will be preceded with a small dot. This option
is the default option. When you select this option, ASIC will produce a
".COM" output file. This file can contain a maximum of 64k bytes of
program code and data.

"Exe output file" Option

This option, the "Com output file", and the "Obj output file" options allow
you to tell ASIC what type of output file to produce when compiling. Only
one of these three options may be selected at the same time. The option
that is currently selected will be preceded with a small dot. When you
select this option, ASIC will produce a ".EXE" output file. This output
file can contain up to 64k program code, 64k program data, and 64k stack.
ASIC does not produce an intermediate OBJ file, and ASIC uses its internal
linker. Unlike the "Obj output file" option, ASIC does not use the DOS
LINK command to produce the EXE file, and no OBJ file is created when using
this option. Turn this option on when: 1) you want to compile large
programs, 2) you want to minimize the amount of memory required when your
program runs, or 3) you want to adjust the program stack size. The only
drawback to this option, is that the EXE file is slightly larger on disk
than the COM file, and that ASIC only asks DOS for the amount of memory
your program needs. With COM files, DOS gives your program all available
memory. Note: If you compile a program with this option turned off, and
then turn this option on, be sure to recompile your program.

"Obj output file" Option

This option, the "Exe output file" option, and the "Com output file" option
allow you to tell ASIC what type of output file to produce when compiling.
Only one of these three options may be selected at the same time. The
option that is currently selected will be preceded with a small dot. When
you select this option, ASIC will produce a ".OBJ" output file that is in
the standard MS DOS LINK format. This file is not directly executable.
First, it must be "LINK"ed into a ".EXE" file. ASIC will attempt to call
the MS DOS LINK program for you. To do so, it must be able to locate the
"LINK.EXE" program (provided with MS DOS). It will search for this file in
the current directory, and the "C:\DOS" subdirectory. If it can't find the
file there, it will not be able to link your program. ASIC does provide a
new option, to let you specify the location of the LINK.EXE program (see
"Link.EXE path" option). You may be wondering why you'd want to go through
all of the bother of using this option, when you could create an EXE file
directly using the "EXE output file" option. Well, normally you will want
to use the "EXE output file" option. But, the "OBJ output file option
provides one important advantage. Using this option, you can use the CALL
SUB statement in your programs, and you can tell ASIC to link in other OBJ
files (created with ASIC or an assembler) with your ASIC program. See
chapter 10 of the ASIC manual for more information. Also, refer to the
"obJect names..." option, the "liBrary name..." option, and the "Link.exe
path..." option on this same menu.

"Stack size..." Option

This option will allow you to adjust the size of the stack that ASIC
generates for your program. When you select this option, you will be
prompted for the number of bytes to allocate to the stack in your program.
If you select a number that is too small for your program's needs, the
results when you attempt to run your program will be unpredictable. The
ASIC defaults are 2000 bytes (4000 bytes in debugging mode). Note that if
you compile with debugging mode on and specify a stack size of less than
4000 bytes, ASIC will ignore your stack size and continue to use 4000
bytes. This option has no effect when you are using the "Com output file"
option.

"obJect names..." Option

This option allows you to identify other object file names that ASIC should
pass to the DOS LINK.EXE program. This option is ignored by the compiler
unless you are compiling with the "Obj output file" Option. When you
select this option, ASIC will prompt you for a list of object names. Each
object file name should be separated from each other by a "+" sign. For
example, to identify OBJECT1.OBJ and OBJECT2.OBJ you would enter:
OBJECT1.OBJ+OBJECT2.OBJ for the object names. Since the LINKer expects the
file extensions to be ".OBJ", you can omit the extension as long as it is
".OBJ". For example, we could have entered: OBJECT1+OBJECT2. By default,
the linker will assume that the object files will be in the current
directory, so if they're somewhere else, be sure to include the full path,
as in: C:\OBJECT\OBJECT1+C:\OBJECT\OBJECT2. Refer to Chapter 10 of the
ASIC Manual for more information.

"liBrary names..." Option

This option allows you to identify object program libraries (such as those
built with the Microsoft LIB command) that ASIC should pass to the DOS
LINK.EXE program. This option is ignored by the compiler unless you are
compiling with the "Obj output file" Option. When you select this option,
ASIC will prompt you for a list of library file names. Each library file
name should be separated from each other by a "+" sign. For example, to
identify LIB1.LIB and LIB2.LIB you would enter: LIB1.LIB+LIB2.LIB for the
library names. Since the LINKer expects the file extensions to be ".LIB",
you can omit the extension as long as it is ".LIB". For example, we could
have entered: LIB1+LIB2. By default, the linker will assume that the
library file will be in the current directory, so if the libraries are
elsewhere, be sure to include the full path, as in:
C:\LIB\LIB1+C:\LIB\LIB2 for example. Refer to Chapter 10 of the ASIC
Manual for more information.

"Link.exe path..." Option

This option is used to tell ASIC where to find the MS DOS LINK.EXE program.
This option is ignored by the compiler, unless you are using the "Obj
output file" Option. When you use the "Obj output file" Option, ASIC
utilizes the LINK.EXE program, which is provided with MS DOS, to link your
ASIC program and additional object files into an MS DOS EXE file. If you
do not provide a path, ASIC will attempt to find LINK.EXE under the current
directory, and under the "C:\DOS" directory (if applicable). If it can't
find the program in either place, the EXE file will not be built. When you
select this option, you will be prompted to enter the directory in which
ASIC may find the LINK.EXE program. For example, if you determined that
the LINK.EXE program is stored under "C:\UTIL" on your hard disk, you would
enter: C:\UTIL for this option. On future compiles, ASIC will look for
the LINK.EXE file in the "C:\UTIL" directory. Instead of using this
option, you may also copy the LINK.EXE file to your ASIC directory.

RUN MENU

The "Using the ASIC Debugger" Chapter has additional information on the
debugger and it's options. You may wish to refer to it, should you need
more information than is provided below.

"Run your program <F5>" Option

After you have successfully compiled your program, you can select this option to cause ASIC to load and execute your program. After your program ENDs, ASIC will return you to the editor. ASIC will save the edit buffer before loading and executing your program. If you are running a program containing debugging code, this option will cause ASIC to run your program up to the first breakpoint it encounters, or through the end of your program if you haven't set any breakpoints. If you are already "paused" at a breakpoint, selecting this option will cause your program to resume execution at the statement following the breakpoint, and run up to the next breakpoint or to the end of your program, if no further breakpoints are encountered. This option may also be selected outside of the "Run menu" by pressing function key <F5>.

"Breakpoint toggle <F9>" Option

If you have compiled your program with the "Debugging code" option turned
on, you may use this option to set breakpoints. You can have up to 20
breakpoints active at a time. When you run your program with breakpoints
set, ASIC will pause your program when it tries to execute a line on which
you have set a breakpoint. At this time, you can view or modify variables,
or view the screen output produced by your program. You can then resume
program execution by selecting the "Run your program" option from the run
menu. If you select this option and the current statement in the edit
buffer already has a breakpoint set, then the breakpoint for that source
statement will be removed (toggled off). Lines at which you have set a
breakpoint will be displayed in reverse video. Also, when you run your
program and ASIC stops at a breakpoint, ASIC will display the next line to
execute in reverse video on the second line of the screen with a red
background (underlined if you have a monochrome system). This option may
also be selected outside of the "Run" Menu by pressing function key <F9>.

"Trace <F8>" Option

If you have compiled your program with the "Debugging code" option turned
on, you may use this option to execute your program one statement at a
time. After you select this option, ASIC will execute the next program
statement in your program, and pause, displaying the next line which will
be executed in reverse video with a red background (underlined if you have
a monochrome system). At this time, you can view or modify variables, or
view the screen output produced by your program. You can then resume
program execution by selecting the "Run your program" option from the run
menu, or by selecting the "Trace" option again. This option may also be
selected outside of the "Run" Menu by pressing function key <F8>.

"Modify variable..." Option

If you have compiled your program with the "Debugging code" option turned
on, you may use this option to modify the contents of variables in your
program while your program is paused at a breakpoint or following a "Trace"
command. When you select this option, ASIC will ask you for the variable
name. After you enter the variable name, ASIC will ask you for the new
value to be stored in the variable. If the variable is an array, ASIC will
ask you which element of the array to modify.

"Watch variable... <F6>" Option

If you have compiled your program with the "Debugging code" option turned
on, you may use this option to view the contents of variables in your
program, while your program is paused at a breakpoint or following a
"Trace" command. After you enter the variable name, ASIC will open a
"Watch" window at the bottom of the screen showing you the variable name
and the current value. As you continue execution of your program and reach
a new breakpoint, the values of variables will be updated to reflect their
new values. In this way you can watch the changing values of variables in
your program without inserting "PRINT variablename" statements in your
program. Up to 10 variables may be watched at a time. If you enter a
variable name which is an array, ASIC will ask you which element of the
array you wish to watch. This option may also be selected outside of the
"Run" Menu by pressing function key <F6>.

"Unwatch variable... <F7>" Option

If you have compiled your program with the "Debugging code" option turned
on, you may use this option to remove variables from the "Watch" window
(see previous option). When you select this option, you will be asked for
a variable name to remove from the window. If the variable is an array,
you will also be asked which element of the array. ASIC will then remove
the variable from the watch window, and resize the window accordingly.
Since only 10 variables may be watched concurrently, you may need to remove
variables which are no longer needed from the "Watch" Window using this
command. This option may also be selected outside of the "Run" Menu by
pressing function key <F7>.

"Abort execution" Option

If you are running your program, and it is paused at a breakpoint, you may
select this option to abort the execution of your program. Your program
will be terminated immediately.

"Clear all break/watch" Option

If you have set breakpoints or watch variable options, you may use this
option to remove all of them at once, instead of removing them one at a
time using the "Toggle breakpoint" or "Unwatch variable" options.

"Program arguments..." Option

This option allows you to pass command line arguments to your programs,
which may be retrieved by your program using the COMMAND$ statement. If
you are testing outside the integrated environment, you would normally
specify the command line arguments by typing "progname arguments".
However, in the integrated environment, since ASIC is executing your
program for you, this option is a means to pass the "arguments" to your
program as if they had been typed on the command line following your
program name.

"Swap to user screen <F4>" Option

Whenever ASIC pauses your program at a breakpoint, it saves the screen
created by your program in a memory buffer. You may select this option to
view your program screen output. When you are done viewing your program's
output, press a key to return to viewing the ASIC editor. This function
may also be selected outside the "Run" Menu by pressing the <F4> function
key.

HELP MENU

"General Help <F1> " Option

This option will display general help about using the keyboard. This option can also be accessed outside the Help Menu by pressing the <F1> key.

"Keyword Index" Option

Select this option to obtain help on the use of a specific ASIC keyword.

"ASCII Chart" Option

This option will display a list of ASCII characters and their corresponding
ASCII codes.

"aBout ASIC" Option

This option will display a dialog box containing information about this
version of ASIC.

STATUS LINE

The bottom line of the ASIC screen is called the "Status Line". As it's
name implies, it is used to display various types of status information.
At the left of the status line "FILE: xxxxxxxx.xxx" will display the name
of the file which is currently loaded in the edit buffer. If you haven't
opened a file yet, the file name will be blank.

After the file name is the "File Modified Indicator". If you have entered
any changes in the edit buffer, and have not saved them to disk, an "*"
will appear to indicate this. If the edit buffer has not been modified
since the last save to disk, no "*" will be present.

The next piece of information is "Mode:". Mode will always display one of
two values: "Insert" or "Ovrstr". In "Insert" mode, any characters you
type in the edit buffer will be inserted at the cursor position, and the
characters to the right of the cursor will be shifted to the right by one.
In "Ovrstr" mode, any characters you type in the edit buffer will overlay
(and thus destroy) the character at the cursor position. You can change
back and forth between these two modes by pressing the <INS> key on your
keypad.

To the right of "Mode:" ASIC displays how many thousands of bytes are still
available for use by ASIC. You will see this number decrease as you add
more lines to your programs.

The "Line: nnnn" status indicator, will identify which line of the file is
being displayed. For example, if the display reads "Line: 100", the line
containing the cursor is the 100th line in the file. When ASIC is reading
or writing your program to/from disk, it will display a running total of
the number of records read/written in this field.

The "Row:" and "Col:" numbers identify the relative position of the cursor
within the "Edit Window".

EDIT WINDOW

The edit window is the area of the screen where your program is displayed.
It displays up to 21 lines of your program at a time. You can use the keys
described below to manipulate the text in this window.

KEYBOARD USAGE

Most keys on the keyboard behave in ASIC just as you'd expect. The key
usages which might not be obvious are described here.

<ESC>          Exit from any menu without taking any action.

<TAB>          Move the cursor to the next "tab stop".  Tab stops in
               ASIC are fixed at every fourth column (4,8,12,etc).

<HOME>         Move the cursor to the beginning of the current line.

<END>          Move the cursor to the first blank character following
               the last non-blank character on the current line.

<DEL>          Delete the character at the cursor position.

<INS>          Toggle between Insert and Overstrike Modes.

<PGUP>         Display the previous "page" of the edit buffer.

<PGDN>         Display the next "page" of the edit buffer.

<Ctl-PGUP>     Display the first "page" of the edit buffer.

<Ctl-PGDN>     Display the last "page" in the edit buffer.

<Backspace>    Delete the character to the left of the cursor
               position, and move the cursor one column to the left.
               If the cursor is in column 1, the current line will be
               "joined" with the previous line.

<Up Arrow>     Moves cursor up one line.

<Down Arrow>   Moves cursor down one line.

<Left Arrow>   Moves cursor left one column.

<Right Arrow>  Moves cursor right one column.

<Ctl-LfArrow>  Moves cursor left one word.

<Ctl-RtArrow>  Moves cursor right one word.

<Ctl-L>        Repeats the last "Search" command. See Edit Menu
               Section of this chapter for more information.

<Alt-A>        Add a line following the line containing the cursor.

<Alt-D>        Delete the line containing the cursor.

<Alt-I>        Insert a line before the line containing the cursor.

<Alt-X>        Exit ASIC.

<F1>           Displays a help screen.

<CTL-F1>       Displays help information for the keyword located at
               the cursor position.

<F2>           Saves the edit buffer to disk.

<F3>           Load a new file into the edit buffer.

<F4>           Swaps the display to the output from your program
               temporarily. See Run Menu Section of this chapter for
               more information.

<F5>           Runs your program. See Run Menu Section of this
               chapter for more information.

<F6>           Add a variable to the "Watch" Window. See Run Menu
               Section of this chapter for more information.

<F7>           Remove a variable from the "Watch" Window. See Run
               Menu Section of this chapter for more information.

<F8>           Execute a single statement of your program. See Run
               Menu Section of this chapter for more information.

<F9>           Toggle breakpoint on/off at the current edit buffer
               line. See Run Menu Section of this chapter for more
               information.

<F10>          Compile your program. See Compile Menu Section of
               this chapter for more information.

<enter>        In Insert mode, pressing <enter> is identical to
               pressing <Alt-A>. In OvrStr mode, pressing <enter>
               is identical to pressing the <Down Arrow> key.