• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::

論壇索引


Board index » All Posts (jlian)




Re: 請問18系列之RAM及*.LKR問題?
資深會員
資深會員


大家好:
那麼再請問=>
My_RAM0 UDATA該如何定址?
另外再請問=>程式如下(由help中copy的測試用):
;*******************************************************
;
main.asm
;*******************************************************
  
#include p16f877a.inc  ;Include standard header file
                         
;for the selected device.
  
UDATA
  delay_value  res  1
  
  
GLOBAL  delay_value    ;The variable 'delay_value',
                         ;
declared GLOBAL in this
                         
;moduleis included in an
                         
;EXTERN directive in the module
                         
;sub.asm.
  
EXTERN  delay          ;The variable 'delay'declared
                         
;EXTERN in this moduleis
                         
;declared GLOBAL in the module
                         
;sub.asm.
RST     CODE     0x0      ;The code section named RST
                          
;is placed at program memory
                          
;location 0x0The next two
                          
;instructions are placed in
                          
;code section RST.
     
pagesel  start       ;Jumps to the location labelled
     
goto     start       ;'start'.
PGM     CODE              ;This is the begining of the
                          
;code section named PGMIt is
                          
;a relocatable code section
                          
;since no absolute address is
                          
;given along with directive CODE.
start
  movlw  D
'10'
  
movwf  delay_value
  xorlw  0x80
  call   delay
  
  
goto   start
  end  
;*******************************************************
       ;*******************************************************
;
sub.asm
;*******************************************************
  
#include p16f877a.inc  ;Include standard header file
                         
;for the selected device.
  GLOBAL  
delay          ;The variable 'delay' declared
                         
;GLOBAL in this module is
                         
;included in an EXTERN directive
                         
;in the module main.asm.
  
EXTERN  delay_value    ;The variable 'delay_value' 
                         
;declared EXTERN in this module
                         
;is declared GLOBAL in the  
                         
;module main.asm.
PGM  CODE
delay
  decfsz  delay_value
,1
  
goto   delay
  
return
  
end
             為何會出現這樣警告
?
      
Warning[207D:TESTMCUPICTS_GLOBALMAIN.ASM 7 Found label after column 1. (delay_value)


請幫忙Thanks.

發表於: 2007/9/11 11:05
頂部


請問18系列之RAM及*.LKR問題?
資深會員
資深會員


大家好:
我是參考曾百由的著作"ASM與PIC18"(LCD部分),那麼
我自己加入一些副程式;有定義一些變數,利用equ或
cblock,但在watch或file register卻找不到?另外為何
一定要載入*.LKR檔呢?(18f4423).
以上兩個問題希望有那位高手幫忙解答.Thanks

發表於: 2007/9/11 9:23
頂部


Re: 請問那位高手知道CCS中RAM的變數如何定址?
資深會員
資深會員


大家好:
我應該已找到了.
unsigned char A;
#locate A=0x30要設稍為大一點,
可能是compiler要用到吧!Thanks.

發表於: 2007/8/29 11:20
頂部


請問那位高手知道HI-TIDEV3如何輸出List檔?
資深會員
資深會員


大家好:
我有從HI-TECH網站上,下載HI-TIDEV3來試.
覺得還不錯;只是它的open及close project
較奇怪,而且不知如何輸出List檔及詳細設定
還不是很清楚?希望大家多多教流.Thanks.

發表於: 2007/8/29 10:39
頂部


請問那位高手知道CCS中RAM的變數如何定址?
資深會員
資深會員


大家好:
我在CCS中定義
#define CNT 100
#byte A
而在程式執行時A卻會被重填回原值,無法--;
void main(void)
{
A=CNT;
for(;;)
{
if(A==8) break;
}
}
#int_tmr0
void timer0_isr(void)
{
if(A>0) A--;
RTCC=6;
}
但設為unsigned char A;時雖然正常但卻無法自行定址!!!
請高手幫忙解答,Thanks.

發表於: 2007/8/29 10:31
頂部


Re: 請問picc 如何輸出asm list檔?
資深會員
資深會員


感謝你的回覆:
但像a=i*j及b=x/y卻沒有翻!
Thanks.

發表於: 2007/8/27 11:12
頂部


Re: 請問版大,關於C語言的Bootloader
資深會員
資深會員


版主大人:
可否版大也傳給我參考一下!
Thanks.

發表於: 2007/8/21 20:47
頂部


Re: 請問picc 如何輸出asm list檔?
資深會員
資深會員


版主及大家好:
附上list檔 Thanks

HI-TECH Software PICC Macro Assembler V8.05PL1
Serial number
HCPIC-25020                            Fri Aug 17 09:38:01 2007

Licensed to
ONE TWO
     1                               processor    16F684
     2                               opt    pw 79
     3                               psect    __Z25020RS_
,global,delta=1
     4                               psect    text0
,local,class=CODE,delta=2
     5                               psect    text1
,local,class=CODE,delta=2
     6                               psect    text2
,local,class=CODE,delta=2
     7                               psect    text3
,local,class=CODE,delta=2
     8  0000                     
     9  0000                     
    10  0000                     
    11  0000                     
    12  0000                     
    13  0000                     
    14  0000                     
    15  0000                     
    16  0000                     
    17  0000                     
    18                           
    19                               psect    __Z25020RS_
    20  00A0                     
    21  00A0                     
    22                           
    23                               psect    text0
    24  07EC                     _main
    25                           
;    _j assigned to ?a_main+0
    26  0000                     _main$j    set    
?a_main
    27                           
;    _i assigned to ?a_main+1
    28  0000                     _main$i    set    
?a_main+1
    29                           
;    _k assigned to ?a_main+3
    30  0000                     _main$k    set    
?a_main+3
    31                           
;TS_HTC.C6unsigned int i,k;
    
32  07EC  3088                   movlw    136
    33  07ED  1283                   bcf    3
,5
    34  07EE  00A1                   movwf    
?a_main+1
    35  07EF  3013                   movlw    19
    36  07F0  00A2                   movwf    
?a_main+2
    37                           
;TS_HTC.C9j=50;
    
38  07F1  3032                   movlw    50
    39  07F2  00A0                   movwf    
?a_main
    40                           
;TS_HTC.C10k=i/j//這一乘法    
                                                             
沒有翻成ASM!!!
    
41  07F3  3064                   movlw    100
    42  07F4  00A3                   movwf    
?a_main+3
    43  07F5  01A4                   clrf    
?a_main+4
    44                           
;TS_HTC.C11delay(1000);
    
45  07F6  30E8                   movlw    232
    46  07F7  00A5                   movwf    
?_delay
    47  07F8  3003                   movlw    3
    48  07F9  00A6                   movwf    
?_delay+1
    49  07FA  27DA                   call    _delay
    50                           
;TS_HTC.C12delay1(10);
    
51  07FB  300A                   movlw    10
    52  07FC  00A5                   movwf    
?_delay1
    53  07FD  01A6                   clrf    
?_delay1+1
    54  07FE  27C8                   call    _delay1
    55                           
;TS_HTC.C13: }
    
56  07FF  2804                   ljmp    start
    57                           
    58                               psect    text1
    59  07DA                     _delay
    60                           
;    _j assigned to ?a_delay+0
    61  0000                     _delay$j    set    
?a_delay
    62                           
;TS_HTC.C17unsigned int j;
    
63  07DA  300A                   movlw    10
    64  07DB  1283                   bcf    3
,5
    65  07DC  00A7                   movwf    
?a_delay
    66  07DD  01A8                   clrf    
?a_delay+1
    67                           
;TS_HTC.C19: while(i>ji--;
    
68  07DE  2FE3                   goto    l3
    69  07DF                     l4
    70  07DF  
08A5                   movf    ?_delay
    71  07E0  1903                   btfsc    3
,2
    72  07E1  03A6                   decf    
?_delay+1
    73  07E2  03A5                   decf    
?_delay
    74  07E3                     l3
    75  07E3  
0826                   movf    ?_delay+1,w
    76  07E4  
0228                   subwf    ?a_delay+1,w
    77  07E5  1D03                   btfss    3
,2
    78  07E6  2FE9                   
goto    u15
    79  07E7  
0825                   movf    ?_delay,w
    80  07E8  0227                   subwf    
?a_delay,w
    81  07E9                     u15
    82  07E9  1803                   btfsc    3
,0
    83  07EA  
0008                   return
    
84  07EB  2FDF                   goto    l4
    85                           
    86                               psect    text2
    87  07C8                     _delay1
    88                           
;    _j assigned to ?a_delay1+0
    89  0000                     _delay1$j    set    
?a_delay1
    90                           
;TS_HTC.C24unsigned int j;
    
91  07C8  30E8                   movlw    232
    92  07C9  1283                   bcf    3
,5
    93  07CA  00A7                   movwf    
?a_delay1
    94  07CB  3003                   movlw    3
    95  07CC  00A8                   movwf    
?a_delay1+1
    96                           
;TS_HTC.C26: while(i<ji++;
    
97  07CD  2FD1                   goto    l7
    98  07CE                     l8
    99  07CE  0AA5                   incf    
?_delay1
   100  07CF  1903                   btfsc    3
,2
   101  07D0  0AA6                   incf    
?_delay1+1
   102  07D1                     l7
   103  07D1  
0828                   movf    ?a_delay1+1,w
   104  07D2  0226                   subwf    
?_delay1+1,w
   105  07D3  1D03                   btfss    3
,2
   106  07D4  2FD7                   
goto    u25
   107  07D5  
0827                   movf    ?a_delay1,w
   108  07D6  0225                   subwf    
?_delay1,w
   109  07D7                     u25
   110  07D7  1803                   btfsc    3
,0
   111  07D8  
0008                   return
   
112  07D9  2FCE                   goto    l8
   113                           
   114                               psect    text3
   115  0000                     
   116  0000                     
   117  0000                     
   118  0000                     
   119  0000                     
   120  0000                     
   121  0000                     
   122  0000                     
   123  0000                     
             


HI
-TECH Software PICC Macro Assembler V8.05PL1
Symbol Table                                          Fri Aug 17 
09:38:01 2007

    
?_delay 0025      ?a_main 0020           l3 07E3           l4 07DF  
         l7 07D1           l8 07CE     
?a_delay 0027     ?_delay1 0025  
        u15 07E9          u25 07D7    
?a_delay1 0027      _delay1 07C8  
      _main 07EC        start 0004       _delay 07DA       status 0003


發表於: 2007/8/17 12:08
頂部


請問picc 如何輸出asm list檔?
資深會員
資深會員


版主及大家好:
請問picc v8.05如何compile輸出完整asm list檔.
因都有設定,但有 一些C的code沒有翻譯成Asm,
個人不知為何會這樣! 請賜教 Thanks.

發表於: 2007/8/17 11:50
頂部



« 1 ... 70 71 72 (73)



:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------