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

📄 c200mnrt.lst

📁 TI的digital motor control lib的源代码。了解TI的编程规范
💻 LST
📖 第 1 页 / 共 5 页
字号:
     355            ;
     356            ; This table contain two address parameters per internal command.
     357            ; The start point for entry into the routine is the second parameter.
     358            ; The return point for exit from the routine is the first parameter.
     359            ; The reverse order is used to shave a few words from the monitor's size.
     360            ; 
     361            ; Note that "_A" signifies an address table mnemonic.
     362            ; Note that "_C" signifies an state machine command mnemonic.
     363            ; Note that "_S" signifies an state machine state mnemonic.
     364            ;---------------------------------------------------------------------------
     365 0006       INTERNAL_TABLE .sect "mon_main"
     366            ;
     367 0006 005e+ SENDCMND_A     .word MON_WAIT      ; Monitor send command
     368 0007 0089+                .word SENDCMND_ENTR ; and send status values.
     369            ;
     370 0008 0097+ RECVCMND_A     .word RECVCMND_EXIT ; Monitor receive command
     371 0009 0086+                .word RECVCMND_ENTR ; and use a read command.
     372            ;
     373 000a 00a0+ DOAWRITE_A     .word DOAWRITE_EXIT ; Use a write command.
     374 000b 0091+                .word NOACTION_ENTR ; 
     375            ;
     376 000c 005e+ SWCHOPRT_A     .word MON_WAIT      ;
     377 000d 008d+                .word SWCHOPRT_ENTR ; Operate the message switch.
     378            ;
     379 000e 0092+ MAYBERUN_A     .word MAYBERUN_EXIT ;
     380 000f 0091+                .word NOACTION_ENTR ; Possibly exit the monitor.
     381            ;
     382            ;---------------------------------------------------------------------------
     383            ; Define the set of internal commands used by the monitor itself.
     384            ;
     385            ; These command values intentionally increment by twos.
     386            ;---------------------------------------------------------------------------
     387      0000  SENDCMND_C     .set  SENDCMND_A - INTERNAL_TABLE ;
     388            ;
     389      0002  RECVCMND_C     .set  RECVCMND_A - INTERNAL_TABLE ;
     390            ;
     391      0004  DOAWRITE_C     .set  DOAWRITE_A - INTERNAL_TABLE ;
     392            ;
     393      0006  SWCHOPRT_C     .set  SWCHOPRT_A - INTERNAL_TABLE ;
     394            ;
     395      0008  MAYBERUN_C     .set  MAYBERUN_A - INTERNAL_TABLE ;
     396            ;
TMS320C24xx COFF Assembler Version 7.02  Wed Apr 16 12:20:49 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
Monitor program for C25LP HLL Real-Time Debugger.                    PAGE   11

     398            ;---------------------------------------------------------------------------
     399            ; Define the four monitor states and the possible actions taken during
     400            ; each monitor state, based on four permutations of the status of the
     401            ; MSG_DATA and MSG_CMND buffers. The status of the buffers is taken from
     402            ; the STAT_WFUL, STAT_CMD and STAT_RFUL bits in the MSG_STAT register.
     403            ;
     404            ; Each five line ".eval" defines a monitor state and its possible actions.
     405            ;
     406            ; Line 1 declares the mnemonic for the state.
     407            ; Line 2 is nibble 3, the buffer has something from the monitor to the host.
     408            ; Line 3 is nibble 2, the buffer has a command to the monitor.
     409            ; Line 4 is nibble 1, the buffer has a datum to the monitor.
     410            ; Line 5 is nibble 0, the buffer is empty.
     411            ;
     412            ; Note that "_A" signifies an table entry address mnemonic.
     413            ; Note that "_C" signifies an state machine command mnemonic.
     414            ; Note that "_S" signifies an state machine state mnemonic.
     415            ;---------------------------------------------------------------------------
     416            ;
     417            ;---------------------------------------------------------------------------
     418            ; Define the AFTERREAD_S state.  This is the monitor state after
     419            ; accepting an external read command from the HLL Debugger.
     420            ;---------------------------------------------------------------------------
     421                           .eval 0, AFTERREAD_S
     422                           .eval (SWCHOPRT_C << 12) | AFTERREAD_S, AFTERREAD_S
     423                           .eval (RECVCMND_C <<  8) | AFTERREAD_S, AFTERREAD_S
     424                           .eval (SWCHOPRT_C <<  4) | AFTERREAD_S, AFTERREAD_S
     425                           .eval (MAYBERUN_C      ) | AFTERREAD_S, AFTERREAD_S
     426            ;
     427            ;---------------------------------------------------------------------------
     428            ; Define the AFTERWRIT_S state.  This is the monitor state after
     429            ; accepting an external write command from the HLL Debugger.
     430            ;---------------------------------------------------------------------------
     431                           .eval 0, AFTERWRIT_S
     432                           .eval (SWCHOPRT_C << 12) | AFTERWRIT_S, AFTERWRIT_S
     433                           .eval (RECVCMND_C <<  8) | AFTERWRIT_S, AFTERWRIT_S
     434                           .eval (DOAWRITE_C <<  4) | AFTERWRIT_S, AFTERWRIT_S
     435                           .eval (MAYBERUN_C      ) | AFTERWRIT_S, AFTERWRIT_S
     436            ;
     437            ;---------------------------------------------------------------------------
     438            ; Define the AFTEREROR_S state.  This is the monitor state after an error
     439            ; has occurred, when all external commands from the HLL Debugger are
     440            ; discarded, until a status message is passed to the HLL debugger.
     441            ;---------------------------------------------------------------------------
     442                           .eval 0, AFTEREROR_S
     443                           .eval (SWCHOPRT_C << 12) | AFTEREROR_S, AFTEREROR_S
     444                           .eval (SWCHOPRT_C <<  8) | AFTEREROR_S, AFTEREROR_S
     445                           .eval (SWCHOPRT_C <<  4) | AFTEREROR_S, AFTEREROR_S
     446                           .eval (SENDCMND_C      ) | AFTEREROR_S, AFTEREROR_S
     447            ;
     448            ;---------------------------------------------------------------------------
     449            ; Define the AFTERSTAT_S state.  This is the monitor state after an error
     450            ; has occurred and a status message has been passed to the HLL debugger.
     451            ; The monitor is ready to accept an external command from the HLL Debugger.
     452            ;---------------------------------------------------------------------------
     453                           .eval 0, AFTERSTAT_S
     454                           .eval (SWCHOPRT_C << 12) | AFTERSTAT_S, AFTERSTAT_S
     455                           .eval (RECVCMND_C <<  8) | AFTERSTAT_S, AFTERSTAT_S
     456                           .eval (SWCHOPRT_C <<  4) | AFTERSTAT_S, AFTERSTAT_S
     457                           .eval (SENDCMND_C      ) | AFTERSTAT_S, AFTERSTAT_S
TMS320C24xx COFF Assembler Version 7.02  Wed Apr 16 12:20:49 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
Monitor program for C25LP HLL Real-Time Debugger.                    PAGE   12

     458            ;
TMS320C24xx COFF Assembler Version 7.02  Wed Apr 16 12:20:49 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
Monitor program for C25LP HLL Real-Time Debugger.                    PAGE   13

     460            ;***************************************************************************
     461            ; This page is intentionally left blank.
     462            ;***************************************************************************
     463            ;
TMS320C24xx COFF Assembler Version 7.02  Wed Apr 16 12:20:49 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
Monitor program for C25LP HLL Real-Time Debugger.                    PAGE   14

     465            ;***************************************************************************
     466            ; REALTIME SECTIONS
     467            ;***************************************************************************
     468            ;
     469            ;---------------------------------------------------------------------------
     470            ; Define the "mon_pge0" section in data memory.
     471            ;
     472            ; Note that "mon_pge0" is defined in the link command file.
     473            ; It can be put anywhere in page zero data memory to suit the application.
     474            ;---------------------------------------------------------------------------
     475 0000       PRM_CMND       .usect  "mon_pge0", 1  ; Message command parameter.
     476 0001       PRM_ADRS       .usect  "mon_pge0", 1  ; Message base address parameter.
     477                           .if (MON_XTND_EITHER == MON_XTND_ON)
     478            PRM_XTND       .usect  "mon_pge0", 1  ; Message extended address parameter.
     479                           .else  ; (MON_XTND_EITHER == MON_XTND_OFF)
     480      0000  PRM_XTND       .set     0             ; Unused.
     481                           .endif ; (MON_XTND_EITHER)
     482            ;
     483 0002       MON_MACHINE    .usect  "mon_pge0", 1  ; Monitor state machine value.
     484 0003       MON_STATUS     .usect  "mon_pge0", 1  ; Monitor status.
     485 0004       MON_TRAP_VEC   .usect  "mon_pge0", 1  ; Remappable vector 0x0026 address.
     486            ;
     487                           .if (MON_XTND_EITHER == MON_XTND_ON)
     488            MON_TWO_SAVE   .usect  "mon_pge0", 1  ; Saved bits from IMR/ST0 register.
     489            ;              .asg     MON_TWO_SAVE, MON_IMR_SAVE ; This is in "c200mnrt.i".
     490            ;              .asg     MON_TWO_SAVE, MON_ST0_SAVE ; This is in "c200mnrt.i".
     491                           .else  ; (MON_XTND_EITHER == MON_XTND_OFF)
     492      0000  MON_TWO_SAVE   .set     0             ; Unused.
     493 0005       MON_IMR_SAVE   .usect  "mon_pge0", 1  ; Saved bits from IMR register.
     494 0006       MON_ST0_SAVE   .usect  "mon_pge0", 1  ; Saved bits from ST0 register.
     495                           .endif ; (MON_XTND_EITHER)
     496            ;
     497                           .if (MON_WAIT_USE == MON_WAIT_USE_YES)
     498            MON_WAIT_B2    .usect  "mon_pge0", 1  ; Stop-sign flag.
     499                           .else  ; (MON_WAIT_USE == MON_WAIT_USE_NOT)
     500      0000  MON_WAIT_B2    .set     0             ; Unused.
     501                           .endif ; (MON_WAIT_USE)
     502            ;
     503 0007       MON_TEMP0      .usect  "mon_pge0", 1  ; General purpose temporary storage.
     504 0008       MON_TEMP1      .usect  "mon_pge0", 1  ; General purpose temporary storage.
     505 0009       MON_TEMP2      .usect  "mon_pge0", 1  ; General purpose temporary storage.
     506 000a       MON_TEMP3      .usect  "mon_pge0", 1  ; General purpose temporary storage.
     507 000b       MON_TEMP4      .usect  "mon_pge0", 1  ; General purpose temporary storage.
     508                           .if (MON_XTND_EITHER == MON_XTND_ON)
     509            MON_TEMP5      .usect  "mon_pge0", 1  ; General purpose temporary storage.
     510                           .endif ; (MON_XTND_EITHER == MON_XTND_ON)
     511            ;
     512      0007- MON_TEMP_PC    .set MON_TEMP0 ; Temporary for PC in ETRAP & EINTR macros.
     513      0008- MON_TEMP_ST0   .set MON_TEMP1 ; Temporary for ST0 in ETRAP & EINTR macros.
     514      0009- MON_TEMP_ST1   .set MON_TEMP2 ; Temporary for ST1 in ETRAP & EINTR macros.
     515            ;
     516      000a- MON_TEMP_ACCL  .set MON_TEMP3 ; Temporary for ACCL/H after monitor entry,
     517      000b- MON_TEMP_ACCH  .set MON_TEMP4 ; inside EINTR macro and after ETRAP macro.
     518            ;
     519      000a- ENTR_ADRS      .set MON_TEMP3 ; Temporary for the entry and exit addresses
     520      000b- EXIT_ADRS      .set MON_TEMP4 ; used by the internal action routines.
     521            ;
     522                           .if (MON_XTND_EITHER == MON_XTND_ON)
     523            XTND_ADRS      .set MON_TEMP5 ; Temporary for PMAP/DMAP register values.
     524                           .endif ; (MON_XTND_EITHER == MON_XTND_ON)
TMS320C24xx COFF Assembler Version 7.02  Wed Apr 16 12:20:49 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
Monitor program for C25LP HLL Real-Time Debugger.                    PAGE   15

     525            ;
     526      0000- MON_PGE0_DP    .set PRM_CMND  ; DP value for "mon_pge0" section.
     527            ;
TMS320C24xx COFF Assembler Version 7.02  Wed Apr 16 12:20:49 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
Monitor program for C25LP HLL Real-Time Debugger.                    PAGE   16

⌨️ 快捷键说明

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