ASSEMBLY LANGUAGE PROBLEM

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

ASSEMBLY LANGUAGE PROBLEM

跳至解决方案
2,490 次查看
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,492 次查看
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,492 次查看
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,492 次查看
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,493 次查看
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 项奖励
回复