Ok, I've researched each instruction and these 5 have no direct translations:
PUSH, push direct byte onto stack
POP, pop direct byte from stack
MUL, multiply
ADDC, add into accumulator
MOVC, move code byte to accumulator
I wouldn't be surprised if the equivalent PIC Macro instructions are staring me in the face, but I don't want to start guessing. Here is some code to show the context the commands are used in:
; write an ASCII character to the display
; The font file starts at ascii 32 (blank). The default font is 8x8 pixels
; INPUTS - character in register A
write_char:
push dph
push dpl
clr c
subb a,#32 ;ascii font with blank
mov b,#8 ;multiply by 8 (8 bytes/char)
mul ab
add a,#low(font) ;add to font table address
mov dpl,a
mov a,b
addc a,#high(font)
mov dph,a
mov r0,#8 ;8 bytes/char
wbyte: clr a
movc a,@a+dptr
acall write_data
inc dptr
djnz r0,wbyte
pop dpl
pop dph
ret
8051 assembler reference here:
http://www.ece.umr.edu/computing/uni...e/tasking/asm/
PIC Macro assembler reference:
Robert
![]()
Bookmarks