• Keine Ergebnisse gefunden

ASSEMBLY CONTROL STATEMENTS

Im Dokument SERIES 200 (Seite 124-133)

NOTE: If the alternate format is specified, all cards following the program header, up to and including the END ~rd, must be coded in the alternate format.

Segment Header A B

SEG

Programs written for Easycoder C or D may be divided into two or more segments, each of which is loaded into memory and executed as a unit. It is the function of the SEG statement to define the beginning of each segment (memory load). Use of the SEG statement is optional, however. If used, a SEG statement must follow the program header, each Execute statement and each Transfer statement. If it is desired to omit this statement, it must be omitted from the entire program; in this case the assembler generates segment identifications (starting with 01).

EASYCODER C AND D

The letters SEG must be placed in the op code field, while the operands field must contain a two -character segment identification. This segment identification becomes appended to the program name to forIn a unique search code.

EASYCODER

CODING FORM

PROBLEM _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ PROGRAMMER _ _ _ _ _ _ DATE _ _ _ _ _ _ PAGE _ O F _ CARD ~I~ LOCATION OPERATIO'N

OPERANDS NUMBER ~ ~ CODE

I 213 415 6 7 8 1415 2021 6263

I

:

'3EG

AA

I

1

In the example above, AA could represent the first segment of a program, in which case this entry would follow the program header.

Execute EX

80

The end of a memory load is indicated by an EX statement. When the coding inserted by the assembler for the EX statement is encountered during the loading process, a branch to the location specified in the operands field results. This operation enables portions of the program to be executed before the entire program has been loaded. The coding to be executed must ap-pear prior to the EX statement.

EASYCODER A

The letters EX must be written in the op code field; the operands field contains a direct address, either absolute or symbolic. (If an EX statement is written with a blank operands field, the machine will halt when it encounters the corresponding coding during the loading operation. )

To resume the loading operation, the last instruction in the portion of the program exe-cuted must be a Branch instruction which provides re-entry to the load routine. In addition, the first instruction of the executed routine should be an SCR (Store Control Registers) instruc-tion which stores the contents of the B-address register in the A address of the return Branch instruction.

EASYCODER

CODING FORM

PROBLEM _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ PROGRAMMER _ _ _ _ _ _ DATE _ _ _ _ _ _ PAGE_OF_

CARD ~~ LOCATION OPERATION OPERANDS

NUMBER ~ ~ CODE

1 2[3 415 6 7 8 1415 2021 I 6263 80

I

I

EX SEC3

1 I

i I

r

The sample statement above illustrates an EX statement with a symbolic address in the operands field. When the corre sponding coding is encountered during the loading operation, pro-gram loading is tem.porarily halted a~d the portion of the program. beginning at the location tagged SEC3 is executed.

EASYCODER B

The letters EX m.ust be written in the op code field; the operands field contains a direct address, either absolute or sym.bolic. (If an EX statem.ent is written with a blank operands field, the m.achine will halt when it encounters the corresponding coding during the loading operation. )

To resume the loading operation, the last instruction in the portion of the program. executed m.ust be a Branch instruction which provides re -entry to the load routine. In addition, the first instruction of the executed routine should be an SCR (Store Control Registers) instruction which stores the contents of the B-address register in the A address of the return Branch instructio~.

Besides causing a branch to the program.m.er I s coding, use of the EX statem.ent causes any literals us ed in the m.em.ory load to be loaded and the literal table to be cleared. If a LITORG statem.ent (see below) does not precede the EX statem.ent, literals are allocated im.m.ediately following the in-line coding for the m.em.ory load.

7-5 #2-139

SECTION VII. ASSEMBLY CONTROL STATEMENTS

NOTES: 1. Following an EX statement, a new segment number is generated as explained above in the description of the program header.

2. With Easycoder B, the total of the numbers of Execute: Lite.ral Origin, and End statements must not exceed 31.

See the sa:mple state:ment given above for Easycoder A.

EASYCODER C AND D

The letters EX must be written in the op code field; the operands field must contain a direct address, either absolute or s'ymbolic. When used with these assemblers, the EX state-ment enables a progra:m to be loaded and executed one segstate-ment at a time. Each segstate-ment except the last must end with either an EX or an XFR statement. When an EX state:ment is encountered, all literals preceding the EX statement which have not been allocated to me:mory are allocated in sequence, and the literal table is cleared.

Note that it is the responsibility of the programmer to provide re-entry to the load routine.

The :methods of returning to the applicable loader are described in the pertinent Honeywell publi-cation - e. g., Card Loader-Monitor B (Order No. 154) or Tape Loader-Monitor C (Order No. 221).

See the sample statement giyen above for Easycoder A.

Transfer A B

XFR

For Easycoder C and D users, the end of a memory load may be indicated by an XFR state-ment instead of an EX state:state-ment. Both statestate-ments perform essentially the same functions; the one exception is that use of the XFR statement does not result in the allocation of literals or in the clearing of the literal table.

When the coding inserted by the assembler for the XFR state:ment is encountered during the loading process, a branch to the location specified in the operands field results. This oper-ationenables portions of the program to be executed before the entire program has been loaded.

EASYCODER C AND D

The letters XFR :must be written in the op code field; the operands field must contain a direct add-ress, either absolute or symbolic. Use of this statement enables a program to be loaded and executed one segment at a time. Each segment except the last must end with either an XFR or an EX statement.

NOTE: It is the responsibility of the programmer to provide re-entry to the load routine.

EASYCODER

CODING FORM

PROBLEM _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ PROGRAMMER _ _ _ _ _ _ DATE _ _ _ _ _ _ PAGE _ O F _

CARD ~I~ LOCATION OPERATION OPERANDS

NUMBER ~ ~ CODE

I 213 415 6 7 8 1415 2021 6263 80

I

1 XFR

SEC4

1 I

The sample statement above illustrates an XFR statement with a symbolic address in the operands field. When the corresponding coding is encountered during the loading operation, program loading is temporarily halted and the portion of the program beginning at the location tagged SEC4 is executed.

Origin ORO

The ORG statement is used to modify the normal memory allocation process of assembly.

This statement can be inserted anywhere in the source program to indicate to the assembler that all subsequent coding (instructions, constants, work ar,eas, etc.) should be assigned se-quential memory locations starting with the location whose addres s is specified in the operands field.

A program is normally allocated memory space beginning at location 0. If it is desired to assign memory space starting at some location other than 0, an ORG statement m.ust be inserted in the program immediately foilowing the program header.

EASYCODER A

The letters ORG are written in the op code field, and an address (either absolute or sym-bolic) is written in the operands field. (If the address is symbolic, the tag must appear in the location field of a previous source-program entry.) The address specified in the operands field is as signed the tag (if any) in the location field; if this tag appears, it must not- be indented.

EASYCODER

CODING FORM

PROBLEM _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ PROGRAMMER _ _ _ _ _ _ DATE _ _ _ _ _ _ PAGE_OF_

CARD ~I~ LOCATION OPERATION OPERANDS

NUMBER ~ ~ CODE

1 2.13 4JS 6 7 8 1415 2021 1 6263 80

I

1

ORG 75Jl

1 J

I 1 ORe, ORTAG

I I

1 1

7-7 #2-139

SECTION VII. ASSEMBLY CONTROL STATEMENTS

The first statement above indicates to the assembler that all subsequent entries should be assigned sequential addresses beginning with location 750. The second statement directs the asseinbler to assign to all subsequent entries sequential addresses beginning with the address that is assigned to the tag ORTAG. (ORTAG must appear in the location field of a previous source-program entry~ )

EASYCODER B

The letters ORG are written in the op code field, and an address (either absolute or sym-bolic) is written in the operands field. (If the address is symbolic, the tag must appear in the location field of a previous source-program entry.) The address specified in the operands field is assigned the tag (if any) in the location field; if this tag appears, it must not be indented.

NOTE: When the BRT punched-card format is specified, an ORG statement must be included immediately following the PROG statement with an address of 1, 000 (decimal) or above.

See the sample statements given above for Easycoder A.

EASYCODER C AND D

The letters ORG are written in the op code field, and an address (either absolute or sym-bolic) is written in the operands field. If the addres s is symbolic, the tag must appear in the location field of another (not necessarily previous) source-program entry. A symbolic tag may be written in the location field. If this tag begins in column 8, it is assigned to the address written in the operands field. If it begins in column 9, the tag is assigned to the location at which the next instruction would have begun had the ORG statement not been present.

NOTE: Care must be taken so that the address in the operands field is a decimal number of I, 000 or above if Card Loader-Monitor B is used to load the object program. If Tape Loader-Monitor C or Drum Bootstrap-Loader C is used, this decimal number must be 1,340 or above.

EASYCODER

CODING FORM

PROBLEM _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ PROGRAMMER _ _ _ _ _ _ DATE _ _ _ _ _ _ PAGE _ O F _ CARD

!I~

LOCATION OPERATION OPERANDS

NUMBER CODE

1 213 415 6 7 8 1415 2021 6263 80

I

:

'DENT IQRe, 7a~~

I 1

In the example above, assume that the instruction preceding the ORG statement was as-signed to locations 5000 through 5007. The next instruction w,ould normally begin at location 5008.

The tag IDENT, since it begins in column 9, is thus assigned to location 5008, and the next in-struction is stored beginning at location 7800.

Modular Origin MORG

The modular origin statement is similar to the ORG statement described above. The MORG statement indicates to the assembler that all subsequent entries should be assigned se-quential addresses starting with the next available location whose address is a multiple of the number written in the operands field of the MORG statement. The entry in the operands field must represent a power of two (e. g., 2, 4, 8, 16, 32, •••••• 4,096, etc.).

EASYCODER A AND B

The letters MORG are written in the op code field, and a number (a power of two) is placed in the operands field.

EASYCODER

CODING FORM

PROBLEM _ _ _ _ _ _ ----'-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ I>ROGRAMMER _ _ _ _ _ _ DATE _ _ _ _ _ _ PAGE _ O F _

CARD ~I~ LOCATION OPERATION OPERANDS

NUMBER ~ ~ CODE

1 2J3 ~5 6 7 B 1415 2021 6263 80

I

:

IMORG 2>2

I 1

The statement above indicate s to the as sembler that all subsequent entries should be as-signed sequential addresses beginning with the next available location whose address is a multiple of 32.

EASYCODER C AND D

The letters MORG are written in the op code field, and a number (a power of two) is placed in the operands field. A symbolic tag may be written in the location field. If this tag begins in colurrm 8, it is assigned to the address written in the operands field. If it begins in column 9, the tag is assigned to the location at which the next instruction would have begun had the MORG

statement not been present (see the sample statement given above for the ORG statement).

Literal Origin LITORG

The literal origin statement is similar to the ORG and MORG statements described above.

The LITORG statement specifies to the assembler that all previously used literals should be assigned sequential memory locations starting with the location specified in the operands field.

7-9

#2-139

SECTfON VII. ASSEMBLY CONTROL STATEMENTS

Care :must be taken to ensure that literals can be referenced by the instructions which use the:m; e. go, a literal stored in one 4K bank :may not be addressed in the two-character :mode fro:m another bank.

EASYCODER B

Tn.e op code field :must contain the letters LITORG, while the operands field contains an address (either absolute or symbolic). If a sy:mbolic tag is used, it :must have appeared in the location field of a previous entry. Like the EX state:ment, the LITORG statement causes the literal table to be cleared. Also, locations below 1,000 (decimal) must not be used when BRT punched-card output is specified in the FROG statement.

A symbolic tag may be written in the location field. If this tag begins in column 8, it is assigned to the address written in the operands field. If it begins in column 9, the tag is as-signed to the location at which the next instruction would have begun had the LITORG statement not been present.

NOTES: 1. In the absence of a LITORG statern.ent, all of the generated coding associated with a :memory load is allocated immediately following the in-line coding.

2. With Easycoder B, the total of the number of Execute, Literal Origin, and End state:ments :must not exceed 31.

EASYCODER

CODING FORM

PROBLEM _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ PROGRAMMER _ _ _ _ _ _ DATE _ _ _ ~ _ _ PAGE _ O F _ CARD

~I!

LOCATION OPERATION OPERANDS

NUMBER CODE

1 2-' 3 415 6 7 8 1415 2021 I 6263 80

I : LIT 11.,1 TORG 15$¢

!

I

In the LITORG statement above, the assembler is directed to assign sequential addresses starting with location 1550 - to all previously encountered literals. This location is also tagged LIT, since the tag begins in colu:mn 8.

EASYCODER C AND D

The op code field :must contain the letters LITORG, while the operands field contains an address (either absolute or symbolic). If a symbolic tag is used, it must have appeared in the location field of another, not necessarily previous, entry. Like the EX statement, the LITORG state:ment causes the literal table to be cleared. Also, locations below 1,340 (deci:mal) must not be used.

A sy:mbolic tag :may be written in the location field. If this tag begins in column 8, it is assigned to the address written in the operands field. If it begins in colu:mn 9, the tag is assigned to the location at which the next instruction would have begun had the LITORG statement not

been present.

NOTE: In the absence of a LITORG statement, all of the generated coding associated with a memory load - except for a memory load termi-nated by an XFR statement - is allocated immediately following the in-line coding.

EASYCODER

CODING FORM

PROBLEM _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ PROGRAMMER _ _ _ _ _ _ DATE _ . _ _ _ _ PAGE_OF_

CARD ~I~ LOCATION OPERATION OPERANDS

NUMBER ~ ~ CODE

1 213 415 6 7 8 1415 2021 6263

I i LIT ILl TORG ~ 750

I I

i I IDE.NT L I TORG

2000

I I

I I

In the first LITORG statement above, the assembler is directed to assign sequential ad-dresses, starting with location 1750, to all previously encountered literals. Note that the tag

80

for thi s statement, LIT, begins in column 8. As sume, in the second statement above, that the instruction preceding the LITORG statement was as signed to locations 450 through 457. The next instruction would normally begin at location 458. The tag IDENT, since it begins in column 9, is thus assigned to location 458, and previously encountered literals are assigned sequential ad-dresses starting with location 2000.

Set Address Mode ADMODE

This statement specifies the addressing mode into which all subsequent instructions are to be assembled (i. e., two-, three-, or four-character). (All machine instructions, as well as the DSA data formatting statement, are affected by the address mode.) The mode of address as-sembly specified in this statement remains in effect until another ADMODE statement, specifying a different mode of assembly, is encountered.

Because the ADMODE statement concerns itself only with the source program, it should be used in conjunction with the CAM (Change Addressing Mode) instruction (see page 8-62). The CAM instruction specifies the addressing mode in which the machine is directed to interpret the -address portions of all subsequent object-program instructions.

EASYCODER A and B

The letters ADMODE are placed in the op code field. The operands field contains either a 2 or a 3 to denote whether all subsequent instructions are to be assembled in the two-character

7-11 #2-139

SECTION VII. ASSEMBLY CONTROL STATEMENTS

or the three-character addressing :mode. If an ADMODE state:ment is not included at the begin-ning of the source progra:m, asse:mbly begins in the two -character addressing :mode. (It should be a general rule, however, to include an ADMODE state:ment at the outset of every progra:m. )

EASYCODER

COOING FORM

PROBLEM _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ PROGRAMMER _ _ _ _ _ _ DATE _ _ _ _ _ _ PAGE_OF_

CARD ~I~ LOCATION OPERATION

OPERANDS NUMBER ~ ~ CODE

1 213 415 6 7 8 1415 2021 6263

I

1

IAOMODE2 I

1 1

i

i

IADMODE3

I

The asse:mbler upon encountering the first state:ment above will asse:mble the address portions of all subsequent instructions as two-character addresses. The second statement, if encountered later in the sa:me source progra:m, will cause the assembler to change to three-character address asse:mbly.

EASYCODER C AND D

80

The letters ADMODE are placed in the op code field. The operands field contains either the nu:mbers 2, 3, 4, or a sy:mbolic tag to denote whether all subsequent instructions are to be asse:mbled in the two-, three-, orfour-characteraddressingrnode. !fa symbolic tag is used, it :must have been previously defined to have a value of 2, 3, or 4. If an ADMODE statement is not included at the beginning of the source progra:m, three-character addressing is assumed by the assembler. (It should be a general rule, however, to include an ADMODE statement at the outset of every progra:m.) See the sample statements given above for Easycoder A and B.

Equals EQU

The EQU state:ment assigns the sy:mbolic tag written in the location field to the address (absolute or sy:mbolic) written in the operands field. This state:ment thus :makes it possible to use different sy:mbolic tags in different parts of the source progra:m to refer to the sa:me :me:mory location.

EASYCODER A and B

The location field contains a sy:mbolic tag, while the op code field contains the letters EQU.

The operands field contains the address to which the sy:mbolic tag in the location field is to be assigned. (Each sy:mbolic tag written in the operands field :must appear in the location field of a previous source-progra:m entry. )

EASYCODER

CODING FORM

PROBLEM _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ PROGRAMMER _ _ _ _ _ _ DATE _ _ _ _ _ _ PAGE_OF_

CARD r~ LOCATION OPERATION OPERANDS

NUMBER ~ ~ CODE

1 i [3 415 6 7 8 1415 2021 1 6263 80

Im Dokument SERIES 200 (Seite 124-133)