CALMDEF.DOC CALM definitions SCOPE CALM specifies notations for assembly language programs which are adequate for microprocessors of any data and address word length, based on "von- Neumann" architecture. These notations are action verb oriented. CALM is also adequate for the more complex architectures of the future. CALM proposes the mnemonic names and the syntax for the most frequently encountered operations, test conditions, special registers, data types, addressing modes and pseudo-instructions. The CALM notations may precisely describe all the instructions of the processors. When two or more instructions can be equally used for a given operation (for instance absolute and relative addressing), CALM provides both an explicit precise notation for each instruction, and a simpler functional notation, leaving the assembler with the choice of the instruction to be used. CALM does not specify or enforce any programming style, but allows for and encourages a clear and modular presentation of the listings, with a provision for future better displays and printers. It provides the required pseudo- instructions which allow the preparation of modules which are embedded in any high level language. CALM does not specify any binary format, but proposes the usage of the P695 standard. CALM is standardized in DIN 66283. TERMS The terms used in this document coincide with those used by the major microprocessor manufacturers. Syntactic diagrams are binding and follow the usual rules, e.g. as used in the Pascal language. Circles or rounded rectangles refer to primitive elements (characters or key-words); rectangles refer to otherwise defined elements. Symbols between angle brackets refer to the value of that symbol, e.g. . A decimal number is referred to as a number. When used as specifier parameters, numbers are always decimal, even if the default base has been changed. CHARACTER SET The character set is based on the full ASCII character set and consists of both printable and non-printable characters. PRINTABLE CHARACTERS * Letters - required: A..Z - optional: a..z Lower case letters are identified by the corresponding upper case letters inside symbols and reserved register names. * Digits - required: 0..9 * Special characters - required: + plus sign - minus sign or hyphen * asterisk / slash . period or dot , comma : colon = equal sign ; semi-colon _ underline $ dollar sign # number sign ' single quote " double quotes ^ circumflex | vertical line or caesura % percent sign () parentheses {} braces <> angle brackets space or blank horizontal-tabulator CALM definitions page: 2 - optionally used in comments: & ampersand ! exclamation mark ? question mark @ at sign or commercial at ` grave accent ~ tilda [] brackets \ backslash Note: The backslash or typographic escape (\) allows an extension of the character set for special and typographic characters. For instance, the compatibility between a fixed-spacing screen or printer and a proportional spacing device with definable tabulators may be achieved by pseudo-tabulators (\). * non ASCII character Accent letters and special signs may be used in comments, if they do not interfere with a code defined elsewhere. NON-PRINTABLE CHARACTERS * Control characters carriage return null Other control characters are ignored. PROGRAM IN ASSEMBLER AND STATEMENTS A program in assembly language consists of a finite sequence of statements. Each statement is between zero and 255 characters long and is terminated by a . The program in assembly language is terminated by an "end statement". The syntax diagram of a program in assembly language is given in fig. 1. The syntax diagram of a statement is given in fig. 2. program in assembly language /---------------<---------------, | | | ------------- ------ | ------------------------[ statement ]--->( )---' | ------------- ------ | | ----------------- `->[ END statement ] ----------------- END statement -------- ------ -------- --------------- ------ --->[ o.s. ]--->( .END )--->[ o.s. ]--->[ comment ]--->( ) -------- ------ -------- | --------------- | ------ | | `--------->--------' o.s.: optional separator Fig. 1 CALM definitions page: 3 statement --------------- /--------------------->[ assignment ]-, | --------------- | | /------<------, | | | | --------------- | | | | /->[pseudo-instr.]-| | | ---------*| | --------------- | ------ ----------- ----->[ label ]-----| |->[o.s.]--->[ comment ]---> | --------- | | --------------- | ------ | ----------- | | | `->[ instruction ]-| | | |--------->----' --------------- | `------->------' | | `------------------>----------------' label --------------------- /->[ global label ]-, -------- | --------------------- | ------>[ o.s. ]---| |---> -------- | --------------------- | `->[ local label ]-' --------------------- comment /-------------<---------------, | | --- | -------------------- | -------->( ; )----->( printable character )-' --- | -------------------- | `-----------------------------> * labels are not allowed for some pseudo-instructions. Fig. 2 SEPARATORS A separator consists of one or more spaces or tabulators, which can be mixed as desired. Usually, only one space or one tabulator is used. The syntactic diagram is given in fig. 3a. The syntax diagram for an optional separator (o.s.) is given in fig. 3b. sepa /------------------<-------------------, | | | -------- | ------->( )------------->-----------------> | -------- | | | | ------- | `->( )------------->-----------| ------- | | V /---------<---------, ^ | | | | | | --- ------- | | `--->( \ )->( )---' --- ------- Fig. 3a CALM definitions page: 4 o.s. --------- ------>[ sepa ]-----> | --------- | | | `------>-----' Fig. 3b UNSIGNED CONSTANTS Unsigned constants are p-numbers or character codes. They are stored as 128-bit words within the assembler tables. The general syntax diagram is given in fig. 4. unsigned constant ------------ /------------->[ p-number ]-------------, | ------------ | | | | --------------- --- ------------ V ------------------------>[ number (=p) ]->( ' )->[ p-number ]-----> | --------------- --- ------------ ^ | | | --------------------- | `-------->[ character code ]---------' --------------------- Fig. 4 P-NUMBERS A p-number is a positive integer in the base p where 2 <= p <= 16. Its p-digits are taken in the ordered set 0..9, A..F. The syntax diagram is given in fig. 5. If the default base is not p, the base is specified using an explicit prefix: p=2 (binary) 2' e.g.: 2'11110001 p=8 (octal) 8' e.g.: 8'361 p=10 (decimal) 10' e.g.: 10'241 p=16 (hexa) 16' e.g.: 16'F1 The default base at initialisation time is 10. If the default base has been set to a value greater than 10, and no prefix is used, the first digit of the number must be a decimal digit. Thus, a non-significant leading zero has to be used if the most significant p-digit is a letter (example: 0FF). p-number /-----<-----, | | p<=10 V ------ | /-------------->( 0.. )-----------, | ------ | | | ------| /-------<--------, |---> | | | | | ------ V ----------- | | `->( 0..9 )----->( 0..9,A.. )-----' p>10 ------ | ----------- ^ | | `--------->----------' Fig. 5 CALM definitions page: 5 CHARACTER CODE A printable character which is preceded and followed by double quotes is converted into its ASCII code equivalent. The syntactic diagram is given in fig. 6. Example: "A" gives 16'41 and with """" the ASCII code 16'22 of the double quotes is obtained. character code --- ------------------------------ --- ---------->( " )--->( printable character, except " )--->( " )---> --- | ------------------------------ ^ --- | --- --- | `------>( " )----------->( " )--------' --- --- Fig. 6 FLOATING POINT NUMBERS The syntax diagram of floating point numbers is given in fig. 7. IEEE-P754 format is assumed. The internal representation of floating point numbers in the assembler is the 80-bit P754 format. A conversion to 64 or 32 bits is made when the floating point value is used in a given instruction. Floating points numbers can only be referred to as immediate values. CALM does not require the inclusion of floating point numbers in arithmetic expressions. Example: -300.0 or -3E+2. floating point number /--------------->----------------, | | - | - | /->(+)-, | /->(+)-, | | - | | | - | | | | ------ - ------ | - | | ------ V ----->---->[u.c.]-->(.)->[u.c.]------->(E)---------->---->[u.c.]--> | | ------ | - ------ ^| - ^ | | ------ | - | | || - - | | - | `->(-)-' `------>-------'`->(\)->(E)-' `->(-)-' - - - - u.c.: unsigned constant Fig. 7 SYMBOLS Symbols have a name and a value. The name of a symbol may consist of up to 32 characters. The value of the symbol is stored as 256-bit words within the assembler tables. Lower and upper case letters are treated as the same. The syntactic diagram of the symbol name is given in fig. 8. There are three types of symbols: - reserved symbols - predefined symbols - user-defined symbols CALM definitions page: 6 symbol name /----------<---------, | | --------- V --------- | ------------>( letter )----->( letter )---| --------- | --------- | | | | ------- | |--->( digit )---| | ------- | | | | --- | |------>( _ )------' | --- | `----------------------> Fig. 8 RESERVED SYMBOLS Reserved symbols refer to special registers. If no special architecture has to be emphasized, the following names are reserved: PC refers to the Program Counter value at execution time SP to the Stack Pointer F arithmetic Flag register S System (Status) register The names of the registers should preferably follow the manufacturer's notations. Table 1 shows the selected names of the registers in CALM for some microprocessors. Z80: Zilog: F A BC DE HL IX IY SP CALM: F A BC DE HL IX IY SP 6809: Motorola: CC D X Y S U DP CALM: F AB IX IY SS US P 68000: Motorola: CCR SR D0..D7 A0..A7 A7 CALM: F SF D0..D7 A0..A7 A7 = SP Tab. 1 PREDEFINED SYMBOLS There are three types of predefined symbols: * required: APC = value of the Assembler PC at the beginning of the instruction in which APC appears TRUE = -1 (all bits ones) FALSE = 0 (all bits zeroes) * optional: SYSTIME = 0 h m s (32 bits BCD) SYSDATE = 0 j m d (32 bits BCD) FLOATPI = number pi FLOATE = number e * implementor defined: to be avoided CALM definitions page: 7 USER-DEFINED SYMBOLS A user-defined symbol is explicitly defined by the programmer. It specifies a constant or a memory address and has hidden attributes to help the assembly process and to simplify error checking. The name must not be the name of a reserved or predefined symbol. There are four types of user-defined symbols: - global label - local label - assignment - IMPORT pseudo-instruction GLOBAL LABEL A global label is a symbol defined in a statement. The value of the global label is given by the current assembler program counter. A global label is valid in the whole program. The syntactic diagram is given in fig. 9. global label ------------------ --- ------------------>[ symbol name ]--->( : )---> ------------------ --- Fig. 9 LOCAL LABEL Local labels are temporary labels which may only exist between two global labels. The symbol name's length is limited to 8 characters. The syntactic diagram is given in fig. 10. local label ------------------ --- --- ------------------>[ symbol name ]--->( $ )--->( : )---> ------------------ --- --- Fig. 10 ASSIGNMENT The equal sign (=) is used to define a symbol. The right side is an expression or a floating point number. The syntactic diagram is given in fig. 11. assignment ------------ /---->[expression]-----, ------ ------ ------ - ------ | ------------ | --->[o.s.]->[s.n.]->[o.s.]->(=)->[o.s.]-| |--> ------ ------ ------ - ------ | ------------------- | `->[floating point nb]-' ------------------- s.n.: symbol name Fig. 11 IMPORT PSEUDO-INSTRUCTION An import pseudo-instruction specifies the symbols defined in other program modules. The reserved name .IMPORT is followed by one or more imported symbols. The syntactic diagram is given in fig. 12. The symbol values are not known at assembly time. CALM definitions page: 8 IMPORT pseudo-instruction ------ --- ------ /-[o.s.]<-( , )<-[o.s.]-, | ------ --- ------ | | | -------- --------- --------- V ------------- | --->[ o.s. ]--->( .IMPORT )--->[ sepa ]------->[symbol name]-----> -------- --------- --------- ------------- Fig. 12 EXPRESSIONS Expressions are evaluated with higher precedence operators first, then from left to right for equal precedence operators. Parentheses can be used to alter precedence. The syntactic diagrams defining expressions are given in fig. 13. Factor operators have the highest precedence and compare operators have the lowest. Operators with one operand (monadic operators): + positive - negative (2's complement) .BIT. equivalent to 1.sl.factor or 2**factor .DEFINED. returns TRUE if symbol is defined else FALSE .EQ0. logical negation (0 -> TRUE, <>0 -> FALSE) .HIGH8. equivalent to (factor.sr.8).and.16'FF .HIGH16. equivalent to (factor.sr.16).and.16'FFFF .LOG2. returns 0..31 if factor = 1..16'FFFFFFFF (0 = error) .LOW8. equivalent to factor.and.16'FF .LOW16. equivalent to factor.and.16'FFFF .NOT. complement (1's complement) .SQR. equivalent to factor*factor .SQRT. returns the square root (factor = 0..16'7FFFFFFF) Operators with two operands (diadic operators): + add - subtract * multiply ** exponentiate / divide (.DIV.) .MOD. residue of integer division .OR. bitwise OR .AND. bitwise AND .XOR. bitwise XOR .ASR. arithmetic shift right (2nd operand specifies number of shift) .SR./.RR. shift right .SL./.RL. shift left (.ASL. = .SL.) Compare operators (two operands, result is TRUE or FALSE): .EQ. equal .NE. not equal .LO. lower * unsigned, .LS. lower or same * logical .HS. higher or same * .HI. higher * .LT. less than + arithmetic, .LE. less or equal + 2's complement .GE. greater or equal + .GT. greater than + CALM definitions page: 9 expression---------------------- ------>[ simple expression ]-------------------------------------> ---------------------- | ^ V | /-----------------------------------------------------, | V V V V V V V V V V | ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- | (.EQ.)(.NE.)(.LO.)(.LS.)(.HS.)(.HI.)(.LT.)(.LE.)(.GE.)(.GT.) | ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- | | | | | | | | | | | | `-----------------------------------------------------' | | ---------------------- | `--->[ simple expression ]-------' ---------------------- simple expression --- /->( + )-, | --- | | | --------- ------------->------->[ term ]------------------------> | | ^ --------- V V V V | --- | | --- --- ---- ----- `->( - )-' | ( + )( - )(.OR.)(.XOR.) --- | --- --- ---- ----- | | | | | `------<------------------------' term -------- ->[factor]--------------------------------------------------------> ^ --------V V V V V V V V V V | - --- --- ----- ----- ----- ---- ---- ---- ---- | (*)( **)( / )(.MOD.)(.AND.)(.ASR.)(.SR.)(.SL.)(.RR.)(.RL.) | - --- --- ----- ----- ----- ---- ---- ---- ---- | | | | | | | | | | | `----<---------------------------------------------------------' factor ---------------------------- /------>[ unsigned constant ]--------, | ---------------------------- | | | | ------------------ | |--------------------->[ symbol name ]---| | ^ ------------------ | | ----------- | | |-->( .DEFINED. )--' | | ----------- | | | ------ | --- ---------------------- --- V ------ -->[o.s.]------>( ( )-->[ simple expression ]-->( ) )---->[o.s.]-> ------ | --- ---------------------- --- ^ ------ | | | ------- | |----------------->[ APC ]------------------| | ------- | | | | ------- ----------- | `---------->( .fop. )--->[ factor ]--------' ------- ----------- fop = BIT, EQ0, HIGH8, HIGH16, LOG2, LOW8, LOW16, NOT, SQR, SQRT. Fig. 13 CALM definitions page: 10 DATA SPECIFIER A data specifier is appended to the instruction mnemonic or to the operand using a separating dot. Its notation specifies a data type (implicit in the case of unsigned numbers and bit strings) and a length or size which is expressed in bits, even for BCD digits and characters. Data types and their corresponding reserved letters are: U or nothing unsigned, logical A arithmetic (2's complement) S signed (sign and absolute value) O offset (2n-1 bias) D decimal (unsigned, 2 digits per byte) F floating point (IEEE 754 format) Other data types, using new letters, may be defined according to the specific processor. The syntax of data specifiers is given in fig. 14. The data specifiers handled by the instruction must be explicitly within the operation code or within the operands. For those processors with only one data type and size available for each instruction, the data specifier may be implicit. data specifier --- ---------- --------->( . )------------------------------------->[ number ]---> --- V V V V V V ^ ---------- --- --- --- --- --- --- | ( U )( A )( S )( O )( D )( F ) | --- --- --- --- --- --- | | | | | | | | `-------------------------->--' Fig. 14 ADDRESS SPECIFIER The absolute or relative range, in which an expression representing an address, is defined using an address specifier in front of this expression. A circumflex is used as separation sign. For the absolute range, the address specifier defines how the address is extended to the full address size. The extension is either logical (zero- extend, no letter or letter U) or arithmetic (sign extend, letter A), followed by the number of bits to be taken of the non-extended address. For the relative range, the relative specifier R will be defined in "relative addressing". The syntactic diagram of address specifiers is given in fig. 15. CALM definitions page: 11 address specifier ---------- --- --------------------->------------->[ number ]------->( ^ )---> | ^ ---------- ^ --- | --- | | |--->( A )--------------->---------' | --- | | | | --- | |--->( R )---| | --- | | | | --- | `--->( U )---' --- Fig. 15 ADDRESSES, ADDRESS SPACES AND DIRECT ADDRESSING An address space is a set of storage locations usually numbered from zero. Each location is usually 8 bits (called a byte) wide, and is given by a unique number or equivalent expression, called its address. If there exists more than one address space, the one in which the program instructions are located follows the previous definition. It is usually named memory space. Other spaces (input-output, data) are recognized using a space describer consisting of a single reserved character ($, %). Register space is frequently not ordered, and register names are reserved. Numbered registers may sometimes be considered as spaces with a space designer beginning with the letters R, A or D. Accessing one of the spaces by giving its address (as a register name or an expression) is named direct addressing. The syntactic diagram of direct addressing is given in fig. 16. direct addressing --------------- /--->( register name )---, | --------------- | -----------------| |---> | -------------- | `----->[ expression ]------' -------------- Fig. 16 INDIRECT ADDRESSING The operand of any address in any space may be considered as an address in any space. This is named indirect addressing. If this space is not the main memory space, an address specifier designer is required. Braces are used to show that the operand is reused for calculating a new address. The syntactic diagram for indirect addressing is given in fig. 17. The term effective address will be defined later. Indirect addressing is not used to build a register address. If this mode exists in a given processor, registers will have to be considered as memory or as additional data space. CALM definitions page: 12 indirect address --- --------------------- --- ----------------->( { )--->[ effective address ]--->( } )---> --- --------------------- --- Fig. 17 RELATIVE ADDRESSING Since the PC (Program Counter) has a value known at assembly time, indirect addressing relative to the PC plays a particular role. The expression {PC}+DISP is, from the programmer's point of view, equivalent to a direct address ADDR (in the main memory space only). From the value ADDR, the assembler computes the value DISP and encodes it in the instruction. The programmer can force relative addressing using letter R as a space specifier prefix. If the DISP space is limited, bit size is specified after R. Displacements are always arithmetic (2's complement) numbers, sign-extended to the PC value. The relative specifier R has been included in fig. 15. AUTOMODIFICATION Register and locations may be modified when referred to as indirect addresses. Incrementation or decrementation by 1, 2 or 4 is the most frequent operation. A single + or - sign is used when the increment/decrement value is related to the size of the operand (1, 2, 4 for 8, 16, 32 bits). A double + or - sign bracketing the value is used when there is no relation between the inc/dec number and the size of the operand. The syntactic diagram is given in fig. 18. automodified indirect address --------------------- ---------------- /--->[ effective address ]--->[ modification ]-, --- | --------------------- ---------------- | --- ->( { )-| |->( } )-> --- | ---------------- --------------------- | --- `--->[ modification ]--->[ effective address ]-' ---------------- --------------------- modification --- /->( + )-, | --- | /--------| |---------, | | --- | | | `->( - )-' | | --- | | | --------------------| --- ---------- --- |---> |->( + )->[ number ]->( + )-| | --- ---------- --- | | | | --- ---------- --- | `->( - )->[ number ]->( - )-' --- ---------- --- Fig. 18 CALM definitions page: 13 EFFECTIVE ADDRESS An address can be calculated by the processor from information derived directly or indirectly from the instruction field. An effective address is the sum of various addresses in the same space. Each address may be located in a given subspace, and the adder may have a restricted size. The adder size and the way calculated addresses are expanded to full addresses are given by optional address specifiers (required only for special instructions). Operations between addresses are performed at execution time. Possible operations are addition (+), subtraction (-) and multiplication (*). The operator * is used for autoscaling, that is, multiplication of the address factor by 2, 4, etc. depending on the size of the elements in the table. Parentheses are used for grouping expressions. In fig. 19, the recursive syntactic diagram for an effective address is given. If no address specifier is used, the assembler will choose the instruction which is optimal for code compactness and execution speed. effective address ------------------------------ ------------------------------>[ simple effective address ]---> | ^ ------------------------------ | --- | |->( $ )-| | --- | | --- | `->( % )-' --- simple effective address ------------------- ---------------------------->[ address term ]----------> ^ ------------------- V V | --- --- | ( + )( - ) | --- --- | | | `------------<---------------' address term ---------------- ----------->[address factor]----------------------->--------------> ---------------- | ^ ^ | --- | ---------------- | `->( * )----->[address factor]--' --- ---------------- address factor ------------------- /->[ direct address ]-, | ------------------- | | | ------ | ------------------- | ------ ->[o.s.]------->--------------->[indirect address ]------->[o.s.]-> ------ | ^ | | ------------------- | ^ ------ | -------- | | | | | `->[ a.s. ]-' | | ------------------- | | -------- | `->[automod.ind.add. ]-' | | ------------------- | | | | --- -------------- --- | s.s.: address specifier `->( ( )->[simp.eff.ad.]->( ) )-' --- -------------- --- Fig. 19 CALM definitions page: 14 IMMEDIATE ADDRESSING With immediate addressing, the effective address itself is used as the operand. This addressing mode, reserved for the source operand, is specified with the number sign as its first element. The same notation is used for operands which are arithmetic values (integer or floating point). The syntactic diagram of immediate addressing is given in fig. 20. If the instruction restricts the field of immediate value (e.g. ADD- QUICK instruction), its size may be specified by an address or a data specifier. immediate address --- --------------------- -------------------->( # )--->[ effective address ]---> --- --------------------- Fig. 20 BITADDRESSING The byte address defined earlier points to bit 0 of the byte, which is the least significant bit (LSB) of this byte. Bits are numbered from 0 to 7 in the addressed byte, 8 to 15 in the next byte, etc. Negative bit addresses may be permitted: bits in the previous byte are numbered -8 to -1, where bit -8 is the LSB. The bit address is an extension of a byte address. Any potential addressing mode is permitted. A colon (:) separates the byte and the bit address. The syntactic diagram is given in fig. 21. bit address --------------------- /-->[ effective address ]--, --------------------- --- | --------------------- | --->[ effective address ]->( : )-| |---> --------------------- --- | --- -------------- | `->( # )->[ expression ]---' --- -------------- Fig. 21 LIST A list is a set of registers, locations or bits. Consecutive registers, locations or bits may be combined in a group. A list of registers or locations is defined either by groups (the first and the last element, the first element and the length) or by only one element. A vertical bar separates the individual and groups of registers/locations. The syntactic diagram of a list of registers or locations is given in fig. 22. CALM definitions page: 15 list of registers or locations --- /-------( | )<-----------, | --- | | | V --------------------- | ------------------->[ list element ]-----> --------------------- list element --- --- --------------------- /->( . )->( . )->[ effective address ]-, | --- --- --------------------- | | | | --------------------- | | /->[ effective address ]------| --------------------- | --- | --------------------- | ->[ effective address ]--->( % )-| |-> --------------------- | --- | --- -------------- | | `->( # )->[ expression ]------| | --- -------------- | | | `------------------->------------------' Fig. 22 A list of bits is defined either by groups (the first and the last bit address, the first bit address and the length in bits) or by each bit address individually. A vertical bar separates individual and groups of bits. The syntactic diagram of a list of bits is given in fig. 23. list of bits --- /-----------( | )<----------, | --- | | | | -------------------- | | /->[ list element ]-, | --------------------- --- V | -------------------- | | --->[ effective address ]->( : )-----| |----> --------------------- --- | -------------------- | `->[ im. list element ]-' -------------------- immediate list element --- --- --- -------------- /->( . )->( . )->( # )->[ expression ]-, | --- --- --- -------------- | | | --- -------------- | --- --- -------------- | ->( # )->[ expression ]--->( % )->( # )->[ expression ]----------> --- -------------- | --- --- -------------- | | | `-------------------->-----------------' Fig. 23 CALM definitions page: 16 FLAG AND STATUS REGISTER BITS The bits in the processor flag and status registers (F, S) are frequently referred to by a single letter. These letters are not addresses, but mnemonic letters appended to other operation code names. The recommended letters are given below. Any risk of confusion with the manufacturer's documentation should be avoided. letter/function use C carry binary adder and shifter L link only if never used as a carry bit Z zero set: result is zero N sign (negative) set: MSB set (negative number) H half-carry 4 bit carry (only for 8 bit processors) V overflow set: overflow for arithmetic numbers I interrupt set: interrupt active T trace set: trace active S supervisor set: supervisor active Examples: SETC, CLRC, etc. OPERANDS Operand is the comprehensive term for various possibilities of addressing: effective address, immediate addressing, bit address, list, arithmetic numbers and floating point numbers. The length of the transferred data is given by a data specifier. The data specifier is appended either directly to the operation code or to the operand(s). The syntactic diagram of an operand is given in fig. 24. operand --------------------- /--->[ effective address ]------------, | --------------------- | | | | ------------------------ | |-->[ immediate address ]----------| | ------------------------ | | | | ------------------ | |----->[ bit address ]-------------| | ------------------ | ---------------| |---> | ---------- | |---------->[ lists ]----------------| | ---------- | | | | -------------- | | /--->[ expression ]----------| | --- | -------------- | `->( # )-| | --- | ------------------------- | `->[ floating point number ]-' ------------------------- Fig. 24 CALM definitions page: 17 CONDITION CODES The execution of an instruction may depend on the value of a flag. A flag may be modified as a result of an instruction. A condition code expresses a flag state or a combination of flag states. The condition codes are mnemonic names which consist usually of two letters: EQ equal NE not equal BC bit clear (EQ) BS bit set (NE) CS carry set CC carry clear VS overflow set VC overflow clear MI minus, negative PL plus, positive LO lower | after unsigned (logical) compare LS lower or same | HS higher or same | HI higher | LT lower than | after arithmetic (2's complement) compare LE lower or equal | GE greater or equal | GT greater than | The instructions which frequently depend on a condition code are: JUMP, DJ, CALL, RET and SKIP.