⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 prog10.asm

📁 包括了各种常用的8051单片机的程序
💻 ASM
字号:
;  PROG10 - Looping
;
;  This Program Uses the Simulator to Demonstrate how a set number
;   of Loops can be Simply Accomplished in the 8051.
;
;  This program will run in the UMPS simulator for a DS80C320.
;
;  Myke Predko
;  98.02.09
;
;  Hardware Notes:
;   This program is only meant to run on the Simulator

;  Variable Declarations
;  R0 in Bank 0 is used as a Counter

;  Mainline
 org 0                          ;  Execution Starts Here

  clr    P1.0                   ;  Turn on the LED for the Loop

  mov    R0,#17                 ;  Want to Loop 17x

Dlay:                           ;  Loop Here 17x while LED is On

;  #### - Inside Loop Code Can go Here

  djnz   R0,Dlay                ;  Decrement the Loop Counter and
                                ;   If Not Zero, Loop Around Again

  setb   P1.0                   ;  Turn Off the LED


Loop:                           ;  Loop Here Forever when Finished
  ajmp   Loop

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -