| ??? 11/15/05 01:04 Read: times |
#103729 - declaring variables Responding to: ???'s previous message |
>Just some advice - learn how to use memory to store your variables - your code is starting to get unmanageable relying on fixed registers
I was looking at the memory map. Since I'm not using any of register banks 1,2, or 3 I was going to use this area to define some variables. However, the stack pointer sets to 07, which means 08h is the first location used. I figured that if I get four LCALLS, and the stack pointer is pushed/popped 6 times, I should be okay to setup the last bank as 8 defined variables. This address starts at 018h, but I'm not sure of the syntax to use. I tried "LCDP EQU 018h", then would this not setup a byte-wide variable called "LCDP"? |
| Topic | Author | Date |
| Stack pointer causing code to loop? | 01/01/70 00:00 | |
| Try using a simulator | 01/01/70 00:00 | |
| declaring variables | 01/01/70 00:00 | |
| careful | 01/01/70 00:00 | |
| push and pull | 01/01/70 00:00 | |
| Correct | 01/01/70 00:00 | |
| ah.. so if I change... | 01/01/70 00:00 | |
| Uh, no | 01/01/70 00:00 | |
| in same sub | 01/01/70 00:00 | |
| Try a Ring Buffer | 01/01/70 00:00 | |
code changed so push/pops in same sub | 01/01/70 00:00 |



