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

📄 start.lst

📁 how to use display powertip PG 320x240
💻 LST
📖 第 1 页 / 共 4 页
字号:
                   743   
                   744   
                   745   ; Unpack one double precision floating point operand
                   746   #line 748 "c:\program files\tasking\c166 v8.0\include\head.asm"
                   748   
                   749   
                   750   ; Unpack two double precision floating point operands
                   751   #line 760 "c:\program files\tasking\c166 v8.0\include\head.asm"
                   760   
                   761   #line 23 "start.asm"
                    23   $INCLUDE(_c_init.asm)                   ; Initialize C variables
                    24   #line 1 "c:\program files\tasking\c166 v8.0\include\_c_init.asm"
                     1   ;*****************************************************************************
                     2   ;*
                     3   ;* MODULE       : _c_init.asm
                     4   ;*
                     5   ;* DESCRIPTION  : C copy table code for C16x/ST10 microcontroller.
                     6   ;*
                     7   ;*              - Initialization of static variables in internal or external
                     8   ;*                ram. C variables which have to be initialized are specified
TASKING C166/ST10 assembler v8.0r1 Build 256 SN 00096962                    Date: Apr 23 2004  Time: 16:27:03  Page:   9
start

 LOC CODE        LINE   SOURCELINE

                     9   ;*                in ROM section C166_INIT. C variables which must
                    10   ;*                be cleared are specified in ROM section C166_BSS.
                    11   ;*              - Set user stack pointer.
                    12   ;*
                    13   ;* Copyright 1997-2003 Altium BV
                    14   ;*
                    15   ;*****************************************************************************
                    16   
                    17   
                    18           ASSUME  DPP3:SYSTEM     ; assume system data page pointer.
                    19   
                    20   
                    21   PUBLIC __C_INIT
                    22                                                   
                    23           ; Predefined functions for register R1, R2 and R3.
                    24           POF_RAM         LIT     'R1'    ; Page offset address ram data.
                    25           SOF_RAM         LIT     'R1'    ; Segment offset address ram data.
                    26           SOF_RAM_H       LIT     'RH1'   ; Segment address high byte.
                    27           POF_ROM         LIT     'R2'    ; Page offset address rom data.
                    28           SOF_ROM         LIT     'R2'    ; Segment offset address rom data.
                    29           SOF_ROM_H       LIT     'RH2'   ; Segment address high byte.
                    30           BP_RAM          LIT     'R3'    ; Bit position ram data
                    31   
                    32   ;*****************************************************************************
                    33   ;* __C_INIT
                    34   ;*****************************************************************************
                    35   __C_INIT_PR     SECTION CODE PUBLIC 'C_INIT'
                    36   
                    37   #line 39 "c:\program files\tasking\c166 v8.0\include\_c_init.asm"
                    39   
                    40   __C_INIT        PROC NEAR
                    41                   
                    42   #line 44 "c:\program files\tasking\c166 v8.0\include\_c_init.asm"
                    44   
                    45           BOTTOM_BITRAM   LIT  '0FD00H'
                    46   
                    47   
                    48   #line 55 "c:\program files\tasking\c166 v8.0\include\_c_init.asm"
                    55   
                    56   
                    57   
                    58                                           ; Clear bit addressable memory
0000 E6F1FEFD       59           MOV     R1, #0FDFEH             ; R1 = top of bit addressable area
0004 46F10000  R    60   loop:   CMP     R1, #CSTART_RBANK + 2   ; if( R1 in bit addressable area )
0008 2D05           61           JMP     CC_EQ, cbclr            ; then continue next (bit) word clear.
                    62           
000A 46F10000  R    63           CMP     R1, #CSTART_RBANK       ; if (R0 in bit addressable area )
000E 2D02           64           JMP     CC_EQ, cbclr            ; then continue next (bit) word clear.
                    65           
0010 84011CFF       66           MOV     [R1], ZEROS             ; clear
0014 B6F100FD       67   cbclr:  CMPD2   R1, # BOTTOM_BITRAM     ; if( not bottom bit addressable area )
0018 3DF5           68           JMP     CC_NE, loop             ; then continue next (bit) word clear
                    69           
                    70   
                    71   
TASKING C166/ST10 assembler v8.0r1 Build 256 SN 00096962                    Date: Apr 23 2004  Time: 16:27:03  Page:  10
start

 LOC CODE        LINE   SOURCELINE

                    72                                            ; C166_INIT
                    73   
001A E6F40000  R    74           MOV     R4,  #POF ?C166_INIT_HEAD ; move intra-page offset address rom
                    75                                            ; data section C166_INIT to R4
001E                76   INIT_DPP0:                               ;
001E E6000000  R    77           MOV     DPP0,#PAG ?C166_INIT_HEAD ; load data page pointer register DPP0
                    78                                            ; with data page of rom data C166_INIT
0022 CC00           79           NOP                              ; delay for pipeline effect
                    80   
                    81   #line 84 "c:\program files\tasking\c166 v8.0\include\_c_init.asm"
                    84   
                    85                   
0024                86   INIT:                                   ;
0024 9854           87           MOV     R5, [R4+]               ; INIT block header code -> R5
0026 4851           88           CMP     R5, #01H                ; check if header code 1 (bit)
0028 2D40           89           JMP     CC_EQ, INIT_01          ;
                    90           
                    91   
                    92   #line 101 "c:\program files\tasking\c166 v8.0\include\_c_init.asm"
                   101   
                   102   
                   103   
002A 4856          104           CMP     R5, #06H                ; check if header code 6 (far)
002C 2D2C          105           JMP     CC_EQ, INIT_06          ;
                   106           
002E 4857          107           CMP     R5, #07H                ; check if header code 7 (huge)
0030 3D3F          108           JMP     CC_NE, INIT_END         ; if(no header code) end initialization
                   109           
                   110   
0032               111   INIT_07:                                ; initialize huge ram data. (data > 64K)
0032 9814          112           MOV     SOF_RAM, [R4+]          ; move intra-segment offset address ram
                   113                                           ; data block to SOF_RAM=R1
0034 9834          114           MOV     R3, [R4+]               ; move segment address ram data block 
                   115                                           ; to register R3
                   116                                           ; process data page number ram data
0036 F173          117           MOV     RH3, SOF_RAM_H          ; R3.15, R3.14: low bits of page number (byte forwardin
                         g)
                   118           
                   119           
                   120           
0038 1C23          121           ROL     R3, #2                  ; shift R3.15, R3.14 to R3.1 and R3.0
003A 66F3FF03      122           AND     R3, #03FFH              ; mask page number
003E F6F302FE      123           MOV     DPP1, R3                ; load data page pointer register DPP1
                   124                                           ; with data page of ram data block
0042 FEF1          125           BCLR    SOF_RAM.15              ; DPP1:POF_RAM ->SOF_RAM
0044 EFF1          126           BSET    SOF_RAM.14              ;
                   127                                           ;
0046 9824          128           MOV     SOF_ROM, [R4+]          ; move intra-segment offset address rom
                   129                                           ; data block to SOF_ROM=R2
0048 9834          130           MOV     R3, [R4+]               ; move segment address rom data block
                   131                                           ; to R3
                   132                                           ; process data page number rom data
004A F175          133           MOV     RH3, SOF_ROM_H          ; R3.15, R3.14=low bits of page number (byte forwarding
                         )
                   134           
TASKING C166/ST10 assembler v8.0r1 Build 256 SN 00096962                    Date: Apr 23 2004  Time: 16:27:03  Page:  11
start

 LOC CODE        LINE   SOURCELINE

                   135           
                   136   
004C 1C23          137           ROL     R3, #2                  ; shift R3.15, R3.14 to R3.1 and R3.0
004E 66F3FF03      138           AND     R3, #03FFH              ; mask page number
0052 F6F304FE      139           MOV     DPP2, R3                ; load data page pointer register DPP2
                   140                                           ; with data page of rom data block
0056 FFF2          141           BSET    SOF_ROM.15              ; DPP2:POF_ROM ->SOF_ROM
0058 EEF2          142           BCLR    SOF_ROM.14              ;
                   143                                           ;
005A 9854          144           MOV     R5, [R4+]               ; number of bytes (R6:R5) to move from
005C 9864          145           MOV     R6, [R4+]               ; rom to ram. MSW=R6, LSW=R5 (long word)
                   146                                           ;
005E               147   MB07_3: ; Service Watchdog Timer (if enabled)
005E A005          148           CMPD1   R5, #0                  ; test if all bytes are moved and
0060 3D02          149           JMP     CC_NE, MB07_1           ; decrement number of bytes to move.
                   150           
0062 A006          151           CMPD1   R6, #0                  ;
                   152   #line 155 "c:\program files\tasking\c166 v8.0\include\_c_init.asm"
                   155     
0064 2DDF          156           JMP     CC_EQ, INIT             ; if( block end ) next initialization
                   157           
                   158     
0066 C912          159   MB07_1: MOVB    [SOF_RAM], [SOF_ROM]    ; move byte from rom to ram
0068 86F1FF7F      160           CMPI1   SOF_RAM, #07FFFH        ; test end of data page and inc SOF_RAM
006C 3D04          161           JMP     CC_NE, MB07_2           ; if(no page end) cont init current page
                   162           
006E E6F10040      163           MOV     SOF_RAM, #04000H        ; preset offset address ram data
0072 06010100      164           ADD     DPP1, #1                ; next page of ram data; increment DPP1
0076 86F2FFBF      165   MB07_2: CMPI1   SOF_ROM, #0BFFFH        ; test end of page and inc SOF_ROM
007A 3DF1          166           JMP     CC_NE, MB07_3           ; if(no page end) cont init current page
                   167           
007C E6F20080      168           MOV     SOF_ROM, #08000H        ; preset offset address rom data
0080 06020100      169           ADD     DPP2, #1                ; next page of rom data; increment DPP2
0084 0DEC          170           JMP     CC_UC, MB07_3           ; jump for next byte move
                   171   #line 175 "c:\program files\tasking\c166 v8.0\include\_c_init.asm"
                   175     
                   176   
0086               177   INIT_06:                                ; initialize far ram data. (CPU mode 
                   178                                           ; is segmented with DPP usage linear
                   179                                           ; or paged.)
0086 9814          180           MOV     POF_RAM, [R4+]          ; move intra-page offset address ram
                   181                                           ; data block to POF_RAM=R1
0088 FEF1          182           BCLR    SOF_RAM.15              ; DPP1:POF_RAM ->SOF_RAM
008A EFF1          183           BSET    SOF_RAM.14              ;
008C 940402FE      184           MOV     DPP1, [R4]              ; load data page pointer register DPP1
                   185                                           ; with data page of ram data block
0090 0842          186           ADD     R4, #2                  ; inc offset address to ram data section
                   187                                           ; C166_INIT and also insure a delay for
                   188                                           ; pipeline effect.(DPP1 set)
                   189                                           ;
0092 9824          190           MOV     POF_ROM, [R4+]          ; move intra-page offset address rom
                   191                                           ; data block to POF_ROM=R2
0094 FFF2          192           BSET    SOF_ROM.15              ; DPP2:POF_ROM ->SOF_ROM
0096 EEF2          193           BCLR    SOF_ROM.14              ;
0098 940404FE      194           MOV     DPP2, [R4]              ; load data page pointer register DPP2
TASKING C166/ST10 assembler v8.0r1 Build 256 SN 00096962                    Date: Apr 23 2004  Time: 16:27:03  Page:  12
start

 LOC CODE        LINE   SOURCELINE

                   195                                           ; with data page of rom data block
009C 0842          196           ADD     R4, #2                  ; inc offset address to rom data section
                   197                                           ; C166_INIT and also insure a delay for
                   198                                           ; pipeline effect.(DPP2 set)
                   199                                           ;
009E 9854          200           MOV     R5, [R4+]               ; number of bytes to move from rom to
                   201                                           ; ram for specified data block.
                   202                                           ;
00A0               203   MB06_1: ; Service Watchdog Timer (if enabled)
00A0 A005          204           CMPD1   R5, #0                  ; test on data block end
                   205   #line 218 "c:\program files\tasking\c166 v8.0\include\_c_init.asm"
                   218     
00A2 2DC0          219           JMP     CC_EQ, INIT             ; if( block end ) next initialization
                   220           
00A4 E912          221           MOVB    [SOF_RAM], [SOF_ROM+]   ; move byte from rom to ram, inc SOF_ROM
00A6 0811          222           ADD     SOF_RAM, #1             ; inc SOF_RAM
00A8 0DFB          223           JMP     CC_UC, MB06_1           ; jump for next byte move
                   224     
                   225   
                   226   
                   227   #line 259 "c:\program files\tasking\c166 v8.0\include\_c_init.asm"
                   259   
                   260   
                   261   #line 370 "c:\program files\tasking\c166 v8.0\include\_c_init.asm"
                   370   ; NO BIT INITIALIZATION

⌨️ 快捷键说明

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