Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Share this Page URL
Help

Chapter 14 - More Control Systems > 14.3. Control Technologies - Pg. 319

More Control Systems 319 68000 speak). `$' indicates a hex number. Note that in the 68000, a `1' in the DDR sets that bit as output e this is the opposite to the PIC. again move.b d0,PortA The label `again' represents a source code line address, `d0' is the first data register in a set of eight (d0ed7) and PortA is the output register to which the LEDs are connected. addq #1,d0 This means add 1 to (increment) d0. Surprisingly, the 68000 does not have an increment (or decrement) instruction. `addq' means `add quick', used for adding a small number to a register. move.w #$0fff,d1 Move a 16-bit word (w) into d1 to initialize the delay loop. delay subq.w #1,d1 Start of delay loop. Decrement (subtract 1 from) the counter register `d1'. bne delay This means `branch if not zero' to the label delay. The program jumps back and repeats the