• Aucun résultat trouvé

REPRo-RE·PRODUCE FOLLOWING CARD

Dans le document Assembler H Version 2 Application Programming: (Page 145-148)

The REPRO instruction causes the data specified in the statement that follows to be punched into a card. Unlike the PUNCH

instruction, the REPRO instruction does not allow values to be substituted into variable symbols before the card is punched.

One REPRO instruction produces one punched card.

The REPRO instruction can appear anywhere in a source module except before and between source macro definitions. The punched cards are not part of the object deck, even though they can be physically interspersed in the object deck.

The format of the REPRO instruction statement is:

Name operation Operand

A sequence REPRO Not required

symbol or blank

The line to be reproduced can contain any of the 256 punch characters, including blanks, ampersands, and a~ostrophes. No substitution is performed for variable symbols.

Chapter 5. Assembler Instruction Statements 131

PUSH INSTRUCTION

POP INSTRUCTION

Notes:

1. Sequence numbers and i dent i fi cat ion ar,! not punched in the

0

card.

,=y

2. If the NO DECK option is specified in the job control language for the assembler program, no cards are punched:

neither for the PUNCH or REPRO instructions, nor for the object deck of the assembly.

The PUSH instruction allows you to save the current PRINT or USING status in "push-down" storage on a last-in, first-out basis. You can restore this PRINT and USING status later, also on a last-in, first-out basis, by using a corresponding POP

instruction.

The format of the PUSH instruction statement is:

Name operation Operand

A sequence PUSH Option 1 : PRINT

symbol or Option 2 : USING

blank Option 3: PRINT,USING

Option 4 : USING, PRINT One of the four options for the operand entry must be specified.

The. PUSH instruction does not change the status of the current PRINT or USING instructions; the status is only saved.

Note:

When the PUSH instruction is used in combination with the POP instruction, a maximum of four nests of PUSH PRINT - POP PRINT or PUSH USING - POP USING are allowed.

The POP instruction allows you to restore the PRINT or USING status saved by the most recent PUSH instruction.

The format of the POP instruction is:

Name operation Operand

A sequence POP Option 1 : PRINT

symbol or Option 2: USING

blank Option 3: PRINT,USING

Option 4: USING, PRINT One of the four options for the operand entry must be specified.

The POP instruction causes the status of the current PRINT or USING instruction to be overridden by the PRINT or USING status saved by the last PUSH instruction.

Note:

When the POP instruction is used in combination with the PUSH instruction, a maximum of four nests of PUSH PRINT - POP PRINT or PUSH USING - POP USING are allowed.

132 Assembler H Version 2 Application Programming: language Reference

o

o

o

ORG--SET LOCATION COUNTER

You use the ORG instruction to alter the setting of the location counter and thus ~ontrol the structure of the current control section. This allows you to redefine portions of a control section.

Using the Figure 35, on page 134 as an example, if you wish to build a translate table (for example, to convert EBCDIC

character code into some other internal code):

• You define the table (see (1) in Figure 35) as being filled with zeros.

• You use the ORG instruction to alter the location counter so that its counter value indicates a desired location (see (2)

in Figure 35) within the table.

• You redefine the data (see (3) in Figure 35) to be assembled into that location.

• After repeating the first three steps (see (4) in Figure 35) until your translate table is complete, you use an ORG

instruction with a blank operand field to alter the location counter. The counter value then indicates the next available location (see (5) in Figure 35) in the current control

section (after the end of the translate table).

Both the assembled object code for the whole table filled with zeros, and the object code for the portions of the table you redefined, are printed in the program listings. However, the data defined later is loaded over the previously defined zeros and becomes part of your object program, instead of the zeros.

In other words, the ORG instruction can cause the location to point to any part of a control section, even the middle of an instruction, into which you can assemble desired data. It can also cause the location counter to point to the next available location so that your program can continue to be assembled in a sequential fashion.

The format of the ORG instruction statement is:

Name operation Operand

A sequence ORG A relocatable

symbol or blank expression or blank

In general, symbols used in the operand field need not have been previously defined. However, the relocatable component of the expression (that is, the unpaired relocatable term) must have been previously defined in the same control section in which the ORG statement appears, or be equated to a previously defined value.

The location counter is set to the value of the expression in the operand. If the operand is omitted, the location counter is set to the next available location for the current control

section.

An ORG statement cannot be used to specify a location below the beginning of the control section in which it appears. For example, the following is invalid if it appears less than 500 bytes from the beginning of the current control section.

~N_a_m_.e ______________ ,~_o_p_e_r_a_t_l_·0_n ________ +-_o_p_e_r_a~n_d _________________ ~

ORG *-500

~

Chapter 5. Assembler Instruction statements 133

Source Module

FIRST START 0

Object Code

0 TABLE

TABLE DC XL256'00' (in Hex)

ORG TABLE+O +0

DC C l O t . FO

DC C'l' Fl

ORG TABLE+13 +13

DC C'D' C4

DC ClEf C5

ORG TABLE+C'D' +196

DC ALl(13) OD

DC ALl(14) OE

Dans le document Assembler H Version 2 Application Programming: (Page 145-148)