📄 prog17.asm
字号:
; PROG17 - Control Store Tables
;
; This Application initializes the "Array" Variable of Creates a Variable Array in the Scratchpad RAM and then
; accesses it with reading and writing.
;
; This program will run in the UMPS simulator for a DS80C320.
;
; Myke Predko
; 98.02.17
;
; Hardware Notes:
; This program is only meant to run on the Simulator
; Variable Declarations
; R0 is used as an Index Pointer to Array
; R1 is used as the Source Location for the Control Store Table
Array EQU 078h ; Define Array in Scratchpad RAM
; Mainline
org 0 ; Execution Starts Here
mov R0,#Array ; Point to Destination Variable Array
mov R1,#(InitTable-InitGetTable) ; Point to Control Store Source String
InitLoop: ; Loop Around Here until '0' is Loaded
mov A,R1
movc A,@A+PC ; Get the Table Value
InitGetTable: ; Table Offset to Display
mov @R0,A ; Save the Value
inc R0 ; Point to the Next Location in the Strings
inc R1
jnz InitLoop ; If the Value Saved wasn't Zero, Loop Again
; #### - Put Code to Process the Array Here
Loop: ; Loop Here Forever when Finished
ajmp Loop
InitTable: ; The Control Store Table for Initializing
db 'HEllo',0 ; "Array"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -