Motorola M68000 User's Guide Page 61

  • Download
  • Add to my manuals
  • Print
  • Page
    / 256
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 60
Getting Started 47
MOVE DO,AO
the assembler would use the MOVEA form of the instruction. Check your
assembler manual to be sure you can do this. Even if allowed, it is better
to use the correct instruction mnemonic.
Quite often we may want to set a register or memory location equal
to zero. We can always move a zero value into the destination operand.
Or we can subtract a register from itself. There are other ways to zero a
register or memory location, but none is better than the clear instruction
(CLR). This instruction is provided for just this purpose. Its general form
is
[<label>] CLRl.<size>] <ea> [<comment>]
The size may be B, W, or L. We can clear a data register or memory
location, but not an address register. Here are some examples:
CLR.L DO CLEARS DO
CLR.B CHAR CLEARS A BYTE IN MEMORY
CLR.W D5 CLEARS LOW ORDER WORD IN D5
Input and Output
While we can write many programs that do not require data to be
entered by the user, we certainly do not want to limit ourselves in this
way. Programs can be written that manipulate data that is included in
the assembly language source itself. This would be of limited use if the
data required frequent modification: each time the program is to be run
with different data the source program would have to be edited and then
reassembled, a time-consuming and unreasonable requirement for many
users. What we seek is the ability to obtain data entered from the users
terminal or keyboard at the time the program is executed.
Similarly, a method is normally required to obtain output from the
program during or after its execution. Unless there is some way of
displaying the program output on a terminal or a printer, a programs
action can only be determined by looking at the contents of variables or
registers that may have changed during the programs execution. While
this may be possible with programmer utilities, such as a debugger, it is
certainly not the best way to start programming in assembly language.
Unfortunately, input and output is always dependent on the partic
ular computer you are using. Not all computer systems using the 68000
processor are equipped with the same input/output devices. Some sys
tems have a built in video display and others may have a separate CRT
Page view 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 255 256

Comments to this Manuals

No comments