This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - J_Walker87
Pages: [1]
1
« on: July 02, 2021, 09:50:21 pm »
Okay, thanks for the routine.
Also, for anyone who cares, this is how the program to compile math expressions works: Example: Compile "2+3*4-X" to assembly (Note: X is a variable, and all math is 8 bit for simplicity. Also there's no order of operations or parentheses. I think this is fine though since I'm aiming for compiler simplicity.) The expression compiler would produce the following code, but in hex format:
ld a,2 add a,3 ld b,4 call MulAB ;MulAB is a multiply routine label ld hl,X ;X is a label for the variable X sub (hl) Let me know if I can improve this somehow.
2
« on: July 02, 2021, 09:17:40 pm »
If I understand what you are saying, you are trying to make a basic program that compiles another program to assembly. Are you using some kind of library/shell or how are you reading files in basic? Do you plan on having some small hex libraries? Also, I would imagine that the time needed to type in a whole compiler in by hand would be huge and the likelihood of the user making a mistake would be high. Debugging an assembly/compiled program can be tricky enough to a new user without having to worry if they had a small typo somewhere in the 10k+ bytes of the compiler program. While I won't dissuade you from the project, there seems to be some pretty huge difficulties involved. Additionally, you probably have a pretty small audience. How many people do you think would be interested enough in the language to spend hours copying it over by hand (assuming they don't have a cable)?
Yes, the idea is to have a BASIC program that compiles another program to assembly. The program to be compiled to a hex string, which the user can copy into a program using [2nd](Rcl). (I could change this to make it more convenient using a simple hex code, which I'll probably end up doing if the project works out). And yes, I do plan on using a couple small hex libraries. Also, I don't think it will be 10kB. Tiny BASIC is designed to fit into 2 or 3 kilobytes of memory. I'll have to modify the original language to allow the user to call assembly routines in a library style in order to give the language graphics capabilities among other things. Also, based on my experience in the Ti-BASIC Dev forms, people are often willing to type in a 2 or 3 kilobyte program by hand if they have the source. Multiple people have asked for the source code of several kilobyte games and then typed them in over on the form. Next, I have no idea who my audience would be. I know that if someone else did this and I didn't have a link cable I would be interested, but I don't know about everyone else. As for the optimized routine, what language do you want it in? Since you say strings I assume you mean basic.
If it's short, assembly would be fine. However, if there's a Ti-BASIC routine for it that isn't too long, that would be fine. I'm also working on making routines myself. I often find however that other people can usually come up with something more efficient. A: make a library with every single instruction the z80 chipset has to offer and add the equivalent HEX values and index them using form of string manipulation from another program. B: Make an entire system for checking any symtax errors. C: and now that I think about it you can't really parse the data in another BASIC program without having an ASM program to convert it all to string.
A: I don't think I'd have to do this if I used hex for everything. I do plan to make a system that handles labels and relative jumps, however. B: I thought about this and figured I may have to just use vague error handling. However, Tiny BASIC programs are usually pretty easy to find syntax errors in if you know the line number. C:Yeah, I get what you mean. Instead of storing the program in a program variable, I could use a string. Editing Tiny BASIC programs is very simple, and Ti-BASIC could easily handle that kind of string editing. To get a feel for Tiny BASIC, check out a different BASIC dialect, MS-BASIC, at https://www.masswerk.at/pet/. Also, I do realize this would be difficult. However, so far it's going really well. So far I've already made a subprogram in Ti-BASIC to compile math expressions into assembly. Finally, I need help with one more thing (currently, I mean. In the near future I'll probably have more questions). I am pretty new to assembly, so this may sound dumb, but what's the best way to load the value at a pointer into the 'b' register (like 'ld a, (**)', but instead with the 'b' register).
3
« on: July 02, 2021, 06:13:48 pm »
Hey, I just finished learning the basics of ASM programming using Mimas (thanks, by the way, for the recommendation to use Mimas if you're reading this post and replied to my post about on-calc ASM programming). I just got a link cable about a month before starting to learn ASM, and I remember it really sucked not being able to download and upload programs. However, I noticed that lots of people without link cables just type in programs from source listings. My idea is to make programming easier for people without link cables by designing a compiled language that is compiled by a BASIC program into an assembly program. Using Xeda's awesome programs, tools, and documentation for hex assembly I was able to start on writing a compiler in BASIC to compile a language similar to Tiny BASIC (see https://en.wikipedia.org/wiki/Tiny_BASIC). I have two questions: 1. Is there an existing optimized routine that will find all occurrences of a string in another string and replace that each occurrence of that string with another string? Example: Input: "hello", "l", "LL" Output: "heLLLLo" 2. Does anyone have suggestions for languages other than Tiny BASIC style languages that would be easy to learn and easy to compile. Edit: the idea is to have something like Axe except the compiler is in BASIC so you can type it in. It will also be less powerful most likely. I realized I was a little vague in my idea.
4
« on: April 15, 2021, 06:19:17 pm »
Hey, I'm wondering if there are any alternatives to Ti-BASIC (besides ASM). Preferably, I'd like something like C. I'd also like something on-calc, though it doesn't have to be. I'm also aiming to stray away from Grammar and Axe. Any suggestions?
5
« on: March 01, 2021, 06:36:45 pm »
Nice! I subscribed to your YouTube channel!
6
« on: March 01, 2021, 06:21:33 pm »
This is all very helpful to me, thanks. I'll try and follow these suggestions. Also, I'm new to this forum. I'm a TI-Basic programmer and recently created an account here because the TI-Basic Dev Wiki doesn't have many Asm programmers. Thanks for the responses you gave. Also, about Mimas, it's no down side to me that it only has one line copy-and-paste ability. I'm used to having no copy and paste ability on my ti 83+! Also, CalcNerd, a youtuber who posts tutorials about how to make ti basic games, recently posted one of my ti basic programs, Maze. If you're interested, check it out. It's in ti basic and is just a maze generator with a pixel you can move to the end, but it is about the shortest decent program I've ever made in ti basic, which I did on purpose so that people could type it in. And, in my opinion, the community of those who type in programs on their calculators is alive and well, just not as much for pure Asm.
7
« on: February 26, 2021, 11:05:34 pm »
Whenever I open an ASM tutorial in hopes of learning it, it always seems to require that you have access to a computer to program your calculator with. I want to learn ASM, but it is difficult for me to use a computer to program my calculator with, so please don't say I need to do that (I also don't want to use Axe or Grammer). I know that the TI-83+ of mine has ASM capabilities built in, but its all in HEX. I've typed in some routines in HEX written by others in the past, but never a program/routine of my own. My Question: Is there a tutorial on how to code in ASM on-calc for the TI-83+?
Pages: [1]
|