Author Topic: Some basic questions  (Read 9877 times)

0 Members and 1 Guest are viewing this topic.

Offline bored_student

  • LV3 Member (Next: 100)
  • ***
  • Posts: 44
  • Rating: +3/-0
    • View Profile
Some basic questions
« on: November 04, 2012, 01:51:33 pm »
Yeah I decided to learn ASM so I have read a lot but some questions still remained:  ???
1. What compiler/assembler should I use
  TI recommens the ZDS but I think it's a bit environment and I only need a compiler with documentation
2. Since the code depends on the compiler I need some documentation (not the TI hardware and routines guides
  but the basic commands like "call" or "ld"
3. Some questions that will appear when I start making my first errors :(
Sorry for my bad English, I'm German.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Some basic questions
« Reply #1 on: November 04, 2012, 02:03:54 pm »
Try this: http://www.ticalc.org/archives/files/fileinfo/268/26877.html

It's a really great tutorial and walks you through step-by-step. You can also access it online at http://eeems.omnimaga.org/files/Resources/Tutorials/ASMin28Days/lesson/toc.html.

It recommends TASM but I personally prefer Spasm, which was designed for the TI-83 Plus series. Some syntax may be different from that of TASM, however. (Or if you prefer online tools you can try my own ORG IDE ;D)
« Last Edit: November 04, 2012, 02:04:12 pm by Deep Thought »




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Some basic questions
« Reply #2 on: November 04, 2012, 02:15:46 pm »
There is also MImas if you absolutely want to program on the calculator directly, but you must be careful with data loss and limited memory.

By the way Does Spasm have that feature TIGCC had with TiEmu which automatically launched the calculator emulator (if installed) and then the calc program just by pressing Compile/test/whatever is available in Spasm? That was kinda cool in TIGCC (although it only worked with certain calculator OSes so if you had the wrong one it just sent the files to the emulator but did not launch them)
« Last Edit: November 04, 2012, 02:16:49 pm by DJ_O »

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: Some basic questions
« Reply #3 on: November 04, 2012, 03:32:35 pm »
WabbitCode (for Windows) does, or if you're on Linux you can make a simple script to compile with spasm then launch TilEm2. And yes, i also would recommend spasm. There's also Brass which some people (mainly Kerm i think) still use, though Spencer always boasted that spasm was faster. Spasm can also compile into a bunch of different formats, including applications. Though if you want to do nostub (ie uncompressed/hex) 83 games, you'll need another program (bin2hex or something along those lines).

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Some basic questions
« Reply #4 on: November 04, 2012, 07:18:20 pm »
Try this: http://www.ticalc.org/archives/files/fileinfo/268/26877.html

It's a really great tutorial and walks you through step-by-step. You can also access it online at http://eeems.omnimaga.org/files/Resources/Tutorials/ASMin28Days/lesson/toc.html.

It recommends TASM but I personally prefer Spasm, which was designed for the TI-83 Plus series. Some syntax may be different from that of TASM, however. (Or if you prefer online tools you can try my own ORG IDE ;D)

I completely agree. I learned with 28 days (and still reference it from time to time) and currently use spasm as my assembler.

If you also decide to go with this setup, this is what needs to go in your asm.bat file that you make on the first day. This is because spasm has a different command line syntax than tasm:
Code: [Select]
@echo off
copy c:\asm\source\%1.z80 %1.z80 > nul
spasm %1.z80 c:\asm\exec\%1.8xp
del %1.z80 > nul
time /T
Don't worry about that "time /T", that will help you keep your sanity later on. (Actually, don't worry about what any of it means, this is one of the hardest steps in learning to program for the 83/84.)
« Last Edit: November 04, 2012, 07:19:24 pm by thepenguin77 »
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline bored_student

  • LV3 Member (Next: 100)
  • ***
  • Posts: 44
  • Rating: +3/-0
    • View Profile
Re: Some basic questions
« Reply #5 on: November 06, 2012, 07:50:32 am »
I think SPASM is what I will use.
But is there any readme or something to learn how to use it?

If you also decide to go with this setup, this is what needs to go in your asm.bat file that you make on the first day. This is because spasm has a different command line syntax than tasm:

to be honest I don't really know what this code does and where to put it.
(I have only small experience with batch code)
Sorry for my bad English, I'm German.

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: Some basic questions
« Reply #6 on: November 06, 2012, 08:57:46 am »
Check out the documentation:
http://wabbit.codeplex.com/documentation

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Some basic questions
« Reply #7 on: November 06, 2012, 11:04:53 am »
I think SPASM is what I will use.
But is there any readme or something to learn how to use it?

If you also decide to go with this setup, this is what needs to go in your asm.bat file that you make on the first day. This is because spasm has a different command line syntax than tasm:

to be honest I don't really know what this code does and where to put it.
(I have only small experience with batch code)

Ok, to be honest, if you aren't very good with batch files, now is not the time to learn. All you need to do is to have a setup that works. The same goes for spasm. All you need is the ability to use it, you don't need to worry about how it works (yet).


So, to help you out, take this .zip file, extract it, and copy it to C:\. That way you have C:\asm\ already set up.

Then, as you go through the first day, you can just laugh at the instructions because you've already done them.
« Last Edit: November 06, 2012, 11:05:29 am by thepenguin77 »
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline bored_student

  • LV3 Member (Next: 100)
  • ***
  • Posts: 44
  • Rating: +3/-0
    • View Profile
Re: Some basic questions
« Reply #8 on: November 06, 2012, 11:45:01 am »
Shouldn't be the SPASM.EXE in the 'tasm' directory
Sorry for my bad English, I'm German.

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Some basic questions
« Reply #9 on: November 06, 2012, 05:39:35 pm »
Oops, forgot to include that. Yes
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline bored_student

  • LV3 Member (Next: 100)
  • ***
  • Posts: 44
  • Rating: +3/-0
    • View Profile
Re: Some basic questions
« Reply #10 on: November 07, 2012, 06:12:44 am »
a explanation in the tutorial Deep Thought gave me says:
http://eeems.omnimaga.org/files/Resources/Tutorials/ASMin28Days/lesson/day02.html

Quote
.org number    Specifies where in memory the program is loaded into (not exactly true), which is always $9D95.

Why is it always $9D95?
I mean if there is stored something other this "other" will be overwritten by the program code.

Deep Thought also mentioned this location in his SMC tutorial:
http://www.omnimaga.org/index.php?action=articles;sa=view;article=91
Quote
You also know the absolute location of the start of the program (it's E9D93).

Sorry for my bad English, I'm German.

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Some basic questions
« Reply #11 on: November 07, 2012, 06:15:01 am »
It is always $9D95 because there's where the free RAM for programs starts (I think...)
I'm not a nerd but I pretend:

Offline bored_student

  • LV3 Member (Next: 100)
  • ***
  • Posts: 44
  • Rating: +3/-0
    • View Profile
Re: Some basic questions
« Reply #12 on: November 07, 2012, 06:21:56 am »
I always thought the memory management on the TI 83 Plus is dynamic so that the data is stored somewhere where you have free RAM  <_<
Sorry for my bad English, I'm German.

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Some basic questions
« Reply #13 on: November 07, 2012, 06:23:02 am »
Could also be. I'm not really knowledgeable on this part.
I'm not a nerd but I pretend:

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Some basic questions
« Reply #14 on: November 07, 2012, 09:36:17 am »
Yes, the memory management system is dynamic, but assembly programs are always moved to $9D95 before they're run. Variables are shifted around so that the the program ends up there.

It's actually moved to $9D93, but since there's a two-byte header of $BB,$6D, the program code starts at $9D95. Some people might put the .org statement before the two bytes, in which case it's be .org $9D93.

It makes absolute addressing easier because you know the beginning of the program is always there.