PDP 11/45 light chaser
Megan
mbg at theworld.com
Mon May 23 07:15:29 CDT 2005
> 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
Try increasing the delay at 1010.
>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?
pc = pc + (2*branch_offset)
the branch branches back to the instruction at 1004. The comment is
obviously wrong. I would suspect that the comment was for code that
this code was adapted from.
btw - the macro code at 1006 should be 'mov #delay,r1'.
>If 1002 is a DEC R0 instruction, then where's the constant "1" for the
>mov#1,r0 stored in the object? Humm?
1002 is the initial value to load into R0... there is no 'DEC R0' in
the code above. The BR at the end branches back to 1004
Megan Gentry
Former RT-11 Developer
+--------------------------------+-------------------------------------+
| Megan Gentry, EMT/B, PP-ASEL,ST| email: mbg at world.std.com |
| Member of Technical Staff | megan at savaje.com |
| SavaJe Technologies, Inc. | (s/ at /@/) |
| 100 Apollo Drive | URL: http://world.std.com/~mbg/ |
| Chelmsford, MA 01824 | "pdp-11 programmer - some assembler |
| (978) 256 6521 (DEC '77-'98) | required." - mbg KB1FCA |
+--------------------------------+-------------------------------------+
More information about the cctalk
mailing list