Motorola M68000 User's Guide Page 52

  • Download
  • Add to my manuals
  • Print
  • Page
    / 256
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 51
58 Assembly Language Programming for the 68000 Family
<exp> is any legal expression as long as it does not contain any undefined
symbols. Symbols that will be defined further along in the program are
called forward references.
The END Directive
The END directive is an important directive. It is only used once
during a program and is the very last source line. This directive informs
the assembler that there are no more source lines to follow. The assembler
stops processing input lines when it reaches the END directive. Be sure
always to include an END, and make sure you don’t include any extra
ones in the middle of your program. Some assemblers allow a label to be
used on the END directive. The value of this symbol will represent the
first memory address not used by your program. While few programmers
will ever use this feature, there are some applications where it is useful.
For example, if the first and last locations of a program are known, it is
simple to compute its size. If the first statement contains the label START,
and the END directive contains the label FINISH, the programs length
is FINISH-START.
Exercises
1. Does every line of the source program have to represent a machine
instruction?
2. Is a comment required on every source line?
3. What is the smallest unit of information that the assembler uses?
4. What characters can be used to separate the fields of the source
statement?
5. Indicate which of the following are legal identifiers:
FOO 50RANGES F1040 FULL(BYTE
6. What two things can the operation field contain?
7. What special character starts a comment line?
8. What special character is used to separate multiple operands in the
operand field?
9. When is it legal to leave out the operation field of a source statement?
10. What are the four fields of a source statement?
11. What is a mnemonic?
12. Are blanks or tabs allowed in the operand field?
13. Can a comment precede an instruction on a source line?
14. Tab stops are normally set up for every how many columns?
Page view 51
1 2 ... 47 48 49 50 51 52 53 54 55 56 57 ... 255 256

Comments to this Manuals

No comments