• Aucun résultat trouvé

IIIII ixxxxxxxxxxxxxxxi

Dans le document Honeywell 2040 (Page 135-139)

Three- or four-character address assembly must be specified (see ADMODE) whenever indirect addressing is to be used. When the assembler translates an indirect address into a machine-language entry (see Figures 5-8 and 5-9), a binary value of III (three-character mode) or 10000 (four-character mode) is automatically inserted into the address modifier bit positions of the assembled address.

I -OPERANDS\

ASSEMBLER

INDICATES INDIRECT ADDRESS

IS-BIT REPRESENTATION OF ADDRESS ASSIGNED TO THE TAG TEMP

IIIII ixxxxxxxxxxxxxxxi

B ADDRESS OF

ASSEMBLED INSTRUCTION

Figure 5-8. Assembly of Indirect Address in Three-Character Addressing Mode

I:GE,iiii ••

OP.E.RA.N.D.S\rII} • • •

ltl

ASSEMBLER

INDICATES 19-BIT REPRESENTATION INDIRECT OF ADDRESS ASSIGNED

ADDRESS TO THE TAG ~

,..L . .-_t____..-..

B ADDRESS OF

ASSEMBLED INSTRUCTION

Figure 5-9. Assembly of Indirect Address in Four-Character Addressing Mode

SECTION VI

DATA FORMATTING STATEMENTS

INTRODUCTION

A value or quantity which must remain fixed or which must be used repeatedly in a program is. called a constant. A work area is an area in memory which is reserved for input data, cu-mulative processing, or output data. By employing data formatting statements, constants can be stored and work areas can be reserved without regard to their actual locations in memory.

For instance, the programmer can use a data formatting statement to reserve an 80-character card input area and assign it a symbo1ic address such as CARDIN, without knowing the actual address of the field. Similarly, a data formatting statement makes it possible to store a con-stant, such as 2000, and to refer to it by a symbolic tag, such as CON3, without regard to the addre s s at which the constant is stored. Table 6 -1 li sts the five data formatting statements used with Easycoder symbolic language.

Table 6 -1. Data Formatting Statements Mnemonic

Operation Code Function

DCW Define Constant with Word Mark DC Define Constant without Word Mark

RESV Reserve Area

DSA Define Symbol Addre s s

DA Define Area~:~

~:~NOTE: The Define Area statement cannot be employed with the Easycoder A Assembly System.

Although data formatting statements are coded in the same format as most symbolic ma-chine instructions (data processing statements), they are not treated as instructions by an as-sembler. Instead they are treated as definitions which cause the assembler to perform certain activities but which are not executed during a program run. Since data formatting statements are not executed during a program run, they should not be written in the body of the symbolic program.

Define Constant with Word Mark - DCW

By use of the DCW statem.ent, a constant can be autom.atically stored in a field reserved by the as sem.bler. In storing the constant, the as sem.bler autom.atically sets a word m.ark in the leftm.ost character position of the storage field. Item. m.arking m.ay be specified as in Table 5 -1. An L in column 7 thus re suits in a record m.ark with a DCW statem.ent.

NOTE: If Easycoder C, D, or OS/2000 is being used, and if unusual high- and low-order punctuation is required, the program.m.er m.ay use a Set II punctuation indicator as shown in Table 5-2.

The constant can be assigned a tag. If the tag is left-justified in the location field, it is assigned to the address of the rightmost character of the constant. If the tag is indented one colum.n, it is assigned to the address of the leftm.ost character of the constant.

NUMERIC CONSTANTS

Num.eric constants m.ay take anyone of three form.s: binary, octal, or decim.al. For Easycoder A and B, octal and decimal constants can be coded with a m.axim.um. length"of 40 characters, while the coding associated with a binary constant is lim.ited to a m.axim.um of sb character s. However, the Easycoder C, D, and OS/2000, the m.axim.um. length of the storage field which can be occupied by a num.eric constant is 63 characters.

Decim.al Constants

Signed decim.al constants are specified by writing a plus or a m.inus sign in the first colum.n of the operands field, followed by the value of the constant. When the constant is assigned to a storage field, the assem.bler places the sign in the zone bits of the rightm.ost character of the constant. 1 Unsigned decim.al constants are written left-justified in the operands field.

EASYCODER

COOING FORM

PROBLEM _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ PROGRAMMER _----' _ _ _ _ OATE ___ ____,.---~GE_OF_

CARD I+I~ LOCATION OPERATION OPERANDS

NUMBER I~ ~ CODE

I 213 415 6 7 8 14 I~ ~o 21 6263 10

I : DEC, DeW +22

1

The statement above shows the decimal value of +22 defined as a decimal constant.

Binary Constants

A binary constant is actually written as a decimal entry (m.axim.um value of 999999) which is then autom.atically converted to a binary value by the assem.bler. The binary value is stored

lSee the description of sign codes.

(right-justified) in the constant field. The stated maximum value of 999999 for binary constants is for Easycoder Assemblers A and B only.

To code a binary constant the programmer writes the following: (1) a # sign (in the first column of the operands field); (2) for Easycoder A or B, a number from 1 to 6 which designates the number of six-bit characters needed to store the resulting binary value (for Easycoder C, D, or OS/2000, a number from 1 to 63); (3) the letter B; and (4) the decimal representation of the desired binary constant. Note that if the decimal representation of the binary constant is preceded by a minus sign, the assembler stores the binary constant in twos-complement form.

EASYCODER

CODING FORM

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

CARD ~I~ LOCATION OPERATION OPERANDS

!

NUMBER

U

eOOE

1 213 4' 5 6 7 8 14 I!» 2021 621 63 10

1

:

CO.N.3

oew

:rrZB5:¢1

I

,

I

The statement above shows the binary equivalent of 50 defined as a binary constant to be stored in two consecutive character locations.

Octal Constants

Octal constants are coded in octal notation (see Appendix A). To code an octal constant the programmer writes the foilowing: (1) a

#

sign (in the first column of the operands field);

(2) a number (not to exceed 20 for Easycoder A and B); not to exceed 63 for Easycoder C, D, and OS/2000, which specifie s the number of six-bit characters required to store the octal

con-stant; I (3) the letter C: (4) the constant value. Note that the value stored by the assembler is always left-justified in the storage field.

EASYCODER

CODING FORM

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

il~l

LOCATION

I

OPERATION OPERANDS

NUMBER eOOE

1 213 4' 5 61'· ~ 141'5 2021 6263

1

1

'IOCT7 iDeW

fJF2C1177

I I 1 I 1 I

I II I

In the statement above, the octal value of 7777 is shown defined as an octal constant to be stored in two consecutive character locations.

lRecall that an octal digit can be represented as three bits; thus each six-bit character used to store an octal constant contains two octal digits. For example, an octal constant com-posed of six octal digits can be stored in a three-character field.

10

ALPHANUMERIC CONSTANTS specifies the number of alphanumeric character s contained in the constant; this number is, in turn, followed by the letter A and the

NOTE: The maximum number of alphanumeric characters which can be contained in the constant, of cour se, depends on the

CARD I~I~ LOCATION OPER4T10N OPERANDS

NUMBER ~ ~ CODE

1 213 415 6 7 8 •• 15 2021 _l 6263 10

Dans le document Honeywell 2040 (Page 135-139)

Documents relatifs