Omnimaga

Calculator Community => TI Calculators => ASM => Topic started by: SomeoneWhoIsntMe on October 04, 2011, 08:02:44 am

Title: Linux - assembler for TI-83+
Post 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

Code: [Select]
spasm name.asm name.8xp
and also tried

Code: [Select]
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)
Title: Re: Linux - assembler for TI-83+
Post by: Deep Toaster on October 04, 2011, 08:55:55 am
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) :)
Title: Re: Linux - assembler for TI-83+
Post by: SomeoneWhoIsntMe on October 04, 2011, 10:48:04 am
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.

Code: [Select]
#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 :

Code: [Select]
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.
Title: Re: Linux - assembler for TI-83+
Post by: Eeems on October 04, 2011, 01:49:06 pm
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.
Title: Re: Linux - assembler for TI-83+
Post by: NanoWar on October 07, 2011, 01:19:20 pm
Maybe use the right ti38plus.inc...

http://wabbit.codeplex.com/wikipage?title=SPASM%20Include%20Files&referringTitle=Documentation
Title: Re: Linux - assembler for TI-83+
Post by: Eeems on October 08, 2011, 12:55:27 am
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.
Title: Re: Linux - assembler for TI-83+
Post by: DJ Omnimaga on October 08, 2011, 01:01:18 am
Heya and welcome here SomeoneWhoIsntMe
Title: Re: Linux - assembler for TI-83+
Post by: NanoWar on October 09, 2011, 08:04:58 am
I'm on a Linux machine since 2007 or so, but I use an old build of spasm that works wonderfully.
Title: Re: Linux - assembler for TI-83+
Post by: Eeems on October 09, 2011, 02:59:14 pm
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 ).
Title: Re: Linux - assembler for TI-83+
Post by: NanoWar on October 11, 2011, 06:46:37 am
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
Title: Re: Linux - assembler for TI-83+
Post by: Yeong on October 11, 2011, 08:07:42 am
I am about to make a second attempt on learning assembly language for my ti-81+ calculator.
TI-81+? O.O
Title: Re: Linux - assembler for TI-83+
Post by: aeTIos on October 11, 2011, 10:47:52 am
Maybe use the right ti38plus.inc...

http://wabbit.codeplex.com/wikipage?title=SPASM%20Include%20Files&referringTitle=Documentation
TI-38plus? O.O
Title: Re: Linux - assembler for TI-83+
Post by: alberthrocks on October 11, 2011, 11:47:54 am
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.
Title: Re: Linux - assembler for TI-83+
Post by: Eeems on October 11, 2011, 05:36:42 pm
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.
Title: Re: Linux - assembler for TI-83+
Post by: NanoWar on October 12, 2011, 04:35:17 am
Have you installed libgmp? I'm not sure if that matters.

The latest version of Spasm compiles the HelloWorld from above, though.
Title: Re: Linux - assembler for TI-83+
Post by: shmibs on October 12, 2011, 07:37:10 am
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.
Title: Re: Linux - assembler for TI-83+
Post by: Eeems on October 14, 2011, 06:33:06 pm
I'm pretty sure I have. I'll double check though.
Title: Re: Linux - assembler for TI-83+
Post by: SomeoneWhoIsntMe on October 19, 2011, 09:51:50 am
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  :(
Title: Re: Linux - assembler for TI-83+
Post by: Eeems on October 19, 2011, 10:55:10 am
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.
Title: Re: Linux - assembler for TI-83+
Post by: NanoWar on October 19, 2011, 11:11:06 am
Are you getting segfaults? Or do you have problems with compiling? Maybe post the console content?
Title: Re: Linux - assembler for TI-83+
Post by: Eeems on October 20, 2011, 08:17:43 pm
Segfaults. Right now the segfaults are after pass one.
Title: Re: Linux - assembler for TI-83+
Post by: NanoWar on October 25, 2011, 11:46:55 am
Got fixed here I guess :) http://revsoft.tifreakware.net/phpBB3/viewforum.php?f=15
Title: Re: Linux - assembler for TI-83+
Post by: chickendude on October 30, 2011, 04:02:16 pm
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!
Title: Re: Linux - assembler for TI-83+
Post by: DJ Omnimaga on November 01, 2011, 03:31:34 pm
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.