| ??? 02/02/02 10:13 Read: times |
#19347 - Will the following work ? |
Hi Guys,
Assume the following macro to copy small pieces of code to XRAM (were they will be executed):
MoveCodeToRam MACRO CodeStart,CodeEnd,Target
Local loop
MOV DPTR,#CodeStart ;
MOV R0, #Low (Target) ;
MOV R1, #(CodeEnd-CodeStart);
loop: MOV A, #0h ;
MOVC A, @A+DPTR ;
MOV P2, #High(Target) ;???
MOVX @R0, A ;will this work
INC DPTR ;
INC R0 ;
DJNZ R1, Loop ;
ENDM
This code is executet from an external EPROM (EA=0) on a standart 80C32. Up to now I thought such a thing is impossible. A binary which uses the above macro sometimes fails. Are there any sideefects which I have to watch for? Thomas |
| Topic | Author | Date |
| Will the following work ? | 01/01/70 00:00 | |
| RE: Will the following work ? | 01/01/70 00:00 | |
| RE: Will the following work ? | 01/01/70 00:00 | |
| RE: Will the following work ? | 01/01/70 00:00 | |
| RE: Will the following work ? | 01/01/70 00:00 | |
| RE: Will the following work ? | 01/01/70 00:00 | |
RE: Will the following work ? | 01/01/70 00:00 |



