prog8.asm

来自「包括了各种常用的8051单片机的程序」· 汇编 代码 · 共 31 行

ASM
31
字号
;  PROG8 - Using the DPTR to Access Data
;
;  This Program Uses the 16 Bit DPTR Register to Access Scratchpad RAM.
;
;  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
;   No explicit Variables are used for this program.

;  Mainline
 org 0                          ;  Execution Starts Here

  mov    DPTR,#044h             ;  Point the DPTR to a Location for Data

  mov    A,#12                  ;  Store a Sample Message
  movx   @DPTR,A                ;   In External Memory

  mov    A,#34

  movx   A,@DPTR                ;  Retrieve the Message from Memory


Loop:                           ;  Loop Here Forever when Finished
  ajmp   Loop

⌨️ 快捷键说明

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