AJMP MAIN
ORG 0100H
MAIN: MOV DPTR,#4000H
MOVX A,@DPTR
MOV B,A (4000H)
SWAP A 交换
INC DPTR
MOVX @DPTR,A送4001H
INC DPTR
MOV A,B
ANLA,#0FH (4000)内容屏蔽高位
MOVX @DPTR,A 送4002H
SJMP $
END
char xdata* ptrchar i
i = 0x12
ptr = 0x2000
*ptr = i //对2000H赋值
i = *ptr //从2000H取值
ptr=0x2001
*ptr = i&0xf0//2001h放高半字节
ptr++
*ptr = i&0x0f//2002h放低半字节
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)