On Sun, 2005-05-22 at 20:49 -0500, Jay West wrote:
Jim wrote....
Location Content Op-code comment
001000 012700 mov #1,r0 load ro with 1
001002 000001
001004 006100 rol rotate r1 left
001006 012701 mov delay r1 load register r1 with delay
001010 007777 delay
001012 005301 dec r1 decrement register 1
001014 001376 bne -2 continue to decrement r1 until
r1=0
001016 000772 br -12 back to 001002 (dec r0)
This runs on my /45, but produces a steady light display, not a cylon or
"blinking" effect. It's been decades since I looked at '11 assembler.
I'm
confused about something in the listing above. If the 012700 at location
1000 is a load r0 with 1, I'm guessing the next word (1002) is the constant
to be loaded? So, why would the branch at location 1016 go back to the data
at 1002? Obviously there's something I'm missing. Guidance? If 1002 is a DEC
R0 instruction, then where's the constant "1" for the mov#1,r0 stored in
the
object? Humm?
Here's the light chaser I use:
1 .asect
2 001000 . = 1000
3 start:
4 001000 005000 clr r0
5 001002 005200 inc r0
6 loop:
7 001004 006100 rol r0
8 001006 000005 reset
9 001010 000775 br loop
10 .end start
--
TTFN - Guy