⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c200mnrt.asm

📁 DSP BIOS A
💻 ASM
📖 第 1 页 / 共 5 页
字号:
MON_ST1        .usect  "mon_rgst", 1  ; 0x02 status register 1.
MON_ACCL       .usect  "mon_rgst", 1  ; 0x03 accumulator low.
MON_ACCH       .usect  "mon_rgst", 1  ; 0x04 accumulator high.
;
MON_PLO        .usect  "mon_rgst", 1  ; 0x05 product register low.
MON_PHI        .usect  "mon_rgst", 1  ; 0x06 product register high.
MON_TREG       .usect  "mon_rgst", 1  ; 0x07 temporary register.
MON_TOS        .usect  "mon_rgst", 1  ; 0x08 top of stack.
;
AUXREG0        .usect  "mon_rgst", 1  ; 0x09 auxiliary register 0.
AUXREG1        .usect  "mon_rgst", 1  ; 0x0a auxiliary register 1.
AUXREG2        .usect  "mon_rgst", 1  ; 0x0b auxiliary register 2.
AUXREG3        .usect  "mon_rgst", 1  ; 0x0c auxiliary register 3.
AUXREG4        .usect  "mon_rgst", 1  ; 0x0d auxiliary register 4.
AUXREG5        .usect  "mon_rgst", 1  ; 0x0e auxiliary register 5.
AUXREG6        .usect  "mon_rgst", 1  ; 0x0f auxiliary register 6.
AUXREG7        .usect  "mon_rgst", 1  ; 0x10 auxiliary register 7.
;
               .if (MON_XTND_EITHER == MON_XTND_ON)
MON_PMAP       .usect  "mon_rgst", 1  ; 0x11 program map register.
MON_DMAP       .usect  "mon_rgst", 1  ; 0x12 data map register.
               .else  ; (MON_XTND_EITHER == MON_XTND_OFF)
MON_PMAP       .set     0             ; Unused.
MON_DMAP       .set     0             ; Unused.
               .endif ; (MON_XTND_EITHER)
;
MON_RGST_DP    .set MON_PC            ; DP value for "mon_rgst" section.
;
               .page 
;---------------------------------------------------------------------------
; Define the "mon_ioio" section in program memory that is used as part
; of the MON_IO_MAP_USE_RAM option so as to access the IO memory space.
;
; Note that "mon_ioio" is defined in the link command file.
; It can be put anywhere in RAM program memory to suit the application.
;---------------------------------------------------------------------------
               .if (MON_IO_MAP_USE == MON_IO_MAP_USE_RAM)
MON_IO_RUN     .usect   "mon_ioio", 3   ; RAM program memory.
MON_IORD       .set MON_IO_RUN
MON_IOWR       .set MON_IO_RUN
               .endif ; (MON_IO_MAP_USE == MON_IO_MAP_USE_RAM)
;
;---------------------------------------------------------------------------
; Define the "mon_b0p0" and "mon_b0p1" sections in program and data memory
; that are used as part of the MON_IO_MAP_USE_ROM option so as to access
; the IO memory space.
;
; Note that "mon_b0p0" and "mon_b0p0" are defined in the link command file.
; They can be put anywhere in Bank #0 to suit the application.
;---------------------------------------------------------------------------
               .if (MON_IO_MAP_USE == MON_IO_MAP_USE_ROM)
MON_B0_RUN     .usect   "mon_b0p0", 3   ; Bank #0 high program memory.
MON_B0_LOAD    .usect   "mon_b0p1", 3   ; Bank #0 low data memory.
               .endif ; (MON_IO_MAP_USE == MON_IO_MAP_USE_ROM)
;
               .page 
;***************************************************************************
; This page is intentionally left blank.
;***************************************************************************
;
               .page 
;***************************************************************************
; MISCELLANEOUS TABLES AND CODE FOR THE SECTION "MON_MAIN"
;***************************************************************************
;
;---------------------------------------------------------------------------
; Define the monitor table of constant values in "mon_main" program
; memory and the related mnemonics MON_RELEASE and MON_POINTER that
; the HLL debugger expects mnemonics to be located at MON_ROOT
; (addresses 0x002C and 0x002D in program memory).
;---------------------------------------------------------------------------
               .sect "mon_main"
FIX_ETRAP      mon_etrap            ;
FIX_ESTOP      mon_estop            ;
FIX_REGISTER   .word  MON_RGST_DP   ;
FIX_OPTION1    .word  MON_OPTION1   ;
FIX_OPTION2    .word  MON_OPTION2   ;
FIX_PAGE_ZRO   .word  MON_PGE0_DP   ;
FIX_OPTION3    .word  MON_OPTION3   ;
FIX_OPTION4    .word  MON_OPTION4   ;
FIX_PMAP_ADDR  .word  MON_PMAP_ADDR ;
FIX_DMAP_ADDR  .word  MON_DMAP_ADDR ;
;
MON_RELEASE    .set   01019h      ; The release number of this monitor.
MON_POINTER    .set   FIX_ETRAP   ; Pointer to the table of constant values.
;
MON_START      .set   FIX_ETRAP   ; These two mnemonics are no longer used,
MON_STOP       .set   FIX_ESTOP   ; they exist for backwards compatibility.
;
;---------------------------------------------------------------------------
; Define the monitor table of SE device's memory map
; configuration values in "mon_main" program memory.
;
; This table is used by the MON_SE_CNFG routine to configure
; the SE device's memory map after a reset has occured.
;---------------------------------------------------------------------------
               .if (MON_SE_CNFG_USE == MON_SE_CNFG_USE_YES)
MON_SE_VALU    .sect "mon_main"
               .word  00000H ; 07f0 disable loading
               .word  08000H ; 07f0 enable loading
               .word  0A514H ; 07f1
               .word  00000H ; 07f2
               .word  00000H ; 07f3
               .word  00000H ; 07f4
               .word  00000H ; 07f5
               .word  00000H ; 07f6
               .word  00000H ; 07f7
               .word  00000H ; 07f8
               .word  02000H ; 07f9
               .word  08C88H ; 07fa
               .word  00000H ; 07fb
               .word  00000H ; 07fc
               .word  00000H ; 07fd
               .word  0FFFFH ; 07fe
               .word  0FFFFH ; 07ff
;
MON_SE_ADRS    .set   007F0H ; Address of memory configuration registers.
               .endif ; (MON_SE_CNFG_USE == MON_SE_CNFG_USE_YES)
;
               .page 
;---------------------------------------------------------------------------
; Define the MON_EINTR_VECS and MON_ETRAP_VECS macros to be located
; in "mon_main" program memory.
;
; If the expression "MON_VECTOR == MON_VECTOR_BRANCH" is true then the
; monitor is configured to have its MON_EINTR_VECS and MON_ETRAP_VECS
; macros placed directly in the monitor code. The corresponding entries
; in the interrupt vector table at the bottom of program memory contain
; the first of a series of branch instructions that must eventually lead
; to these macros. Read the description of the MON_VECTOR conditional
; assembly option in the monitor's include file for a detailed
; explanation of what this is all about.
;---------------------------------------------------------------------------
               .if (MON_VECTOR == MON_VECTOR_BRANCH)
               .sect "mon_main"
MON_EINTR      mon_eintr_vecs        ; This occupies fourteen words.
MON_ETRAP      mon_etrap_vecs        ; This occupies eight words.
               .endif
;
               .page 
;***************************************************************************
; REALTIME MACROS
;***************************************************************************
;
;---------------------------------------------------------------------------
; Define MON_SAVE_FULL macro.
; This macro should not be modified.
;---------------------------------------------------------------------------
mon_save_full  .macro
               .if (MON_RGST == MON_RGST_ANY)
               LDP    #MON_RGST_DP  ; Set DP to the register table.
               .endif
;
               POPD    MON_TOS      ; save TOS
               PSHD    MON_TOS      ;
;
               SPM     0            ;
               SPL     MON_PLO      ; save PLO
               SPH     MON_PHI      ; save PHI
               MPYK    1            ;
               SPL     MON_TREG     ; save TREG
               LT      MON_PLO      ;
               MPYK    1            ; restore PLO
               LPH     MON_PHI      ; restore PHI
               LT      MON_TREG     ; restore TREG
;
               SAR     AR0, AUXREG0 ; save AR0
               SAR     AR1, AUXREG1 ; save AR1
               SAR     AR2, AUXREG2 ; save AR2
               SAR     AR3, AUXREG3 ; save AR3
               SAR     AR4, AUXREG4 ; save AR4
               SAR     AR5, AUXREG5 ; save AR5
               SAR     AR6, AUXREG6 ; save AR6
               SAR     AR7, AUXREG7 ; save AR7
;
               .if (MON_XTND_PROG == MON_XTND_PROG_ON)
               .if (MON_PMAP_PAGE == MON_PMAP_PAGE_PROG)
               LALK    #MON_PMAP_ADDR           ;
               TBLR    MON_PMAP                 ;
               .elseif (MON_PMAP_PAGE == MON_PMAP_PAGE_DATA)
               BLDD    #MON_PMAP_ADDR, MON_PMAP ;
               .elseif (MON_PMAP_PAGE == MON_PMAP_PAGE_IO)
               IN      MON_PMAP, MON_PMAP_ADDR  ;
               .endif ; (MON_PMAP_PAGE)
               .endif ; (MON_XTND_PROG)
;
               .if (MON_XTND_DATA == MON_XTND_DATA_ON)
               .if (MON_DMAP_PAGE == MON_DMAP_PAGE_PROG)
               LALK    #MON_DMAP_ADDR           ;
               TBLR    MON_DMAP                 ;
               .elseif (MON_DMAP_PAGE == MON_DMAP_PAGE_DATA)
               BLDD    #MON_DMAP_ADDR, MON_DMAP ;
               .elseif (MON_DMAP_PAGE == MON_DMAP_PAGE_IO)
               IN      MON_DMAP, MON_DMAP_ADDR  ;
               .endif ; (MON_DMAP_PAGE)
               .endif ; (MON_XTND_DATA)
;
               .if (MON_RGST == MON_RGST_ANY)
               LDP    #MON_PGE0_DP  ; Set DP to page zero.
               .endif
               .endm  ; mon_save_full
;
               .page 
;---------------------------------------------------------------------------
; Define MON_REST_FULL macro.
; This macro should not be modified.
;---------------------------------------------------------------------------
mon_rest_full  .macro
               POP                    ;
               PSHD    MON_TOS        ; restore TOS
;
               LT      MON_PLO        ;
               MPYK    1              ; restore PLO
               LPH     MON_PHI        ; restore PHI
               LT      MON_TREG       ; restore TREG
;
               LAR     AR0, AUXREG0   ; restore AR0
               LAR     AR1, AUXREG1   ; restore AR1
               LAR     AR2, AUXREG2   ; restore AR2
               LAR     AR3, AUXREG3   ; restore AR3
               LAR     AR4, AUXREG4   ; restore AR4
               LAR     AR5, AUXREG5   ; restore AR5
               LAR     AR6, AUXREG6   ; restore AR6
               LAR     AR7, AUXREG7   ; restore AR7
;
               .if (MON_XTND_PROG == MON_XTND_PROG_ON)
               .if (MON_PMAP_PAGE == MON_PMAP_PAGE_PROG)
               LALK   #MON_PMAP_ADDR           ;
               TBLW   MON_PMAP                 ;
               .elseif (MON_PMAP_PAGE == MON_PMAP_PAGE_DATA)
               BLDD   MON_PMAP, #MON_PMAP_ADDR ;
               .elseif (MON_PMAP_PAGE == MON_PMAP_PAGE_IO)
               OUT    MON_PMAP, MON_PMAP_ADDR  ;
               .endif ; (MON_PMAP_PAGE)
               .endif ; (MON_XTND_PROG)
;
               .if (MON_XTND_DATA == MON_XTND_DATA_ON)
               .if (MON_DMAP_PAGE == MON_DMAP_PAGE_PROG)
               LALK   #MON_DMAP_ADDR           ;
               TBLW   MON_DMAP                 ;
               .elseif (MON_DMAP_PAGE == MON_DMAP_PAGE_DATA)
               BLDD   MON_DMAP, #MON_DMAP_ADDR ;
               .elseif (MON_DMAP_PAGE == MON_DMAP_PAGE_IO)
               OUT    MON_DMAP, MON_DMAP_ADDR  ;
               .endif ; (MON_DMAP_PAGE}
               .endif ; (MON_XTND_DATA)
               .endm  ; mon_rest_full
;
               .page 
;---------------------------------------------------------------------------
; Define MON_LOAD_NEW macro.
; Save the appropriate MON_PMAP or MON_DMAP value into XTND_ADRS.
; Load the new PRM_XTND value value into the appropriate map register.
; This macro should not be modified.
;---------------------------------------------------------------------------
mon_load_new   .macro
               .if (MON_XTND_EITHER == MON_XTND_ON)
               BIT    PRM_CMND, 15-B_MAPSMASK   ;
               BBZ    LOAD_NEW_DONE             ;
;
               .if (MON_XTND_BOTH == MON_XTND_ON)
               BIT    PRM_CMND, 15-B_PORDMASK   ;
               BBNZ   LOAD_NEW_DATA             ;
LOAD_NEW_PROG                                   ;
               .endif ; (MON_XTND_BOTH == MON_XTND_ON)
;
               .if (MON_XTND_PROG == MON_XTND_PROG_ON)
               .if (MON_PMAP_PAGE == MON_PMAP_PAGE_PROG)
               LALK   #MON_PMAP_ADDR            ;

⌨️ 快捷键说明

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