360 Assembly/360 Instructions/ORG
- ORG Pseudo instruction - Set value of program counter
The ORG pseudo instruction tells the assembler to set the value of the location counter to the specified address, or to reset the location counter if altered by a prior ORG.
Format
[edit | edit source]Name | Operation | Operands |
---|---|---|
ORG | [expr] | |
[name] | ORG | [expr] |
[.symbol] | ORG | [expr] |
where
- name is an optional defined symbol
- or
- .symbol is an optional conditional assembly label
- and
- expr is an optional relocatable address within the current control section
Description
[edit | edit source]The ORG pseudo instruction alters the location counter of this control section (the current CSECT, DSECT, or START). If name is specified, the address is adjusted to the value of the previously defined symbolname. If expr is specified, it must not be lower than the lowest address defined for this control section. An ORG statement without an expr value resets the location counter to the highest address used in the current control section.
Examples
[edit | edit source]PRNTLINE DS CL131 CREATE A PRINT BUFFER ORG PRNTLINE CTLCHR DS C THIS OCCUPIES THE SAME ADDRESS AS * THE FIRST BYTE OF PRNTLINE LASTNAME DS CL15 OCCUPIES THE SAME ADDRESS AS BYTES 2-16 OF PRNTLINE DS C FRSTNAME DS CL10 DS C ACCOUNT DS CL8 ORG , RESET TO NEXT BYTE AFTER PRNTLINE
The comma on the last line is used to be sure the assembler does not presume the first word of the comment is interpreted as an argument to that ORG statement
360 Assembler Pseudo Instructions | |
Address Related | ADATA • CNOP • DROP • EQU • LOCTR • LTORG • ORG • USING |
---|---|
Code Related | ALIAS • AMODE • CATTR • COM • CSECT • CXD • DSECT • DXD • END • ENTRY • EXTRN • OPSYN • RMODE • RSECT • START • WXTRN • XATTR |
Data Related | CCW • CCW0 • CCW1 • DC • DS |
Conditional Assembly and Macro related | ACTR • AGO • AIF • AINSERT • ANOP • AREAD • COPY • GBLA / GBLB / GBLC • LCLA / LCLB / LCLC • MACRO • MEND • MEXIT • MNOTE • SETA / SETB / SETC |
Listing, output and source related | Comments • *PROCESS • ACONTROL • EJECT • END • EXITCTL •ICTL • ISEQ • POP • PRINT • PUNCH • PUSH • REPRO • SPACE • TITLE |
360 Assembly Language | |
360 Family | Introduction · Basic FAQ · 360 Family · 360 Architecture |
---|---|
360 Instruction Set | 360 Instructions · Branch Instructions · Data Transfer Instructions · Control Flow Instructions · Arithmetic Instructions · Logic Instructions · Shift and Rotate Instructions · Priveleged Instructions · Other Instructions |
Syntaxes and Assemblers | 360 Assemblers· Pseudo Instructions |
Instruction Extensions | Floating Point · High-Level Languages |