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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/17/02 23:23
Read: times


 
#18851 - RE: A5h instruction on Oki 80C154???
Nah, I'm pretty sure that it's not constant data - though I could be wrong, my only experience with 8051 assembly has been with this "project".
I'll show you a snippet:

MOV C,058H ;073E A2 58
ANL C,/012h ;0740 B0 12
MOV 058h,C ;0742 92 58
MOV R0,#0ECh ;0744 78 EC
DB 0A5h ;0746 A5
JNZ L071E ;0747 70 D5
MOV dptr,#2000h ;0749 90 20 00
MOVX A,@dptr ;074C E0
DB 0A5h ;074D A5
MOV A,@R1 ;074E E7
JNZ L0763 ;074F 70 12
ADDC A,#0afh ;0751 34 AF
JB ACC.3,L0786 ;0753 20 E3 30
MOV A,#086h ;0756 74 86

The dissasemler obviously doesn't recognise the A5H instruction, so assumes it's a data point.
I think I've got it, see if you can follow my thinking :) - If it is a 3 byte instruction (MOVBIT SRC,DEST), after the second use in the above snippet, wouldn't it have put all the next intructions out by one byte (because "mov A,@R1" is only a single byte instruction)?? That would mean that the snippet _should_ look like the one below:

MOV C,058H ;073E A2 58
ANL C,/012h ;0740 B0 12
MOV 058h,C ;0742 92 58
MOV R0,#0ECh ;0744 78 EC
MOVBIT 070h,0D5h ;0746 70 D5 ***
MOV dptr,#2000h ;0749 90 20 00
MOVX A,@dptr ;074C E0
MOVBIT 0E7h,070h ;074D E7 70 ***
LCALL L34AF ;0750 12 34 AF ***
JB ACC.3,L0786 ;0753 20 E3 30
MOV A,#086h ;0756 74 86

This makes sense because there is a Subroutine at L34AF that is used frequently in this section of code. Does anyone agree or have I lost the plot? :)

Cheers guys,

George Ricketts

List of 12 messages in thread
TopicAuthorDate
A5h instruction on Oki 80C154???            01/01/70 00:00      
RE: A5h instruction on Oki 80C154???            01/01/70 00:00      
RE: A5h instruction on Oki 80C154???            01/01/70 00:00      
RE: A5h instruction on Oki 80C154???            01/01/70 00:00      
RE: A5h instruction on Oki 80C154???            01/01/70 00:00      
RE: A5h instruction on Oki 80C154???            01/01/70 00:00      
RE: A5h instruction on Oki 80C154???            01/01/70 00:00      
RE: A5h instruction on Oki 80C154???            01/01/70 00:00      
RE: A5h instruction on Oki 80C154???            01/01/70 00:00      
RE: A5h instruction on Oki 80C154???            01/01/70 00:00      
RE: A5h instruction on Oki 80C154???            01/01/70 00:00      
RE: A5h instruction on Oki 80C154???            01/01/70 00:00      

Back to Subject List