This is mostly a rant about my failures with assembly programming. I'd welcome any advice, but I wouldn't want to just post my code and say, "What's wrong with this 3kb program I made as my very first foray into Assembler?"
So, I've got a TI-86, and being thatKindOfGuy, I decided to find an RPN (Reverse Polish Notation) program for it, so I could use that instead of fiddling with ANS and the Entry key. And there was one on TI-Calc! So I installed that, and while it had some great features, it has some severe limitations I wanted to remedy:
1. Having used RPN on other calculators, I knew I needed at least a 5-level stack.
2. The Enter key for some reason pushed the Entry number to the stack twice (to X and Y), which is unacceptable
3. The temporary algebraic mode (where the calculator would return to EOS and operate EOS as normal) is exited with CLEAR, when 2nd[Quit] would be more reasonable.
So, rather than dealing with those, I took a look at the source code included in the project. However, after spending some time with it, and trying numerous times to assemble it to a .86p program, I came to the conclusion that there seemed to be something wrong with the source code provided. So in the end, using the original code as a base, I decided to try and re-write the whole thing to have the features I sought.
Well, I first had to start by learning assembly. Which was probably not the best place to start from, but I read up, and I seem to have gotten the basics (being aware of what it was, and having experience in other programming languages helped), then set to work on my task.
Ultimately, it took about a day, all of Sunday, to be precise, and ultimately I came out with a 3kb-ish program with a few include files and a whole lot of "Hmmm, I don't know what this seemingly very important Call does, do I'll include it and put a few ??? in a comment." In the end, I'd say I grasp about 95% of the program, but not all of it.
Then came the part I dreaded, which despite being so easy still felt monumental. I assembled it and sent it to WabbitEMU, and... to absolutely nobody's surprise, I messed something up, and it didn't even make it to the _puts calls. After a bit of fenangling, I at least made it through the installer (the program starts by running a little hook to copy the main program code to the HOME SQRTProgram), but now I'm stuck trying to figure it out from there, as it seems to, for some reason, end up in an infinite loop of ROM calls. It's late, and I have another busy day tomorrow, but I'm feeling all stuck. Fun!
So, I've got a TI-86, and being thatKindOfGuy, I decided to find an RPN (Reverse Polish Notation) program for it, so I could use that instead of fiddling with ANS and the Entry key. And there was one on TI-Calc! So I installed that, and while it had some great features, it has some severe limitations I wanted to remedy:
1. Having used RPN on other calculators, I knew I needed at least a 5-level stack.
2. The Enter key for some reason pushed the Entry number to the stack twice (to X and Y), which is unacceptable
3. The temporary algebraic mode (where the calculator would return to EOS and operate EOS as normal) is exited with CLEAR, when 2nd[Quit] would be more reasonable.
So, rather than dealing with those, I took a look at the source code included in the project. However, after spending some time with it, and trying numerous times to assemble it to a .86p program, I came to the conclusion that there seemed to be something wrong with the source code provided. So in the end, using the original code as a base, I decided to try and re-write the whole thing to have the features I sought.
Well, I first had to start by learning assembly. Which was probably not the best place to start from, but I read up, and I seem to have gotten the basics (being aware of what it was, and having experience in other programming languages helped), then set to work on my task.
Ultimately, it took about a day, all of Sunday, to be precise, and ultimately I came out with a 3kb-ish program with a few include files and a whole lot of "Hmmm, I don't know what this seemingly very important Call does, do I'll include it and put a few ??? in a comment." In the end, I'd say I grasp about 95% of the program, but not all of it.
Then came the part I dreaded, which despite being so easy still felt monumental. I assembled it and sent it to WabbitEMU, and... to absolutely nobody's surprise, I messed something up, and it didn't even make it to the _puts calls. After a bit of fenangling, I at least made it through the installer (the program starts by running a little hook to copy the main program code to the HOME SQRTProgram), but now I'm stuck trying to figure it out from there, as it seems to, for some reason, end up in an infinite loop of ROM calls. It's late, and I have another busy day tomorrow, but I'm feeling all stuck. Fun!