芯片复制单片机汇编语言实现进制转换 时间:2025-11-29 来源: 芯片解密 浏览:2次 字号:大 中 小 芯片复制代码如下: ORG 00H LJMP 30H ;turn to main ORG 03H LJMP 0200H ORG 30HMAIN: MOV P1, #00H ;hex MOV P0, #00H ;low2_dec MOV P2, #00H ;high1_dec SETB EX0 ;open it SETB IT0 SETB EA ;open total switchHERE: INC P1 MOV R7, #0FFH DJNZ R7, $ SJMP HERE ORG 0200HEXCHANGE: MOV B, #64H ;div with 100 for P2-high1_dec MOV A, P1 DIV AB MOV P2, A MOV A, B ;save remainder; MOV B, #0AH ;div with 10 for P0-low2_dec DIV AB SWAP A ADD A, B MOV P0, A RETIEND 下一篇:芯片复制AD7715的单片机驱动程序