retrodroid Posted December 29, 2023 Share Posted December 29, 2023 (edited) I also started to learn TMS9900 assembly language a little over a year ago. The references posted above are excellent, I mostly used the Compute book as a simple intro, then the game tutorials in the first section of the Assembly Programming thread linked above. The content on this website is excellent: https://www.unige.ch/medecine/nouspikel/ti99/architec.htm https://www.unige.ch/medecine/nouspikel/ti99/assembly.htm I started out using the Editor/Assembler cartridge (via classic99 emulator on my Mac) - that was painful. Then I used Winasm99 briefly but quickly installed xdt99 - it is a productivity game-changer! I would highly recommend investing the time to get up and running on xdt99. I also find the IntelliJ plugin useful. Of course, no harm at all in starting out with Winasm99 to get up and running until you're ready for a larger project setup. My edit/build/deploy/test cycle (using xdt99 with classic99 or https://js99er.net/) is literally 3 seconds, which really helps. Frequent testing of small changes is helpful in assembly because one small mistake can really mess up your program. I have to say that I friggin' love coding in assembly. It's the most rewarding coding project I've done in many years. No oceans of libraries stacked upon frameworks to configure and learn, just you and the machine and few basic opcodes to get the job the done. I also find that the once things are setup and running it's amazingly simple to make changes with just a few lines of code inserted into the right location. You'd think assembly would be cumbersome to revise but I find just the opposite. Part of that is due to the amazing flexibility and power that comes with "racing the beam" in terms of the context of your code being executing every frame (60fps). Writing routines to do more sophisticated data structure handling can be painful, esp. when you start to run low on available registers, but again, once your code is working it's a very gratifying experience. Edited December 29, 2023 by retrodroid 5 2 Quote Link to comment Share on other sites More sharing options...
GDMike Posted December 29, 2023 Share Posted December 29, 2023 (edited) 46 minutes ago, retrodroid said: I also started to learn TMS9900 assembly language a little over a year ago. The references posted above are excellent, I mostly used the Compute book as a simple intro, then the game tutorials in the first section of the Assembly Programming thread linked above. The content on this website is excellent: https://www.unige.ch/medecine/nouspikel/ti99/architec.htm https://www.unige.ch/medecine/nouspikel/ti99/assembly.htm I started out using the Editor/Assembler cartridge (via classic99 emulator on my Mac) - that was painful. Then I used Winasm99 briefly but quickly installed xdt99 - it is a productivity game-changer! I would highly recommend investing the time to get up and running on xdt99. I also find the IntelliJ plugin useful. Of course, no harm at all in starting out with Winasm99 to get up and running until you're ready for a larger project setup. My edit/build/deploy/test cycle (using xdt99 with classic99 or https://js99er.net/) is literally 3 seconds, which really helps. Frequent testing of small changes is helpful in assembly because one small mistake can really mess up your program. I have to say that I friggin' love coding in assembly. It's the most rewarding coding project I've done in many years. No oceans of libraries stacked upon frameworks to configure and learn, just you and the machine and few basic opcodes to get the job the done. I also find that the once things are setup and running it's amazingly simple to make changes with just a few lines of code inserted into the right location. You'd think assembly would be cumbersome to revise but I find just the opposite. Part of that is due to the amazing flexibility and power that comes with "racing the beam" in terms of the context of your code being executing every frame (60fps). Writing routines to do more sophisticated data structure handling can be painful, esp. when you start to run low on available registers, but again, once your code is working it's a very gratifying experience. I started out with dabbling in forth, then learned quickly that I need to know the machine, the location of addresses of importance needed to do anything, really.. unlike basic where all you needed was The command. Forth will also do things as long as the word is built prior, again, knowing where to find addresses to build a word was hard. So I thought, well I don't know how to find those addresses, so I switched over to assembly and that really puts you in the assembly language manual and that's how I started learning where everything was that I needed to reach. Then I was able to take what I learned in assembly and move over to forth again and do things that worked. Edited December 29, 2023 by GDMike 4 Quote Link to comment Share on other sites More sharing options...
Appeelicious Posted December 30, 2023 Author Share Posted December 30, 2023 That’s part of why I want to learn assembly. I feel like it’ll give me a way better understanding of the TI-99/4a. I’ve started reading the Compute’s beginners guide and I hope the formatting and syntax isn’t too different. I’m not sure how much I want to learn with the mini memory although I do have an untested cartridge that probably needs a new battery by now. Maybe I can go through the book and examples using the mini memory and then going forward with some of the online material using something more robust. 3 Quote Link to comment Share on other sites More sharing options...
retrodroid Posted December 30, 2023 Share Posted December 30, 2023 (edited) 10 hours ago, Appeelicious said: That’s part of why I want to learn assembly. I feel like it’ll give me a way better understanding of the TI-99/4a. I’ve started reading the Compute’s beginners guide and I hope the formatting and syntax isn’t too different. I’m not sure how much I want to learn with the mini memory although I do have an untested cartridge that probably needs a new battery by now. Maybe I can go through the book and examples using the mini memory and then going forward with some of the online material using something more robust. That's exactly how I tried to learn assembly back in the 80's. I could never afford all the expansion box stuff to code using Editor Assembler, so my folks got me the Mini Memory cartridge. I was able to learn enough to produce some cool looking sprite demos, but man, it is extremely painful to code using the line-by-line assembler. You are forced to plan out every line in advance, one typo or other mistake and you end up wiping out some crucial part of your program and have start over. Frankly, I would avoid this approach unless your goal is to experience the frustration of coding on the device like back in the day. I highly recommend you code on your modern computer and run/test in emulation if you actually hope to learn assembly language. It's just sooo much less friction. You can always deploy your application onto real hardware when you're ready. Edited December 30, 2023 by retrodroid 2 Quote Link to comment Share on other sites More sharing options...
Appeelicious Posted December 30, 2023 Author Share Posted December 30, 2023 Got it. Must resist doing things the harder way so I don't get too frustrated. Maybe I'll just read the book completely and take some notes then do online material coding with a modern solution. 1 Quote Link to comment Share on other sites More sharing options...
matthew180 Posted January 2 Share Posted January 2 One book is not going to do it, it will require a combination of many sources, asking questions, etc.. The minimemory does things they way it does because it does not have a full assembler available, so all the references are going to be raw memory locations and such. An assembler gives you a lot of help in that regard, i.e. being able to put human labels to memory addresses, auto-calculating memory addresses, etc.. You can take any minimemory example and convert it to a program you run through and assembler, it is not a lot of changes. You can then replace memory addresses with equates and such. Don't get stuck on syntax, it is all the same assembly in the end. Also, as mentioned, unless you are trying to get the "authentic experience", don't use real iron when learning. We only did that BITD because that's all we had. Take advantage of the nice editors we have now, emulators, tools that run on your PC native, etc.. Learn, write, test, debug on emulation, run and enjoy on real iron. Have a goal. I suggest programs to clear the screen and move the "@" character around. Write that a few times, try other simple programs for putting characters on the screen, define your own character pattern, etc.. Good fun, lots of learning. 3 1 Quote Link to comment Share on other sites More sharing options...
Appeelicious Posted January 2 Author Share Posted January 2 31 minutes ago, matthew180 said: One book is not going to do it, it will require a combination of many sources, asking questions, etc.. The minimemory does things they way it does because it does not have a full assembler available, so all the references are going to be raw memory locations and such. An assembler gives you a lot of help in that regard, i.e. being able to put human labels to memory addresses, auto-calculating memory addresses, etc.. You can take any minimemory example and convert it to a program you run through and assembler, it is not a lot of changes. You can then replace memory addresses with equates and such. Don't get stuck on syntax, it is all the same assembly in the end. Also, as mentioned, unless you are trying to get the "authentic experience", don't use real iron when learning. We only did that BITD because that's all we had. Take advantage of the nice editors we have now, emulators, tools that run on your PC native, etc.. Learn, write, test, debug on emulation, run and enjoy on real iron. Have a goal. I suggest programs to clear the screen and move the "@" character around. Write that a few times, try other simple programs for putting characters on the screen, define your own character pattern, etc.. Good fun, lots of learning. My initial goals are so much more humble, but a goal to set afterwards is maybe playing with joystick. I think I'm shooting for displaying images after a pretty hello world. 1 Quote Link to comment Share on other sites More sharing options...
matthew180 Posted January 2 Share Posted January 2 Not sure you can get much more humble than displaying a character on the screen. On the 99/4A, displaying "hello world" is the same as displaying an "image". The 99/4A only has 8x8 pixel tiles and sprites (which can also be 16x16). Displaying tiles (characters) on the screen is the same, it does not matter if the patterns for those tiles are alphabetic characters or patterns that are used to make up a larger "images". The 9918A VDP does not have a true 1:1 pixel-addressable mode, so even "bitmap" graphics are done with tiles and pattern data. Mess around with the Magellan tool if you want to get a feel for 9918A graphics. But getting characters on the screen is pretty easy and straight forward, and not something you should think of as advanced. The first post of the Assembly thread lays out the basic skeleton of an assembly program for use with an assembler for experimenting. The best learning is by just doing, making mistakes, figuring out the problem (this is the learning part), and getting it working (the reward). 4 Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 3 Share Posted January 3 My first "ah ha" in assy was making a flashing cursor with keyboard access and perfect timing as not to stream chars unless a key was held and again paying attention to timing. Success is always the dream. 2 Quote Link to comment Share on other sites More sharing options...
retrodroid Posted January 3 Share Posted January 3 I just went back and reviewed the first 5 or 6 pages of the thread. You really can't go wrong just starting there and following along. Don't worry if you don't understand everything immediately, like learning anything new you'll come to understand more as time goes on. For an initial goal, once you get the first example game loop running where it plots chars at random locations, you could try changing the delay timing on the loop, or make the plotting less random or some other minor change. This is an easy way to start to learn with a working program, which is much easier than starting from zero. 3 1 Quote Link to comment Share on other sites More sharing options...
apersson850 Posted January 3 Share Posted January 3 (edited) When I learned assembly programming of the TMS 9900 I already knew what assembly language is all about. I had been programming stuff from the AMD bit-slice units over the Intel 8080 to the Sperry Univac 1100/08 and Digital's VAX 11/780. So I was very familiar with the concept. The TMS 9900 then is pretty odd for a small micoprocessor, so didn't compare too well with the 8080. It has more similarities with the bigger machines I had tried. Then comes the complex (to say the least) architecture of the TI 99/4A. As stated above, it's impossible to do anything without knowing where to do it, and how it has to be done. The Editor/Assembler manual presents a lot of references, but not much about why they are useful. I quickly found that doing everything in assembly wasn't too meaningful. Data entry and such stuff is just very cumbersome, compared to doing it in BASIC or Pascal. So I almost always wrote programs that augmented Extended BASIC or Pascal programs. So what was most beneficiary for me was to learn how to pass parameters between BASIC or Pascal and the assembly level. It's easier in Pascal, but then the Pascal Assembler manual is even less informative about how the system works than the Editor/Assembler manual is... Mixing Forth and assembly is easy, but then you have to hang by your feet from the ceiling to read the programs right. Edited January 3 by apersson850 2 2 1 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted January 4 Share Posted January 4 7 hours ago, apersson850 said: Mixing Forth and assembly is easy, but then you have to hang by your feet from the ceiling to read the programs right. That's why they call me Batman. 🤣 4 Quote Link to comment Share on other sites More sharing options...
+Torrax Posted January 4 Share Posted January 4 Here are the books that I used through the years for learning assembly. Editor/Assembler Manual (TI) - got this first and knew I need more help! Compute!'s Beginners Guide to Assembly Language on the TI-994A (Peter M.L. Lottrup) Introduction to Assembly Language for the TI Home Computer (Ralph Molesworth) Fundamentals of TI-994A Assembly Language (M.S. Morely) Learning TI-994A Home Computer Assembly Language Programming (Ira McComic) Also reading through various articles in Micropendium helped alot. Along with the UG newsletters (archived on WHTECH FTP site). Remember it takes time and some effort. You will make mistakes and have spectacular crashes (weird graphics, text, and sounds). Take a breather and recheck your source code. And have a moment of going "DUH! Why did I do that?". Just have fun learning it. 3 1 Quote Link to comment Share on other sites More sharing options...
SteveB Posted January 4 Share Posted January 4 On 1/2/2024 at 6:40 PM, matthew180 said: Have a goal. Perhaps I did something wrong ... I didn't read a single book. I read the first 10 pages of your thread and started coding, after I had the first rough idea of how the 9900 works, having coded a little 6502 some thirty-five years ago. An XB Multicolor-Library is not exactly a "Hello World" example, but this was a challange I couldn't resist and I had very friendly, patient and helpful teachers here, I just asked when I didn't find (or understood) something the E/A manual. I couldn't agree more .. have a goal, the rest will follow. Learning for the learnings sake will bore you to death ... Just my 0.02 €. 5 1 Quote Link to comment Share on other sites More sharing options...
Kchula-Rrit Posted January 5 Share Posted January 5 All this talk of assembly language, I found this in the "off-topic" conversation. I've been there, 8-) even have that book. K-R. 1 Quote Link to comment Share on other sites More sharing options...
Appeelicious Posted January 5 Author Share Posted January 5 49 minutes ago, Kchula-Rrit said: All this talk of assembly language, I found this in the "off-topic" conversation. I've been there, 8-) even have that book. K-R. Yeah, I'm still in the read and reread phase. I don't have a strong background and so between that and a 4 year old daughter my acting as a distraction, it's taking effort to consume the knowledge. 3 Quote Link to comment Share on other sites More sharing options...
Kchula-Rrit Posted January 5 Share Posted January 5 (edited) 17 hours ago, Appeelicious said: Yeah, I'm still in the read and reread phase. I don't have a strong background and so between that and a 4 year old daughter my acting as a distraction, it's taking effort to consume the knowledge. Two cats and an 18-month-old Labrador are my "distractions." I'm also working on a power supply for my system, so not as much programming as I would like at the moment. In the meantime I've started reading the Assembly on the 99/4A conversation, so I can try making programs that (hopefully) don't depend on the Editor/Assembler cartridge. K-R. Edited January 5 by Kchula-Rrit 2 Quote Link to comment Share on other sites More sharing options...
Jeff White Posted January 6 Share Posted January 6 I recommend: The 99000 Microprocessor: Architecture, Software, and Interface Techniques by Avtar Singh and Walter A. Triebel Simplified TI-99/4A Assembly Language by Ken Culp 3 1 Quote Link to comment Share on other sites More sharing options...
Appeelicious Posted January 9 Author Share Posted January 9 I've made it through the first 50 pages with Compute!'s beginner's guide to assembly language on the TI-99/4A. by: Lottrup, Peter M.. I've done hello world and moved the @ around. Indirect addressing is my current hurdle. I haven't quite wrapped my brain around the language used to describe what it is. I figured it would be good to take a day off and come back to it, but I just wanted to share my progress. 4 Quote Link to comment Share on other sites More sharing options...
apersson850 Posted January 10 Share Posted January 10 Direct addressing: Address Bill directly. Indirect addressing: Address Bill by asking Joe to do it, because Joe knows where Bill is. In TMS 9900 language CLR @BILL ; Will clear word at address BILL in memory LI JOE,BILL ; Make JOE aware of where BILL is CLR *JOE ; Will clear word at address BILL in memory This code actually works if BILL and JOE are given proper values with EQU directives prior to executing the instructions. JOE must be in the range 0..15, since it's a workspace register. BILL should be a value where there is RAM memory. Note the significant difference from this (direct addressing) CLR JOE ; Will clear JOE (which in this case is a workspace register) This is different again (indexed addressing) LI JOE,OFFSET ; Make JOE aware of how far from BILL we want to clear (OFFSET should be EQU to the number of bytes) CLR @BILL(JOE) ; Clear word at an address that is OFFSET bytes higher up than BILL. JOE knows about the desired OFFSET Here is a different way to address the same place LI JOE,BILL ; Tell JOE where BILL is CLR @OFFSET(JOE) ; Clear word at an address that is OFFSET bytes higher up than BILL's position, which JOE knows about For completeness LI JOE,BILL ; Make JOE aware of where BILL is CLR *JOE+ ; Will clear word at address BILL in memory (JOE knows where BILL is), then advance JOE's value to the next word higher up. CLR *JOE+ ; Will clear word at address BILL+2 (next word after BILL), since JOE's value was incremented by 2 in the previous instruction. 4 Quote Link to comment Share on other sites More sharing options...
+FarmerPotato Posted September 23 Share Posted September 23 (cross posting from eBay thread) A book I had not heard of before: Data and File Management for the TI-99/4A, 1984. John P. Grillo, J.D. Robinson, Henry M. Zbyszynski. https://www.ebay.com/itm/226363601966 This appears to be a bona fide textbook for a course in Data Structures. (More emphasis on programming, less on analysis of algorithms.) For Bentley College (dunno.) It builds from stacks, queues, in TI Extended BASIC, up to a B-Tree indexed database. As such, I find it unusual. Even unique! Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted September 23 Share Posted September 23 50 minutes ago, FarmerPotato said: (cross posting from eBay thread) A book I had not heard of before: Data and File Management for the TI-99/4A, 1984. John P. Grillo, J.D. Robinson, Henry M. Zbyszynski. https://www.ebay.com/itm/226363601966 This appears to be a bona fide textbook for a course in Data Structures. (More emphasis on programming, less on analysis of algorithms.) For Bentley College (dunno.) It builds from stacks, queues, in TI Extended BASIC, up to a B-Tree indexed database. As such, I find it unusual. Even unique! Bought it! Looks super interesting. Thanks for the pointer. 3 Quote Link to comment Share on other sites More sharing options...
Gary from OPA Posted September 23 Share Posted September 23 27 minutes ago, Vorticon said: Bought it! Looks super interesting. Thanks for the pointer. Glad it went to a good home. It will be loved now. 2 Quote Link to comment Share on other sites More sharing options...
Gary from OPA Posted September 23 Share Posted September 23 (edited) On 1/5/2024 at 8:54 PM, Jeff White said: I recommend: The 99000 Microprocessor: Architecture, Software, and Interface Techniques by Avtar Singh and Walter A. Triebel Simplified TI-99/4A Assembly Language by Ken Culp The hardcover copy of the 99000 book I won a while ago on eBay will finally be arriving tomorrow, it will come in handy as I refresh my human sponge on the 99105 for upcoming projects in the works. I have found having a book in your hand reading it still allows your brain to retain the information better than reading PDF pages on a monitor or even flipping thru a printed scanned in version. Edited September 23 by Gary from OPA 3 Quote Link to comment Share on other sites More sharing options...
+FarmerPotato Posted September 23 Share Posted September 23 2 hours ago, Vorticon said: Bought it! Looks super interesting. Thanks for the pointer. Please let us know your thoughts about it. Is it possible this book has never been noticed? (Or scanned.) There are quite a few titles for John Grillo in the 1980s, none being offered currently. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.