ASSEMBLY LANGUAGE PROBLEM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ASSEMBLY LANGUAGE PROBLEM

Jump to solution
1,619 Views
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          
Labels (1)
Tags (1)
0 Kudos
1 Solution
621 Views
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

View solution in original post

0 Kudos
3 Replies
621 Views
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 Kudos
621 Views
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 Kudos
622 Views
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 Kudos