CE-Programming / toolchain

Toolchain and libraries for C/C++ programming on the TI-84+ CE calculator series
https://ce-programming.github.io/toolchain/index.html
GNU Lesser General Public License v3.0
528 stars 54 forks source link

Cannot compile any ASM that includes necessary libraries #287

Closed programmer2514 closed 4 years ago

programmer2514 commented 4 years ago

I have been trying to include some ASM in a C program I'm writing, and if I include ti84pceg.inc or ez80.inc I immediately get the error:

Processed: <first thing in library>
Error: illegal instruction.

I have tried reinstalling it with no success, and attempting to build it from source throws the same error while trying to compile libload (master & LLVM branches do the same thing).

jacobly0 commented 4 years ago

Compiling ASM with the toolchain is very different from creating an entire program in ASM from scratch. For one you never need to include any framework files since the linker takes care of everything itself. Also, nobody has ported ti84pce.inc to work with either version of the toolchain, so you may want to just copy individual defines and format them like var := $ABCDEF, or look at tice.src for symbols that the linker already knows about. The ASM syntax varies a lot between the two toolchain versions, but you can always look at the ASM files that the C compiler generates in the project's obj folder to see what the proper syntax is.

programmer2514 commented 4 years ago

Thanks for the quick reply, but I'm not quite sure what you mean by $ABCDEF. Do you mean, for instance, to replace this: _OSSize equ 0020104h with this: OSSize := $020104 or does it use a different endianness or something?

adriweb commented 4 years ago

Yeah, that's fine.