Omnimaga
Calculator Community => TI Calculators => ASM => Topic started by: SomeoneWhoIsntMe on October 04, 2011, 08:02:44 am
-
Hi everyone,
I am about to make a second attempt on learning assembly language for my ti-81+ calculator.
But i dont want to boot up windows every time i do asm programming, basically because it sucks :banghead:
I got tilem emulator working and now i am in search for a good assembler. On windows I used Latenite IDE with the built-in brass, but i think, this one wont work under Linux. I got spasm compiling using
spasm name.asm name.8xp
and also tried
spasm name.asm name.8xp -DTI83P
as suggested here: http://wikiti.brandonw.net/index.php?title=Programming_cross_z80_calculators (http://wikiti.brandonw.net/index.php?title=Programming_cross_z80_calculators)
Both files aren't recognized by tilem. the emulator is just stating "Unknown or invalid file format, aborting". It works when using a 8xp-file compiled with brass in windows though.
Can anyone help me with this? I don't have to use spasm, any other assembler with a similar syntax will be just fine, but i dont really want to use wine, a native linux solution would be far superior.
Thanks in advance! (and please excuse my poor English)
-
I think the syntax is spasm -DTI83P <source>.asm <exec>.8xp.
And welcome to Omnimaga, SomeoneWhoIsntMe! You should introduce yourself here (http://www.omnimaga.org/index.php?board=10.0) :)
-
First of all thanks for the Welcome. I'm definitely going to introduce myself to the forums.
It turned out, that I downloaded a somewhat strange version of the spasm assembler which didn't want to accept the -DTI83P before listing the input and output files. Now I downloaded it once again, this time from this source:
http://wabbit.codeplex.com/releases/view/45088 (http://wabbit.codeplex.com/releases/view/45088)
I wrote the following example code and compiled it.
#define TI83P
#include "ti83plus.inc"
start:
.org $9D95
.db $BB,$6D
ld a,5
ld b,2
add a,b
ld h,0
ld l,a
bcall(_DispHL)
bcall(_newLine)
ret
Using "spasm -DTI83P name.asm name.8xp" i get :
Pass one...
Pass two...
Done
exporter:-1: warning: First character in name must be a letter.
So it compiles, but in tilem the file does have an empty name and doesn't run as well. Seems to me like there is one more thing missing in my code or in the compiler options I used?! <_<
It IS working to assemble the source using "spasm -DTI83P name.asm" and then using binpac8x ("./binpac8x.py name.bin") to convert it to a .8xp-file though. I thought devpac/binpac are only needed when using tasm??? What is it good for anyway? some kind of linker?
This solution seems to me like just a workaround. Hopefully someone can tell me how to solve this by just using spasm.
-
I've been having issues with spasm as well on linux. Buckeye said he was going to look into it but he never got around to it yet.
That version is an old one so you might want to try building from the source. If that doesn't work ( probably wont even build ) then this one you have, it will be able to build the hex files, but not compile them into 8xp's so you need to figure out a way to convert them to an 8xp.
( The reason it's not working is because of some bad code with the exporter when it comes to naming on Linux )
EDIT: just tested the latest svn, it's seg faulting on the first pass, so just stick with what you have for now.
-
Maybe use the right ti38plus.inc...
http://wabbit.codeplex.com/wikipage?title=SPASM%20Include%20Files&referringTitle=Documentation
-
Maybe use the right ti38plus.inc...
http://wabbit.codeplex.com/wikipage?title=SPASM%20Include%20Files&referringTitle=Documentation
That's not the issue. It's actually spasm's issue. Spasm hasn't been made specifically for Linux and therefore hasn't actually been tested that much on it until recently.
-
Heya and welcome here SomeoneWhoIsntMe
-
I'm on a Linux machine since 2007 or so, but I use an old build of spasm that works wonderfully.
-
I'm on a Linux machine since 2007 or so, but I use an old build of spasm that works wonderfully.
Mind sharing it? The latest ones do not work ( seg fault either at the end before it writes out, or in pass one ).
-
Yeah, I've been searching for the source, but only found the bins... running on ubuntu 64-bit.
http://dl.dropbox.com/u/902690/ti/spasm-64
http://dl.dropbox.com/u/902690/ti/wabbitemu-wine.exe
-
I am about to make a second attempt on learning assembly language for my ti-81+ calculator.
TI-81+? O.O
-
Maybe use the right ti38plus.inc...
http://wabbit.codeplex.com/wikipage?title=SPASM%20Include%20Files&referringTitle=Documentation
TI-38plus? O.O
-
I've been having issues with spasm as well on linux. Buckeye said he was going to look into it but he never got around to it yet.
That version is an old one so you might want to try building from the source. If that doesn't work ( probably wont even build ) then this one you have, it will be able to build the hex files, but not compile them into 8xp's so you need to figure out a way to convert them to an 8xp.
( The reason it's not working is because of some bad code with the exporter when it comes to naming on Linux )
EDIT: just tested the latest svn, it's seg faulting on the first pass, so just stick with what you have for now.
Heh, I might have a build... but my Linux USB HDD crashed... really hard... recently, so I'm not too sure if I can fetch it out.
-
Yeah, I've been searching for the source, but only found the bins... running on ubuntu 64-bit.
http://dl.dropbox.com/u/902690/ti/spasm-64
http://dl.dropbox.com/u/902690/ti/wabbitemu-wine.exe
Hmm, tried that and even though I'm on a 64bit system and I installed libcrypto it couldn't seem to open it. No idea whats going on.
-
Have you installed libgmp? I'm not sure if that matters.
The latest version of Spasm compiles the HelloWorld from above, though.
-
hmm, that's odd...
when i tried compiling with the latest pre-built version from wabbitcode it initially made wabbit spazz out, but when i stuck spasm in my /bin it worked fine.
-
I'm pretty sure I have. I'll double check though.
-
First of all thanks for all the posts.
Sadly I haven't had the time to experiment a lot during the past weeks. I only compiled a few programs and everything seems to work using the method described in my second post. I'm happy with that for now, especially since i don't really have much time for programming for my calculator at the moment :(
-
So I did have libgmp installed. I also tried with a legacy version of libgmp ( libgmp.so.3 ) and it works even worse then before.
-
Are you getting segfaults? Or do you have problems with compiling? Maybe post the console content?
-
Segfaults. Right now the segfaults are after pass one.
-
Got fixed here I guess :) http://revsoft.tifreakware.net/phpBB3/viewforum.php?f=15
-
I'd just install burntfuse's linux ide, that always worked wonderfully for me. That and PindurTI through wine (WabbitEmu gave me weird problems). Welcome to the asm world!
-
I thought Burntfuse's IDE merged with Spasm or Wabbitcode? ???
Also welcome to Omni's english section Chickendude. :) On a side note you should really hop on AIM again one day :P
As for WabbitEmu+Wine sometimes programs might not work perfectly in Wine for some reasons. I remember playing Starcraft vs Shmibs and he kept getting disconnected from multiplayer games after 3 minutes or so, not to mention the chat area in game was screwed up. Also PTI gives accurate emulation for the most part, just no 15 MHz calc emulation. I still use it sometimes.