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 - TC01
Pages: 1 ... 18 19 [20] 21 22 ... 24
286
« on: July 25, 2010, 08:04:12 pm »
Unsigned char is a fine replacement for byte. Does it really make a difference if I use unsigned char or unsigned int? I mean, I know that unsigned char is the same size as a byte. It's just I already have the code written that treats the output as an array of integers.
287
« on: July 25, 2010, 03:26:34 pm »
DJ posted this on IRC on Friday, after he deleted his profile: [11:57:01] <@OmnomIRC> <DJ Omnimaga> as final message since i still have this open, Quigibo also got access to the entries.
288
« on: July 25, 2010, 03:24:12 pm »
"unsigned char" is 8 bits, "unsigned short" is 16 bits. "enum Bool", "BYTE" and "BOOL" are seldom used. Okay, so really there's no reason to use BYTE or BOOL, then? Or is there some specific case where BYTE and BOOL are better to use? The trouble is if the "next character" in the string is the same as one of the characters that's part of the token, it won't work. So if the line is: Disp "HELLO", then the program will hang when it's truncated "HELLO" down to LLO", because two Ls are next to each other, and so strpbrk("LLO"", "L") will return "LLO"". In many parsers, characters are divided into classes of lexical elements (string, comma, etc.), and a lexical analyzer is built to recognize them (e.g. a string starts with a '"' and it lasts until the next '"' or maybe end of line). On top of the lexical analyzer, there's a syntactical analyzer, which tries to parse a stream of lexical elements (get an element, then act upon its type - maybe there are other expected elements of various types after it). And on top of the syntactical analyzer, if the language is complicated enough, there's a semantics analyzer (e.g. {, number 234, comma, number 567, comma, number 8 is a list).
But maybe I'm replying out of scope because I'm dense ? 
Well, I understand what you're saying, but I'm not sure how it's relevant... Well, I know how it's relevant (since I'm writing a program to look through text files), but I'm not sure if any of the information is useful to my current problem.
289
« on: July 25, 2010, 03:01:42 pm »
Doesn't the Axe entry have to be a game?
Or was that changed so it can just be anything written in Axe?
A shell written in Axe sounds cool, though.
290
« on: July 25, 2010, 02:22:26 pm »
Well, GCC4TI seems to take issue with some of that- it didn't like me defining things as bytes or BOOLs (or with asterisks before the variable type). I changed it, though (to use integers instead of bytes and bools).
But shouldn't the tokenInfo object also contain the name of the string? Or is there a way to compare the name of a variable against a string?
And I did add it, would the size_t chars data even be necessary? Couldn't I just call strlen() on the string?
291
« on: July 25, 2010, 12:07:36 am »
I voted yes (but Netham45 is a lobster).
I would definitely mention Omnimaga in my programs' readmes, not only as where it was developed but as a place to contact me at.
292
« on: July 24, 2010, 04:49:10 pm »
That seems like it would work much better than what I was doing. Thanks!
Your assumptions are mostly correct- I hadn't been using a tokenInfo structure, but I eventually would have needed to create one. (I was using arrays for the handful of tokens I had defined, but that would have gotten unwieldy pretty quickly, especially with two-byte tokens).
Also, sort of unrelated: I'm wondering if it might be easier to define all the tokens (the strings and the hex) in a text file on the calculator, and read them in as tokenInfo structures (well, as a collection of tokenInfo structures defined in a tokens structure, or something like that). That way, I don't have to figure out how to handle all the weird characters, plus, the list of tokens could be modified without recompiling everything. The only downside is that the text file would be required on-calc.
To more experienced programmers- which seems like a better idea? Define them in the program or an external text file?
293
« on: July 24, 2010, 04:21:11 pm »
Since in Star Trek (Voyager being the worst offender, it seems...) the shields are always failing after about two hits, I like the second method better, since as Builderboy says it gives less power to the shields.
294
« on: July 24, 2010, 01:45:24 pm »
Unfortunately I'm having another issue- although not with the "read text files into lines" part, the "parse lines into 83+ tokens" part (see here for what my project is). The way I'm removing characters from a string is strpbrk(). So my function to parse lines works recursively and does the following: 1. Send the line to a function to check if it's a token. 2. If it is a valid token, adjust the array of hexadecimel tokens and return. 3. If it is not, truncate it by removing a character from the end each time using strncpy() until it finds a token. 4. When a token is found, adjust the array of hexadecimel tokens, use strpbrk() to remove the part of the string that's a token (by getting the first character in the string that's not part of the token), and call the entire function again, this time for the rest of the string. The trouble is if the "next character" in the string is the same as one of the characters that's part of the token, it won't work. So if the line is: Disp "HELLO", then the program will hang when it's truncated "HELLO" down to LLO", because two Ls are next to each other, and so strpbrk("LLO"", "L") will return "LLO"". Is there some other way to split strings that doesn't have this problem? Can I slice them like "string[2:5]" and get back the string containing characters 3, 4, and 5 (or something like that)? If I knew a bit more about C I'm sure I could figure this out... but I don't.
295
« on: July 23, 2010, 05:14:24 pm »
Sounds really neat What kind of programs are needed to convert it into a 8xp?
Something like Kerm's BinPac8x, probably. Depending on how BinPac8x works, I suppose it might be possible to use it rather than write something else. It takes binary files and outputs and 8xp file, which means it writes the hex data to an 8xp file, adding in all the formatting and everything. I have hex data, so... I'll have to test BinPac8x. I'm using Romain Lievin and Tim Singer's file format and link protocol guide as a reference for both parts of the project- it documents all the 83+ tokens. Sounds cool. I, for one, can put it to use, since I have both an 84+SE and an 89T.
Well, you can- I just don't know that you would have to. Maybe if you need the advanced mathematics functions of the 68k but want to work on some 83+ program? This project reminds me a bit of GTC, the on-calc C compiler. It's very cool, but the only possible use (in my mind) would be programming in 68k C when you don't have a computer handy. (I installed it anyway, though).
296
« on: July 23, 2010, 04:46:42 pm »
I've dropped my 83+ a few times before, but I don't think I damaged it.
Then again, my calc's link port did break, and I couldn't find a flaw in the soldering when I went and looked, so... maybe I did damage it.
297
« on: July 23, 2010, 02:07:01 pm »
Sounds cool. Although I'll never use it, it sounds like it could be useful to some. At first I thought you were writing a z80 BASIC interpreter, not just an editor. (I never thought you were writing emulator/debugger, though ) Good luck! 
Yeah, good point- I've edited it to add that it's not an interpreter either. It is nice to see some new stuff for 68k calculators even if with limited use. But hopefully, is really useful for you and maybe you can give us some z80 TI-BASIC in the future.
It is true that doing something oncalc is more familiar to some of us, so there is hope other people pick and use it. I liked to hear about the z80 emulator in 68k. Although I know there is Gameboy emulator...
Too bad about your calculator link port. I give you a hint if you want assembly programs on it: http://asmtools.omnimaga.org/asmunsquisher/ More useful to little programs. See by yourself but in the case of doubt of what it does, ask me.
Have fun doing your suite. 
Thanks! Yes, I noticed your assembly unsquisher on the Misc page, and it would be useful for running small programs, as you said.
298
« on: July 23, 2010, 01:02:55 pm »
UPDATE: Beta v0.2 has been released, and can be downloaded here (from the Cemetech Archives). So I thought I might as well announce my first serious calculator project, even though it's probably of little use to anyone other than myself or in my current situation, though. This project (which I have not yet named) is a suite of 68k programs and computer programs to allow someone to write a program in Z80 Basic (83+/84+) on a TI-89 (or other 68k calculator), using the text editor. The program is then tokenized on the calculator, and then can be sent to a computer to be converted to an 8xp file. This is not an interpreter for Z80 Basic for 68k calcs, nor is it an emulator or a debugger- you cannot actually run the programs on the 68k calculator. Why? Well, you might remember that my link port broke on my old TI-83 Plus, and I haven't yet gotten a new Z80 calculator. So for the time being, I'm limited to WabbitEmu or my Titanium, and while I can still write assembly programs and test them with WabbitEmu, I'd much rather write Basic programs (both Axe and regular Basic) on an actual calculator. And true, the 89's keyboard is just different enough from the 83+'s to make entering text annoying, but it's better than nothing. And while chronomex (Duncan Smith of ticalc.org) is working on a Z80 emulator at the moment, by the time it's finished I might actually have an 84+. And since I'm learning C and needed to work on something that actually did something, I decided to work on it. This will probably be obsolete when Duncan Smith's emulator comes out- indeed, as I said, it might be obsolete before then, as I don't know how many people would actually need something like this. So that's why. Now, as for the how: There will be three different programs involved (technically, four depending on how you count). One, a 68k Basic program (that I have named token8x), installs a custom toolbar with all the 83+ (and 84+, when I look them up) tokens. This can then be activated by pressing 2ND - HOME on a 89, and accessed from anywhere on the calc, including the Text Editor. This is mostly finished. Using this, you would write programs in the Text Editor, save them as a text file, and then use a 68k C program to tokenize the text file into an application variable with the tokens in hex format. This is mostly finished in that it works, but there is other stuff I'd like to add in the future. Then, the appvar can be sent to a computer, where you would use a suite of Python programs to extract the tokens and save them in 8xp format. This is probably complete (short of supporting other calculators) Here are some screenshots, of the dialog menu and of the custom toolbar. All screenshots are from TiEmu, nothing has actually been done on calc... and as you might be able to tell from the name of the program, all it does is "ClrHome".
299
« on: July 22, 2010, 09:57:39 pm »
Okay, thanks for that information- I knew about \n, of course... didn't realize there were other escape sequences (apart from \\).
It seems like the "split text file into lines" part of the program is working now, but if I have any other questions I'll post them.
300
« on: July 22, 2010, 06:04:06 pm »
Where would I find a copy of 1.15?
Google it (or use any other search engine), or use WebArchive. We can't give it to you (assuming anyone has it), just like no one can post any of the old Nspire or 84+ OSes.
Pages: 1 ... 18 19 [20] 21 22 ... 24
|