• Keine Ergebnisse gefunden

Configuration Sector

Im Dokument User's Guide Version 2 (Upgraded to 2.5) (Seite 181-187)

CHAPTER 21. DUMP COMMAND

23.15 Configuration Sector

A file that has been written with EDIT contains configuration information in the first sector. This sector begins with an octal 003 so that it is invisible to most programs. As a convenience, the tab settings, special characters and modes are contained in, the sector so that these defaults are used the next time the file is edited. If the file has been MOUTed and MINed, for example, the configuration sector is not preserved~

The following describes the contents of the configuration sector. A three-digit integer in parentheses represents an octal byte.

(003)

*

0 0 0 0 0 0 0 0 (015) E D I T <version> (015)

<tab numbers> (015) <bell position> (015)

<tab key> <continue character> <modify replace operator>

<modify insert operator> <modify ~ppend operator>

<key click switch> <shift inversion switch> <word wrap-around switch>

<text mode switch> <expand mode switch)

<scratch file name> <definition file name> (015) (003) where:

<tab numbers>

are decimal integers separated by spaces representing the tab positions and the field lengths. For example, assembler tabs (9,15,30) are represented by "1 896 15 15 30 49 79".

<bell position>

is a decimal number of at most two digi ts.

<tab key>

<continue character>

<modify replace operator>

<modify insert operator>

<modify append operator>

are the actual ASCII characters.

<key click switch>

is "N" if off and "K" if the click option is on.

CHAPTER 23. EDIT 23-43

<shift inversion switch>

is "N" if no shift inversion and " " if shift inversion is on.

<word wrap-around switch>

is

"w"

for word-wrap and "N" for word-wrap off.

<text mode switch>

is "T" if text mode (spaces not automatically generated

following a plus, asterisk or period in the first column) or

"N" if not.

<expand mode switch>

is "E" when space compression is inhibited and

"N"

if space compression is desired.

<scratch file name>

is the eleven (11) character name and' extension of the scratch file.

<definiton file name>

is the eleven (11) chara~ter name and extension of the definiton file.

23.16 Example of a Definition File

This is an example of a definition file for EDIT. Note that comments may appear. Although this contains some useful general-purpose

user-defined commands, the mos~ common use of command strings is for a special editing job. Care should be used in defining user command str to make sure they perform as intended!

For example, a file needs

"?"

following every line beginning wi th a

,,*

Many times user-defined commands are required for a one-time application.

Here are some more general examples:

Global search and replace with verification:

This function assumes that the modification and the locate have been done previously so the repeated form of the command is used. This string can be modified to add field parameters for the locate and modify commands or the verfication option removed from the modify command.

Delete until:

By using the :Q function, "query" a particular string for the line the cursor is pointing to. This sets up a string for the repeated form of the :Q command. This function deletes all lines beginning with the pointed line up until it finds the particular string entered at first.

Insert line of asterisks:

Use this function to insert a line of asterisk (or modify the string to insert lines of periods or underbars).

Draw a box of asterisks:

Use the line function (:3) to draw the top of the box. Do a :xi to insure that "format" (no word wr ap) mode is in effect. Now go down to where the bottom of the box is to be drawn and key in :4. This draws a box of asterisks.

CHAPTER 23. EDIT 23-45

Marking updated lines with SNAP tabs in asse~bler mode:

: 7 : t 70"': m2 \ 1. 1 • D'" : t s'"

This is an easy way to mark modified lines.

• Leave :8 empty for "local" user-defined commands.

• End the file with a DOS command usually called after edit completion:

·

:9 :ex CHAIN ASSEMBLE/CHN;DATE~310CT78,OPT=FIGLXMP,POPT,LINK=L'"

• When the same chain file is usually called after the edit is finished, user-defined command may be used rather than typing in complicated param~

each time.

Note: nested commands will not work. If the command is:

:1 :4 .... :6 .... :7 ....

when the user types in ':1', EDIT will perform Function 4, but will not return to perform Function 6 or Function 7.

Also if command :2 is defined as :M

*<: ....

:8> .... :M

:<* ....

:8

and the pointer is positioned to the line

"*EX SNAP3 PROG;LXIFG"

As soon as the first :8 is encountered :EX SNAP3 PROG;LXIFG

will be placed in "tiser defined position number 8, and user defined command :8 will be immediately executed. Execution control will not return to command :2.

Also, if command :3 is defined as :8> ....

and the pointer is positioned to the line :EX EDIT PROG/TXT

EDIT will place in position :8 :EX EDIT PROG/TXT

and execute :8 immeditately IF :3 is defined as

:8>

:3 will only place :EX EDIT PROG/TXT

in position :8 and not execute it.

CHAPTER 23. EDIT 23-47

Im Dokument User's Guide Version 2 (Upgraded to 2.5) (Seite 181-187)