Translation between C and Assembly

By

Translation between C and Assembly 

•A for-loop in C
    int z;
    for (z=255; z>0; z--)
      P1=z;


•A loop in Assembly
     MOV R2,#255
ABC: MOV P1,R2
     DJNZ R2,ABC

0 comments:

Post a Comment

If you have any questions or droughts feel free to ask here.