SX Asm: Symbol not defined
It appears that the location of my functions affects·whether my code compiles.· If the functions are defined at the bottom of my 'main' file·then no problems.· If the functions are defined in an include file then I get symbol not defined errors.·The errors all relate to labels defined inside macros!
Help!
Help!
Comments
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.iElectronicDesigns.com
·
You may need two 'load' or 'include' files. One for the function prototypes inserted where the functions are typically defined, then one at the where you typically put your functions. It sounds like the compiler is not understanding the function declaration.
What Bean suggested is to have two seperate files. One has the constants and stuff (Bean calls that the header), then another has the actual code (that Bean calls the body). So he would use something like LOAD "MATH_HDR.SXB" then LOAD "MATH.SXB".
Think of both as "Insert Code Here >"
Give that a try, if it doesn't work, we'll try again!
Rodney
I already have ten included files and as I previously descovered - that's your lot!
The actual code is split into ten files because they are some what self contained - like the VP files, each file describes a separate object.
;******************************** test.src
__TEST_
TestMacro macro
:test
endm
org $200
TestFunc
TestMacro
retp
;********************************************* main file
IFNDEF __TEST_
INCLUDE "test.src"
ENDIF
ClrRegisters macro
:zero_ram
endm
org $0
ClrRegisters ; sets every thing to 0
:Main
;call @TestFunc
jmp :Main
END
Ivan