Structured Control - Introduction
In assembly language, commands such as CMP and Bcc (branch instruction) can be used to implement the If, While, Until, and For statements of higher level languages. However, use of these commands to create rudimentary structured control is often time consuming and complicated. The EASy68K assembler accepts certain structured language statements and translates them into their equivalent CMP and Bcc statements. These statements do affect the condition code register.
===Keywords for Structured Control===
The following keywords are reserved for structured syntax:
DBLOOP ENDF ENDI
ENDW ELSE FOR
IF
REPEAT UNLESS
UNTIL WHILE
The following keywords are used in the structured syntax but are not reserved:
AND DOWNTO TO
BY OR
DO THEN
Note that AND and OR are reserved instruction mnemonics, however.
The five Structured Control statements, DBloop, If, While, Until, and For are discussed later in this section.
Legend:
optional items are shown in brackets []
op is any valid operand
code is any number of lines of 68000 code
size is specified by one of the following: B, W or L for
byte, word or long respectively
expression is any valid conditional expression
extent is specified by one of the following: S or L for
short or long respectively
NOTE! The assembler creates and adds labels to your program in order to implement the structured control statements. These labels all begin with an underscore '_' and are followed by an eight digit hexadecimal number. User created labels should not start with an underscore in order to avoid errors.