home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s210 / 1.ddi / DEMO51.ASM < prev    next >
Encoding:
Assembly Source File  |  1986-04-16  |  512 b   |  24 lines

  1. ; DEMO51.ASM    8051 SOURCE CODE
  2. ;
  3. Abc EQU 'Hi'    ;string value equate
  4. Val1 EQU 0BDH   ;hexadecimal constant
  5. Val2 EQU 75     ;decimal constant
  6. ;
  7. ORG 25H
  8. ;
  9. START:
  10. add A,#65H
  11. inc 32H
  12. mov 25H,32H     ;COPY (32) TO (25)
  13. mov DPTR,#Abc   ;16 BIT DATA, MSB FIRST !!
  14. cjne A,#27,START  ;LOOP RELATIVE TO START
  15. clr C
  16. subb A,#Val1
  17. jb OV,NEXT      ;JUMP IF OVERFLOW FLAG SET
  18. cpl Val2        ;BIT ADDRESS
  19. ;
  20. NEXT:
  21. anl C,/Val2
  22. jz  START
  23. END START       ;STARTING ADDRESS
  24.