Jump to content
Sign in to follow this  
CamTheBridge

Learning Assembly

Recommended Posts

Hey all,

 

Not sure if you remember me, but I used to be on the threads here a bunch 2 years ago. From what I understand I'm quite a bit younger than most of you (early 20's) and life kind of got in the way (finishing college finding a job etc.) so I didn't have time to play around with old computers and such recently. However I am feeling incredibly ambitious now that I have some more time and I was wondering how you all would recommend learning assembly? I played around a lot with extended BASIC and I really want to have full reign now. Are there any specific books you recommend? I have the editor assembler/nano PEB and voice synthesizer. Another question I have is: If you are programming in assembly, can you access the speech synthesis without any extra disks or carts? Or do you need a program (or perhaps to create a program) that can synthesize speech?

 

Thanks so much all!

  • Like 2

Share this post


Link to post
Share on other sites
8 minutes ago, CamTheBridge said:

If you are programming in assembly, can you access the speech synthesis without any extra disks or carts?

Not required... If you have another way to start your program. Not sure, but I imagine you might get away with pulling the E/A cart out once running. Text to speech is a little trickier.:D

Share this post


Link to post
Share on other sites

A good book to get started is at https://www.ebay.com/itm/TI-99-4A-99-4-Book-INTRO-TO-ASSEMBLY-LANGUAGE-FOR-THE-TI-HOME-COMPUTER-New/372757407012?hash=item56ca12a524:g:1GwAAOxyV85RzfSG 

 

There should be scanned copied of the book somewhere, just not sure where the link is.  That is the best reference to get some basics down.

 

There is another book by Morley I use frequently when looking for details on some of the instruction codes.  I just don't have a link for it to point you towards it at the moment, perhaps someone else does.


That first link will definitely get you with some of the basics on setting some code up.  From there, I think you may be able to learn quite a bit from other people's source code, especially code that is commented well that explains why things are being done as they are.  There is plenty of source code up on ftp.whtech.com and people frequently borrow pieces of code for their own application, so no harm, no foul.

 

Beery

 

 

  • Like 2

Share this post


Link to post
Share on other sites
12 minutes ago, BeeryMiller said:

A good book to get started is at https://www.ebay.com/itm/TI-99-4A-99-4-Book-INTRO-TO-ASSEMBLY-LANGUAGE-FOR-THE-TI-HOME-COMPUTER-New/372757407012?hash=item56ca12a524:g:1GwAAOxyV85RzfSG 

 

There should be scanned copied of the book somewhere, just not sure where the link is.  That is the best reference to get some basics down.

 

There is another book by Morley I use frequently when looking for details on some of the instruction codes.  I just don't have a link for it to point you towards it at the moment, perhaps someone else does.


That first link will definitely get you with some of the basics on setting some code up.  From there, I think you may be able to learn quite a bit from other people's source code, especially code that is commented well that explains why things are being done as they are.  There is plenty of source code up on ftp.whtech.com and people frequently borrow pieces of code for their own application, so no harm, no foul.

 

Beery

 

 

Thanks, this is super duper helpful. I think the commented source code will be especially helpful for me!

Share this post


Link to post
Share on other sites
21 minutes ago, HOME AUTOMATION said:

Not required... If you have another way to start your program. Not sure, but I imagine you might get away with pulling the E/A cart out once running. Text to speech is a little trickier.:D

Good to know. I'll probably make a separate post when I actually get that far. I know Parsec has speech in it, so I assume it must be possible to do since that game just runs from a cart

Share this post


Link to post
Share on other sites

I know your main focus is going to be assembly, but if you have not already done so, be sure to check out RXB. This is pretty much Extended Basic on steroids.

Share this post


Link to post
Share on other sites

Getting started depends on where you are coming from.  If you need to also learn all the assembly prerequisites at the same time, i.e. binary, hex, understanding memory, I/O vs memory-map, addressing modes, etc. then the approach will certainly be different.  All CPUs and computers work pretty much the same way, so a lot of concepts will apply no matter where you learn them or what system you are working on.  After that, you have the specifics of the CPU and architecture of the computer you have chosen.

 

For the 99/4A, working in an emulator will make your experience much more pleasant, IMO.  Real hardware is good for testing and running your software, play games and *using* software, showing off to your friends and family, and for a trip down memory lane to experience editing and assembling like we used to do it (but only for 5 minutes ;-) ).  But of learning and development, emulation all the way.  An emulator also gives you the benefit of a level of debugging that you simply cannot get on real hardware.  My go-to development emulators are Classic99 and JS99er coupled with the XDT99 compiler tools (see the Development Resources thread in the forum).

 

It really helps to have a bunch of small programs you want to write, which will help guide your learning.  Keep in mind that you don't have to understand everything when you are starting off, and you probably won't.  Understanding comes over time, but it is very important to be able to write working code from day-1 to keep up your enthusiasm and motivation.  Simple programs are things like clearing the screen, some basic character animation like moving something across the screen, etc.  Leave things like speech synthesis until later, since in assembly it takes a lot of code and data to get this working, and it is easy to get very lost (IMO).  Even doing sound can be somewhat of a more complex topic when getting started because it relies on changing data at a "human" pace rather than as-fast-as the computer can execute instructions.  This means you need to have a concept of timing, which on the 99/4A there are multiple options, each with benefits and trade-offs (like most things).

 

The E/A Manual is a decent reference that coves a lot of material in a non-beginner kind of way, however to its credit is does clearly state:

 

"This manual assumes that you already know a programming language, preferably an assembly language.  If you do not, there are many fine books available which teach the basics of assembly language use.  After you know these basics, this manual gives the details of TMS9900 assembly language and its application to the TI Home Computer."

 

I agree with that statement 100%.  When I started learning assembly as a teen in '83, the E/A manual was all I had at first and there was much frustration, hair-pulling, and probably even some tears of anger.  It was not until I found the book "COMPUTE!'s beginner's guide to assembly language on the TI-99/4A" by Peter Lottrup that I was able to actually start writing my own programs and get an understanding of how the computer worked and what was going on.  However, even though Lottrup's book opened the door to assembly for me, it does stay at a higher level of assembly on the 99/4A (which can be great for getting started).

 

However, even more important than books, I would say this forum and code-reading are the best resources for learning and answers.  Having an understanding of what a compiler, assembler, and linker do will also help greatly.  Beyond that, get comfortable with hex and binary, and start writing "clear screen" followed by "move @". 🙂

 

Ask questions and put in the effort to try and find answers on your own.  Most importantly though, have fun, enjoy the journey, and allow yourself the time to learn; because it will take time.

  • Like 5
  • Thanks 1

Share this post


Link to post
Share on other sites
On 12/17/2019 at 10:34 PM, CamTheBridge said:

If you are programming in assembly, can you access the speech synthesis without any extra disks or carts?

Yes.

Share this post


Link to post
Share on other sites

I have a sample assembly program which is reproducing the speech from Gauntlet. I've tried digitizing my own voice a few times, but I wasn't happy with the results. (You need a good microphone, and probably a good voice too. I can't stand mine.)

Share this post


Link to post
Share on other sites

The value of my input here will really hinge on your current level of knowledge so take it under advisement for later if your are brand new to Assembly Language.

 

One of the cute tricks in the Forth systems around here is the Forth Assembler, which is designed for writing short routines. (versus entire programs)

The syntax is reversed from conventional but if you really wanted to test an idea quickly it's pretty cool.

The process is:

  1. Compile the Assembler into the Forth system using the system's command for that job.
  2. Write up your little routine in your favourite PC editor
  3. Paste the Forth assembler source code into Classic99
  4. Test your routine like it was a BASIC command; just type the name

Now... it might lock up the computer if you do something wrong, but that's why Assembly language programmers tend to be VERY brave people. :)

 

Welcome to the fraternity.

 

0xBF

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Forth...mmmmmmmmm

<Sniff> how sweet it is.. and we have some of the brightest forth folks around! God bless our forth people!!

I actually got some good experience in forth over a couple years, then I found a project that needed to access the supercart and I couldn't do that with the forth system I was using at the time, so I'm back in assembly again, but this time it looks like I'm learning quite a bit and I'm now thankful I switched back to assy BUT forth us my home away from home language. 

Edited by GDMike
  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, GDMike said:

Forth...mmmmmmmmm

<Sniff> how sweet it is.. and we have some of the brightest forth folks around! God bless our forth people!!

I actually got some good experience in forth over a couple years, then I found a project that needed to access the supercart and I couldn't do that with the forth system I was using at the time, so I'm back in assembly again, but this time it looks like I'm learning quite a bit and I'm now thankful I switched back to assy BUT forth us my home away from home language. 

Want a Forth kernel compiled at >6000 :)

Since you are using RAM CAMEL99 Forth fits in the space just fine.  Let me know if you want to try it.  I have been thinking about doing it for myself...

 

All I have to change is the origin line in the cross-compiled source code.  (I think)   :)

CROSS-ASSEMBLING
              START.                \ sets a timer
              NEW.                  \ init target memory segment to FFFF
              ABSOLUTE 6000 ORIGIN. \ we must set the origin before TI-99.EA5 directive

 

 

  • Like 2

Share this post


Link to post
Share on other sites
5 hours ago, Tursi said:

Huh, I didn't know Archive had that! I guess I can take down my copies then (nobody, including me, ever remembers it's there anyway ;) )

 

Your archive is better organized. I would keep it unless it's a bother or costs money... I do use it occasionally.

  • Like 1

Share this post


Link to post
Share on other sites
11 hours ago, HOME AUTOMATION said:

Tursi, has a book archive. Where?

I looked, didn't find. But now I know where to go, to find a lot of good info. about dolphins!:)

It's a mirror of Ernie Pegrem's TI Books page, taken when he decided to take it offline. 

http://harmlesslion.com/tibooks/

 

  • Like 2

Share this post


Link to post
Share on other sites

Please do keep the books up, Tursi. The archive from you and from HexBus are the only places a lot of these books are posted online--and I jump to both sources pretty regularly. . .and send people to them as well when they are looking, as they are the most comprehensive archives of TI-99 books in existence.

  • Like 3

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...