本人初学者,希望大神们帮我把这个代码标上注释,谢谢..

2019-07-15 19:40发布

ORG  0000HAJMP  MAINORG  0013HLJMP  IN1ORG  0030HMAIN:MOV  SP,#60HMOV  P1,#0FHSETB  P1.4SETB  EASETB  EX1MOV  5AH,#0MOV  5BH,#2MOV  5CH,#5MOV  5DH,#0MOV  28H,#0MOV  TCON,#05HMOV  29H,#01HMOV  35H,#10MOV  37H,#10LOOP:MOV  A,35HCJNE  A,#1,NEXTLJMP  N1NEXT:LCALL  ADMOV  R2,#0MOV  R3,40HLCALL  Q1MOV  3AH,R2MOV  3BH,R3LCALL  BJLCALL  DIRLCALL  tiMLJMP  LOOPNI:LCALL  SDN4:MOV  A,35HCJNE  A,#2,N2MOV  A,R4ADD  A,#1MOV  52H,ACLR  CMOV  A,R4SUBB  A,#1MOV  53H,AMOV  A,31HMOV  5AH,AMOV  A,32HMOV  5BH,AMOV  A,33HMOV  5CH,AMOV  A,34HMOV  5DH,ARETIN1:PUSH  PSWPUSH  ACCCLR  EX1MOV  A,P1RRC  AJC  M1MOV  35H,#1LJMP  TTM1:RRC  AJC  M2MOV  35H,#2MOV  A,28HSETB  ACC.0MOV  28H,ALJMP  TTM2:RRC  AJC  M3MOV  35H,#3MOV  A,28HSETB  ACC.0 MOV  28H,ALJMP  TTM3:RRC  AJC  TTMOV  35H,#4TT:NOPPOP  ACCPOP  PSWSETB  EX1RETIAD1:MOV  A,37HANL  A,#0FHORL  A,#30HMOV  R1, AMOV  A,@R1INC  AMOV  B,#10DIV  ABMOV  A,BMOV  @R1,ARETIDB:MOV  30H,#0MOV  R0,#30HMOV  R2,#3MOV  R3,#0MOV  A,@R0MOV  R4,ALP:MOV  A,R4MOV  B,#10MUL  ABMOV  R4,AMOV  A,#10XCH  A,BXCH  A,R3MUL  ABADD  A,R3XCH  A,R4INC  R0ADD  A,@R0XCH  A,R4ADDC  A,#0MOV  R3,ADJNZ  R2,LPRETBJ:MOV  30H,#0MOV  A,40HCLR  CSUBB  A,52HJC  XXSETB  P1.4RETXX:MOV  A,40HCLR  CSUBB  A,53HJNC  WWCLR  P1.4WW:RETQ1:MOV  DPTR,#TABLEMOV  A,R3CLR  CRLC  AMOV  R3,AXCH  A,R2RLC  AXCH  A,R2ADD  A,DPLMOV  DPL,AMOV  A,DPHADDC  A,R2MOV  DPH,ACLR  AMOVC  A,@A+DPTRMOV  R2,ACLR  AINC  DPTRMOVC  A,@A+DPTRMOV  R3,ARET TABLE:  DW  000,045,051,056,062,066DW  070,074,081,086,092DW  098,100,105,110,116DW  121,124,130,135,138DW  142,146,151,154,160DW  165,168,170,175,178DW  180,184,190,193,195DW  208,214,220,224,229DW  232,238,242,250,255DW  260,264,271,275,280DW  284,292,294,295,300DW  306,311,316,321,325DW  330,334,338,343,347DW  350,355,360,362,364DW  366,368,370,375,376DW  378,379,380,382,384DW  385,387,388,389,390DW  392,395,396,399,400DW  402,403,405,406,408 DW  410,412,414,416,418DW  419,420,422,423,425DW  427,428,430,432,436DW  438,439,440,442,444DW  445,446,449,450,452DW  438,440,442,446,448DW  450,452,453,455,456DW  458,461,463,465,468DW  468,470,472,475,478DW  480,480,482,485,485DW  488,490,491,493,495DW  498,500,500,501,504DW  505,508,510,512,515DW  518,518,522,524,528DW  532,536,540,540,545DW  548,549,551,554,556DW  559,560,562,565,568DW  570,572,573,575,578DW  580,583,585,588,590DW  595,596,598,600,602DW  608,610,610,612,615DW  620,623,625,628,630DW  632,635,640,642,645DW  648,650,652,655,658DW  660,664,665,668,672DW  675,677,680,685,688DW  690,695,700,705,710DW  712,715,718,720,725DW  769,773,775,780,782DW  810,815,818,820NDIV1:MOV  A,R3CLR  CSUBB  A,R7MOV  A,R2SUBB  A,R6JNC  NDVE1MOV  B,#16NDVL1:CLR  CMOV  A,R5RLC  AMOV  R5,AMOV  A,R4RLC  AMOV  R4,AMOV  A,R3RLC  AMOV  R3,AXCH  A,R2RLC  AXCH  A,R2MOV  F0,CCLR  CSUBB  A,R7MOV  R1,AMOV  A,R2SUBB  A,R6JB  F0,NDVM1JC  NDVD1NDVM1:MOV  R2,AMOV  A,R1MOV  R3,AINC  R5NDVD1:DJNZ  B,NDVL1CLR  F0RETNDVE1:SETB  F0RET
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。