📄 prog6.asm
字号:
; PROG6 - Accessing Scratchpad RAM
;
; This Program Reads and Writes to the 128 Bytes of Scratchpad RAM available
; at the start of the 8051's Data Space.
;
; 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, R1 and R2 Used for Data/Variable Storage
Var1 EQU 8 ; Define Variables to be Used in the Program
Var2 EQU 9
VarR0 EQU 0 ; This is the Same as R0 in Bank 0
; Mainline
org 0 ; Execution Starts Here
mov R0,#123 ; Load Bank Register 0 with 123
; To Initialize the Value for Later
mov Var1,#12 ; Initialize the RAM Variables
mov Var2,#34
; Var1 = Var1 | Var2 - Create Assembler Code for this
; Statement
mov A,Var1 ; Load Accumulator with Contents of Var1
orl A,Var2 ; Bitwise OR Accumulator with Contents of Var2
mov Var1,A ; Store the Result
mov VarR0,#Var1 ; R0 Now Points to Var1
mov @R0,#0 ; Clear the Values that R0 is Pointing To
Loop: ; Loop Here Forever when Finished
ajmp Loop
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -