ASSEMBLY LANGUAGE PROBLEM

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

ASSEMBLY LANGUAGE PROBLEM

ソリューションへジャンプ
2,506件の閲覧回数
A_Al_Shaybani
Contributor I
CANT RUN THIS !!! error in export symbols ????? can any one check it :smileysad: 
 
 
; Include derivative-specific definitions
            INCLUDE 'derivative.inc'

; export symbols
            XDEF Entry, _Startup, main
            ; we use export 'Entry' as symbol. This allows us to
            ; reference 'Entry' either in the linker .prm file
            ; or from C/C++ later on

            XREF __SEG_END_SSTACK      ; symbol defined by the linker for the end of the stack




; variable/data section
MY_EXTENDED_RAM: SECTION
; Insert here your data definition.
Counter     ds.w 1
FiboRes     ds.w 1


; code section
TAA   EQU   $800
TBB   EQU   $801

       LDAA  #100
       STAA  TAA
BACK   LDAA  #10
       STAA  TBB
HERE   DEC   TBB
       BNE   HERE
       DEC   TAA
       BNE   BACK
       RTS          
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,508件の閲覧回数
CrasyCat
Specialist III

Hello

 

There are a couple of issues in the snippet you have provided.

 

In there you have a comment

; code section

This is not enough to define a code section for your application. You need to define a code section as follows:

MY_CODE: SECTION

 

Next you need to define a label for the beginning of the actual code.

For instance:

main:
       LDAA  #100
       STAA  TAA

Finally you have no labels Entry or _Startup in your code. So you need to remove those symbol names from the XDEF line

 

Once that is done you should be able to assemble the source file.

 

 

CrasyCat

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,508件の閲覧回数
CrasyCat
Specialist III

Hello

- Which CPU are you targeting (HC08, HC12, Coldfire, ..)
- Which version of CodeWarrior are you using?
   To retrieve that info:
     - Start CodeWarrior
     - Select Help -> About Freescale CodeWarrior
     - Click on "Install Products"
     - CodeWarrior version used is displayed on top in the Installed Products dialog.

 

CrasyCat

0 件の賞賛
返信
1,508件の閲覧回数
A_Al_Shaybani
Contributor I

I am using Dragon Board with HCS12 MC9S12DG256 with

 

CodeWarrior development studio for s12(x) version 5.0 build 9061

 

so what to do next ................... 

Message Edited by A.Al-Shaybani on 2009-10-21 02:31 PM
0 件の賞賛
返信
1,509件の閲覧回数
CrasyCat
Specialist III

Hello

 

There are a couple of issues in the snippet you have provided.

 

In there you have a comment

; code section

This is not enough to define a code section for your application. You need to define a code section as follows:

MY_CODE: SECTION

 

Next you need to define a label for the beginning of the actual code.

For instance:

main:
       LDAA  #100
       STAA  TAA

Finally you have no labels Entry or _Startup in your code. So you need to remove those symbol names from the XDEF line

 

Once that is done you should be able to assemble the source file.

 

 

CrasyCat

0 件の賞賛
返信