Previous: , Up: MIXAL   [Contents][Index]

2.2.6 Literal constants

MIXAL allows the introduction of literal constants, which are automatically stored in memory addresses after the end of the program by the assembler. Literal constants are denoted as =wexp=, where wexp is a w-expression (see W-expressions). For instance, the code

L         EQU   5
          LDA   =20-L=

causes the assembler to add after the program’s end an instruction with contents 15 (‘20-L’), and to assemble the above code as the instruction  LDA a, where a stands for the address in which the value 15 is stored. In other words, the compiled code is equivalent to the following:

L         EQU  5
          LDA  a
a         CON  20-L
          END  start