??? 06/02/06 09:13 Read: times |
#117587 - Q&A Responding to: ???'s previous message |
older post said:
Why... DSEG AT 30h ;this tells the compiler to start placing data from 30h DSEG tells the compiler: "Now we are going to talk about where our data are" (something like a data declaration section in some high level languages, e.g. "var" in Pascal). AT 30h tells, that the data starts at 30h, so the first DATA statement would be assigned address 30h and so on - something like ORG but in the data address space. Abhishek Bk said:
But I definitely have a problem with how I store previous inputs i.e.
MOV A,P2 CPL A MOV @R0,A where R0 counts from 8 to 1. Resulting in storing data in locations 1 to 8. This logic will work only if I use locations 1 to 8, and I dont like that. Could you suggest a different approach? I don't see why it would work only if you use locations 1 to 8. You can't use DJNZ R0,anyloop anymore, but you can cahnge R0 as you wish (increment or decrement) and chack if it reached the endpoint using CJNE R0,#endpoint or similar. Also, address 8 is the first byte which would be
Could you please elaborate on that? Sorry, I started several thoughts as usually and forgot to finish this. Address 8 is the first byte which would be used for stack, if you do push and pop (unless you explicitly change the value of stack pointer, SP). The default value of stack pointer after reset is 7, and stack works that way, that when pushing, stack pointer increments first, then the data is stored at the RAM it points to (i.e. 8). You also need some strobe to let the PC know the output value is written.
I have written a Parllel port monitor that keeps polling the Parllel port and responds if certian predefined numbers are writen to it. I dont see why a strobe is required. If 2 consecutive input latches have only 1 bit set and those bits are on the same place, how would you distinguish them? P2 would not change... JW |
Topic | Author | Date |
Another standard problm in Assembly Lang | 01/01/70 00:00 | |
many ways | 01/01/70 00:00 | |
lookup table? | 01/01/70 00:00 | |
yup | 01/01/70 00:00 | |
hummmm | 01/01/70 00:00 | |
algorithm! | 01/01/70 00:00 | |
OK | 01/01/70 00:00 | |
forget the lookup table | 01/01/70 00:00 | |
no language dependency | 01/01/70 00:00 | |
abstraction | 01/01/70 00:00 | |
Direct Test | 01/01/70 00:00 | |
did you take it at Grossmont? | 01/01/70 00:00 | |
Wrong mark | 01/01/70 00:00 | |
just wonder | 01/01/70 00:00 | |
homework | 01/01/70 00:00 | |
No not homework | 01/01/70 00:00 | |
Bit 3? | 01/01/70 00:00 | |
Depends | 01/01/70 00:00 | |
reverse bit numbering | 01/01/70 00:00 | |
reverse bit numbering: mirror | 01/01/70 00:00 | |
It's logical... | 01/01/70 00:00 | |
Thks | 01/01/70 00:00 | |
Unconventional | 01/01/70 00:00 | |
Yes, now I know | 01/01/70 00:00 | |
oops | 01/01/70 00:00 | |
Radix notation | 01/01/70 00:00 | |
Why "Standard"? | 01/01/70 00:00 | |
give it in C | 01/01/70 00:00 | |
Finally Some Code | 01/01/70 00:00 | |
formatted | 01/01/70 00:00 | |
Much nicer | 01/01/70 00:00 | |
OH boy | 01/01/70 00:00 | |
No I havent | 01/01/70 00:00 | |
edited | 01/01/70 00:00 | |
No Prob | 01/01/70 00:00 | |
Yes. | 01/01/70 00:00 | |
try & ask | 01/01/70 00:00 | |
OK | 01/01/70 00:00 | |
Many Questions | 01/01/70 00:00 | |
Q&A | 01/01/70 00:00 | |
Man! That just made my day! | 01/01/70 00:00 | |
Revised Code | 01/01/70 00:00 | |
hi abhishek!!!![]() | 01/01/70 00:00 |