📄 c200mnrt.i
字号:
; the MON_DMAP_PAGE, MON_DMAP_ADDR and MON_DMAP_VALU options are ignored.
;
; If the MON_XTND_DATA_ON option is chosen then extended addressing in
; data memory is enabled. This option should be chosen if the monitor
; is being installed with a C2XX device that does include extra hardware
; to implement extended addressing in data memory. In this case the
; MON_DMAP_PAGE, MON_DMAP_ADDR and MON_DMAP_VALU options are also used.
;
; The MON_DMAP_ADDR and MON_DMAP_PAGE options are used to specify
; the address of the data memory mapping register in the program,
; data or io memory spaces.
;
; The default is to not support extended addressing in data memory.
;---------------------------------------------------------------------------
MON_XTND_DATA_OFF .set 00000h
MON_XTND_DATA_ON .set 00008h ; This option adds 26 words of code.
MON_XTND_DATA .set MON_XTND_DATA_OFF ; <- Edit only this line.
;
MON_DMAP_PAGE_PROG .set 00000h
MON_DMAP_PAGE_DATA .set 00001h
MON_DMAP_PAGE_IO .set 00002h
MON_DMAP_PAGE .set MON_DMAP_PAGE_IO ; <- Edit only this line.
;
MON_DMAP_ADDR .set 08001h ; <- Edit only this line.
;
.page
;***************************************************************************
; GLOBAL DECLARATIONS
;***************************************************************************
;
;---------------------------------------------------------------------------
; Define extended addressing mnemonics MON_XTND_EITHER and MON_XTND_BOTH.
;
; This should not be modified.
;---------------------------------------------------------------------------
MON_XTND_OFF .set 0
MON_XTND_ON .set 1
.eval MON_XTND_OFF, MON_XTND_EITHER
.eval MON_XTND_OFF, MON_XTND_BOTH
;
.if (MON_XTND_PROG == MON_XTND_PROG_ON)
.eval MON_XTND_ON, MON_XTND_EITHER
.endif ; (MON_XTND_PROG == MON_XTND_PROG_ON)
.if (MON_XTND_DATA == MON_XTND_DATA_ON)
.eval MON_XTND_ON, MON_XTND_EITHER
.endif ; (MON_XTND_PROG == MON_XTND_DATA_ON)
;
.if (MON_XTND_DATA == MON_XTND_DATA_ON)
.if (MON_XTND_PROG == MON_XTND_PROG_ON)
.eval MON_XTND_ON, MON_XTND_BOTH
.endif ; (MON_XTND_PROG == MON_XTND_PROG_ON)
.endif ; (MON_XTND_PROG == MON_XTND_DATA_ON)
;
.if (MON_XTND_EITHER == MON_XTND_ON)
.asg MON_TWO_SAVE, MON_IMR_SAVE
.asg MON_TWO_SAVE, MON_ST0_SAVE
.endif ; (MON_XTND_EITHER == MON_XTND_ON)
;
.page
;---------------------------------------------------------------------------
; Define global symbols for debug purposes.
;
; This should not be modified.
;---------------------------------------------------------------------------
MON_DEBUG_NOT .set 0
MON_DEBUG_YES .set 1
MON_DEBUG .set MON_DEBUG_NOT
;
.if (MON_DEBUG)
.global PRM_CMND
.global PRM_ADRS
.global PRM_XTND
.global MON_MACHINE
.global MON_STATUS
.global MON_TRAP_VEC
.global MON_IMR_SAVE
.global MON_ST0_SAVE
.global MON_TWO_SAVE
.global MON_WAIT_B2
.global MON_TEMP0
.global MON_TEMP1
.global MON_TEMP2
.global MON_TEMP3
.global MON_TEMP4
.endif ; (MON_DEBUG)
;
.if (MON_DEBUG)
.global MON_PC
.global MON_ST0
.global MON_ST1
.global MON_PLO
.global MON_PHI
.global MON_TREG
.global MON_TOS
.global AUXREG0
.global AUXREG1
.global AUXREG2
.global AUXREG3
.global AUXREG4
.global AUXREG5
.global AUXREG6
.global AUXREG7
.global MON_PMAP
.global MON_DMAP
.endif ; (MON_DEBUG)
;
.if (MON_DEBUG)
.global MON_UNUSED, MON_ADRDWR
.global MON_PMRD, MON_PMWR
.global MON_DMRD, MON_DMWR
.global MON_IORD, MON_IOWR
.global MON_QUICKGO, MON_EXECUTE, MON_EXIT
.global MON_XTND_PROG, MON_XTND_DATA, MON_XTND_EITHER
.global MON_SAVE_CORE, MON_SAVE_FULL
.endif ; (MON_DEBUG)
;
.page
;***************************************************************************
; REALTIME MACROS
;***************************************************************************
;
;---------------------------------------------------------------------------
; Define MON_ESTOP macro.
;
; This macro should not be modified
;---------------------------------------------------------------------------
mon_estop .macro
.word 0be90h
.endm
;
;---------------------------------------------------------------------------
; Define MON_ETRAP macro.
;
; This macro should not be modified
;---------------------------------------------------------------------------
mon_etrap .macro
.word 0beb7h ; was 0beb7h
.endm
;
;---------------------------------------------------------------------------
; Define MON_ERET macro.
;
; This macro should not be modified.
;---------------------------------------------------------------------------
mon_eret .macro
.word 0be96h ; was 0be96h
.endm
;
.page
;***************************************************************************
; This page is intentionally left blank.
;***************************************************************************
;
.page
;---------------------------------------------------------------------------
; This is MON_EINTR_VECS macro for the code that is to be located in the
; interrupt vector table between addresses 0x000E - 0x001B at the
; low end of the program memory space. It occupies fourteen words.
;
; The location this macro is placed at should be labelled MON_EINTR.
;
; This macro must not be located anywhere other than at address 0x000E.
; This macro must not be modified.
;---------------------------------------------------------------------------
mon_eintr_vecs .macro
; Begin the vector 0x000E - 0x001B code.
;
SST #0, MON_TEMP_ST0 ; Save ST0
SST #1, MON_TEMP_ST1 ; Save ST1
LDP #MON_PGE0_DP ; Set DP to PAGE0.
POPD MON_TEMP_PC ; Save the PC.
;
.if (MON_RGST == MON_RGST_ANY)
SACL MON_TEMP_ACCL ; Save the low accumalator.
SACH MON_TEMP_ACCH ; Save the high accumalator.
.endif
.if (MON_RGST == MON_RGST_ZRO)
SACL MON_ACCL ; Save the low accumalator.
SACH MON_ACCH ; Save the high accumalator.
.endif
;
LACL IMR ; Disable selected interrupts.
SACL MON_IMR_SAVE ;
ANDK #(MON_INT_MSK) ;
SACL IMR ;
;
EINT ; Enable interrupts.
;
B MON_INTR_ENTRY ; Go to the fixed entry point
; for emulation interrupts.
;
; End the vector 0x000E - 0x001B code.
.endm
;
.page
;---------------------------------------------------------------------------
; This is MON_ETRAP_VECS macro for the code that is to be located in the
; interrupt vector table between addresses 0x0026 - 0x002D at the
; low end of the program memory space. It occupies eight words.
;
; The location this macro is placed at should be labelled MON_ETRAP.
;
; Note that single-step/run, software breakpoint and ETRAP opcodes
; that cause entry into this code do not affect the global interrupt
; status status bit, thus the EINT used in the vector "mon_eintr_vecs"
; macro is not required here.
;
; The HLL Debugger requires the mnemonics MON_RELEASE and MON_POINTER to
; be located at MON_ROOT (addresses 0x002C and 0x002D in program memory).
;
; This macro must not be located anywhere other than at address 0x0026.
; This macro must not be modified.
;---------------------------------------------------------------------------
mon_etrap_vecs .macro
; Begin the vector 0x0026 - 0x002D code.
;
SST #0, MON_TEMP_ST0 ; Save ST0
SST #1, MON_TEMP_ST1 ; Save ST1
LDP #MON_PGE0_DP ; Set DP to PAGE0.
POPD MON_TEMP_PC ; Save the PC.
; Note we cannot save it directly
; to MON_PC if MON_RGST_ZRO as this
; macro is used inside the monitor.
;
PSHD MON_TRAP_VEC ; Load the emulation trap vector.
RET ; Go to the variable entry point
; for emulation traps, whose
; default value is MON_TRAP_ENTRY.
;
MON_ROOT .word MON_RELEASE ; Release number of the monitor.
.word MON_POINTER ; Pointer to monitor constants.
;
; End the vector 0x0026 - 0x002D code.
.endm
;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -