Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/11/03 22:45
Read: times


 
#38828 - use MOVC in p89c668
Hello, all

I write the code for moving some bytes from program memory to data memeory in p89c668. but it doesn't work. anybody had idea?

bytes:
db 'all these bytes need to be moved'

mov dptr, #bytes
mov temp_dpl, dpl
mov temp_dph, dph

mov dptr, #data_buffer
mov data_dpl, dpl
mov data_dph, dph

start_moving:
mov dpl, temp_dpl
mov dph, temp_dph
clr a
movc a, @a+dptr ;program mem
inc dptr
mov temp_dpl, dpl ;save data pointer
mov temp_dph, dph

mov dpl, data_dpl
mov dph, data_dph
mov auxr, #00h; access internal ram
movx @dptr, a
inc dptr
mov data_dpl, dpl
mov data_dph, dph
cjne a, #'d', start_moving

should I set auxr before using MOVC?
Thanks.

Frank



List of 4 messages in thread
TopicAuthorDate
use MOVC in p89c668            01/01/70 00:00      
   RE: use MOVC in p89c668            01/01/70 00:00      
   RE: use MOVC in p89c668            01/01/70 00:00      
   RE: use MOVC in p89c668            01/01/70 00:00      

Back to Subject List