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 - Hot_Dog
Pages: 1 ... 109 110 [111] 112 113 ... 194
1651
« on: November 11, 2010, 05:34:20 pm »
By the way, how would you do it if you actually had to write such a routine Hot_Dog? If I were an absolute, absolute beginner, I would have 10 CPs, one for each key from 0-9. However, in this case, you can use GetKey, subtract 142 from register A (since the number keys are values from 142 to 151), and then put A into HL so that B_CALL _DispHL can be used.
1652
« on: November 11, 2010, 05:12:27 pm »
Start by displaying the text "Press a number", and using GetKey() to let the user press a key. Wouldn't you'd just get the keypress, then have the program run through a look up table and return the value from the table? That's too hard for beginners
1653
« on: November 11, 2010, 05:00:47 pm »
ive already got something in mind, but i dont know how to start it oncalc
It might help us if you told us what you had in mind
1654
« on: November 11, 2010, 04:43:26 pm »
Oh, that's great! Don't forget about real( conflicting with xLIB.
Actually, you won't be able to use both at the same time. It's the way the OS is built. But I'll use Label On and Label Off to allow a user to switch between xLIB and the font routines.
1655
« on: November 11, 2010, 04:35:22 pm »
Restoring hooks is easy when you know how they work. For each hook, there is a 3 byte area of ram and a flag. The ram is 2 bytes of the address followed by the page byte. And the flag is as simple as on/off. Here's the wikiti page on the parser hook. As you can see, its ram is at $9BAC and its flag is 1, (iy + $36).
As far as backing up goes, that's pretty easy. Save the three bytes as $9BAC and that flag. Then when you are done, just restore them.
But chaining is a little more difficult. First, you are going to have to get the information from those areas, but save them somewhere where you can find them later (this can be difficult sometimes.) Then install your hook. Now when your hook is called you do your thing, but when you are done, you need to put the calculator right back in the state you found it and jump to the address you just saved. If you have any differences in calculator state, the other hook won't know what to do and you'll run into problems. And of course, if you need to return a value to the OS, you won't be jumping to the other hook.
Thanks, thepenquin! I had no idea of the $9BAC area. So, does anyone know which areas of RAM the hook code for Xlib, Celtic III and Omnicalc are? I want to make sure I find a safe spot for my hook code
1656
« on: November 11, 2010, 02:04:07 pm »
I think what you are referring to chaining of hooks, like how Omnicalc and Axe can both have hooks running at the same time. Im not quite sure how to do it though
...On a separate note, what is the Omnimaga lib?
Actually, chaining would be nice. Quigibo, how do you do it?
1657
« on: November 11, 2010, 01:53:08 pm »
Suppose that someone has Celtic III, Omnimaga or Xlib installed. If another program uses the parser hook, is there anything that program can do to save and restore the installations of Celtic III and Xlib? For example, suppose a program uses the parser hook when Xlib was installed. When the program exits, is there any way to make sure Xlib is installed again?
1658
« on: November 11, 2010, 01:29:19 pm »
Those sound pretty reasonable. And as a request, could the new hook be enabled by a prgm header? Some of those might actually be useful in plain BASIC programs.
You use asm(pgrmTEXT) at the beginning of your BASIC program to turn the hook on, and you use asm(pgrmTEXT) at the end of your program to turn it off.
1659
« on: November 11, 2010, 12:15:08 pm »
Yay for C and ASM!
1660
« on: November 11, 2010, 11:44:08 am »
The verdict:
1. DispTable 2. Select( 3. ExprOn/Off 4. Real(
Thanks to everyone for their input!
1661
« on: November 11, 2010, 12:54:18 am »
In designing the Ti-Basic Text routines, I'm going to use hooks so that Ti-Basic programmers won't have too much to learn. I'm going to use Output() to display 6x8 characters (for compatability and familiarity) and Text() for custom size text, where the default is 3x5.
However, not having a huge knowledge of Ti-Basic, I need some suggestions as to what tokens to use for the following:
1. A command that will update the screen after all text has been drawn 2. A command to change the program that the font is located in 3. A command to allow people to switch back to the normal TI-OS routines, and also back to the custom font routines 4. A command that allows a user to specify the custom size of his font
Thanks for anything you can offer
1662
« on: November 10, 2010, 06:38:34 pm »
Now that I understand hooks, I'm going to use Output() to let people specify a font character size. Text() will display the text. I'm also going to have something that will update the screen when all text is drawn.
So, a person will run pgrmText to enable the special font routines. If there is a need in the Ti-Basic program to use the regular Ti-Basic font (with normal Output and Text functions), another hooked function is run to switch back and forth. At the end of the program, pgrmText is run again.
1663
« on: November 10, 2010, 06:04:06 pm »
So the hooks "point" to your custom routine to display text when the program is enabled as opposed to TI's?
Exactly. I just need to understand how to get it to work. No trouble yet
1664
« on: November 10, 2010, 05:53:44 pm »
So, it's like Omnicalc fonts, but with more versatility, and the user doesn't have to do anything?
Well, the user does have to run something to enable/disable hooks in his basic program, and create his own font of course. Other than that, it is more versatile, faster, and can be done with regular Output(), Text(), etc. commands.
1665
« on: November 10, 2010, 05:47:06 pm »
Hey, not to spam or anything, but I have made a program (SpriteLib) which lets you edit the font a little and use the display routines I even included an example (try example 2) to show what it can do. It is an ASM program and it sets the font hook to work during BASIC program execution and for the hex digits. Example 1 has more maps, but was created early on without the full use of all of the functions...
http://www.ticalc.org/pub/83plus/asm/graphics/spritelib.zip
Nah, it's not spamming. Quite a nifty program, if I say so myself! So don't take the next line as an insult, because it's quite impressive. However, just like your program can do things mine can't, I'm adding features that SpriteLib doesn't have.
Pages: 1 ... 109 110 [111] 112 113 ... 194
|