📄 prog3.asm
字号:
; PROG3 - Direct Bank Register Addressing
;
; This Program shows the different methods that Bank Registers (8 Register addresses in
; the "current" Bank of the data space) can be accessed directly.
;
; This program will run in the UMPS simulator for a DS80C320.
;
; Myke Predko
; 98.02.03
;
; Hardware Notes:
; This program is only meant to run on the Simulator
; Variable Declarations
; R0, R1 and R2 Used for Data/Variable Storage
; Mainline
org 0 ; Execution Starts Here
mov R0,#123 ; Load Bank Register 0 with 123
mov A,#12 ; Load Bank Register 1 with 12
mov R1,A
mov A,R0 ; Load R2 with the Contents of R0
mov R2,A
mov A,R1 ; Swap the Contents of R1 and R2
xch A,R2
; Change the Banks
setb PSW.3 ; Jump to Bank 1
mov R1,A
mov A,R0 ; Load R2 with the Contents of R0
mov R2,A ; NOTE: the Contents of the Bank Register has Changed
clr PSW.3 ; Go back to Bank 0
Loop: ; Loop Here Forever when Finished
ajmp Loop
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -