| ??? 04/23/08 17:09 Read: times |
#153898 - Please use the insert code button! Responding to: ???'s previous message |
MOV SP,#256-32
MOV R0,#30H
MOV A,#01H
LOOP1: MOV @R0,A
INC A
INC R0
AJMP LOOP0
LOOP0: CJNE R0,#34H,LOOP1
MOV @R0,A
MOV R1,#05H
MOV R0,#030H
MOV A,#00H
HERE: MOV B,@R0
ADD A,B
INC R0
DJNZ, R1, HERE
MOV R0, #035H
MOV @R0, A
LJMP FINISH
FINISH: END
See how much easier that is to read? Question: What would happen if you left these instructions out? (Try it in a simulator if you have one)
AJMP LOOP0
LOOP0:
LJMP FINISH
FINISH: |
| Topic | Author | Date |
| Registers and data movment. | 01/01/70 00:00 | |
| ...replace this with your code... | 01/01/70 00:00 | |
| IDEA | 01/01/70 00:00 | |
| Any idea... | 01/01/70 00:00 | |
| I bet if your instructor knew about this... | 01/01/70 00:00 | |
| Too bad ... | 01/01/70 00:00 | |
| In the UK... | 01/01/70 00:00 | |
| if they told ... | 01/01/70 00:00 | |
| my CODE | 01/01/70 00:00 | |
| Here iis a hint: | 01/01/70 00:00 | |
| how is that ever going to stop ? | 01/01/70 00:00 | |
| i'VE GOT THE CODE!!!! | 01/01/70 00:00 | |
| Please use the insert code button! | 01/01/70 00:00 | |
| Is "well structured" code ... | 01/01/70 00:00 | |
| comment | 01/01/70 00:00 | |
then, why don't you ? | 01/01/70 00:00 | |
| Acall | 01/01/70 00:00 | |
| Acall??? | 01/01/70 00:00 |



