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 ... 104 105 [106] 107 108 ... 194
1576
« on: November 18, 2010, 11:13:20 pm »
I have it! This is a hook I just made (with one random function, one cool function, and one really cool function). The trick though is that if you do ln(3), it will return the actual answer. However, ln(0,0) will execute the first function, not ln(
-The functions are 2 key related functions and an advanced function that lets the user edit a program or variable at the byte level. -This is built off from one of my actual programs that use the int( token, but I changed it to ln( for this purpose
Not only do I like the idea, I'm incorporating it! By the way, in your experience, do you find that Ti-Basic programs run slightly slower with the parser hook on, or is the difference unnoticable?
1577
« on: November 18, 2010, 08:52:24 pm »
Oooh ooh oooooh me me me me! Seriously though displaying and storing text on the same line is pretty awesome in my opinion ^^
Actually, I can do displaying and storing text at the same time. HOWEVER, I'm afraid I won't be able to have text displayed on both screens at the same time, such as ln(0,0,e^(1,1, "THE GAME")), not when using custom fonts. Sorry
1578
« on: November 18, 2010, 07:21:20 pm »
Or maybe you could do some hyper optimizations and have it return the String that it displays. Like Ln(0,0,"HI")->Str1 would display the string and then store it into Str1. You could display a string at two different locations Ln(0,0,e^(0,0,"GAME"))
I'd use it if it was a feature.
There's one. Anyone else?
1579
« on: November 18, 2010, 07:18:18 pm »
Or maybe you could do some hyper optimizations and have it return the String that it displays. Like Ln(0,0,"HI")->Str1 would display the string and then store it into Str1. You could display a string at two different locations Ln(0,0,e^(0,0,"GAME"))
Not a bad idea, but (sarcastic) how often does that get used I would do it if people wanted to use it often enough
1580
« on: November 18, 2010, 07:12:20 pm »
Hooray! And out of curiosity, what would happen if we tried Ln(e^(0,0,"HI"))
Good thinking. An ERR:INTERFERENCE will occur. Same with e^(LN(0,0,"HI"))
1581
« on: November 18, 2010, 07:06:04 pm »
Wait, you mean you aren't using a font hook?
Like Builderboy said: It's for speed and any-size characters. In addition, it allows for multiple fonts in one program. Ln() it is then. For those who really want to use Ln() afterwards, they can turn off the parser hook inside of their Ti-Basic program. I thought about people who want to use Output() as well as Ln(). For people who want to use the regular small font as well as a customized small font, I'm thinking that e^( will be the token for customized Text(, so that Text( can still be used.
1582
« on: November 18, 2010, 03:24:37 pm »
I'm having issues with using Output( in Correlation. This is because the TI-OS is stupid and doesn't translate Output() the same way it translates other Ti-Basic functions. To get Output( to work with Correlation, a person would only be able to use variables, numbers and strings for the arguments, with ABSOLUTELY NO MATH being done. For example, this would be acceptable:
Output(1, A, Str1)
This would not be:
Output(A + 5, B-6, sub(Str1, 3, 4)
However, if I use ln( instead of Output, a Ti-Basic programmer would be able to input math normally. In addition, for converting Ti-Basic programs to use Correlation, all one would need to do is replace Output( statements with ln( statements.
Why ln( ? To save space, because it takes only one byte. Real( takes 2 bytes.
Please vote, and comment as well!
1584
« on: November 18, 2010, 01:23:38 pm »
Welcome! Russians are awesome!
1585
« on: November 18, 2010, 01:00:26 pm »
Okay, from there you will want to check the floating point stack, but I am not sure exactly where that is (there are a few bytes in RAM that point to various points). If you used Output(Y,X,<<String>> it will put a pointer to the temporary string in OP1, X at the top of the FPS, and then Y. I am not sure if PopReal or PopRealO1 might be useful B_Calls for you??? I am not sure if they work in hooks, though.
I tried all this, to no avail. I think it's because Output() is a class 2 function. For example, I did Output(1,1, "AAAAAAAA"), and I could not find "AAAAAAAA" in OP1.
1586
« on: November 18, 2010, 01:10:02 am »
Sorry, it might take a while for me to get alll the info. I had a folder named Parser Notes, but it didn't have my actual notes in it. Right now I am figuring everything out all over again... And I have to convert all the hex *groan* Here is the start of the hook I have. All it does is change int( into a getKey-ish thing:
;this first section is only if you are going to run it as a program. It stores the hook in ;AppBackUpScreen and sets it up as well. ld de,9972h ;117299 this is a appbackupscreen+256 ld a,(de) ;1A This will store the byte into a cp 83h ;FE83 if a=83h, the hook might be active, so disable it... jr nz,3 ;2003 ...and quit xor a ;AF this sets a to 0 ld (de),a ;12 this disables the hook by overwriting the 83 ret ;C9 ld hl,9DB0h ;21B09D This is the location of the hook data ld bc,512 ;010002 number of bytes left in appbackupscreen push DE ;D5 ldir ;EDB0 this copies the hook data to 9972 pop HL ;E1 this points to the start of the hook in appbackupscreen in a,(6) ;DB06 this checks the current page.. B_Call(5026h) ;EF2650 sets up the hook using HL=pointer to hook and a=page in memory ret ;C9
HOOK: add a,e ;83 necessary to start a hook or a ;B7 like cp 0. if A=0, z flag is set ret z ;C8 push hl ;E5 will need this later, but also need hl ld hl,B1B1h ;21B1B1 B1 is the int( token sbc hl,bc ;ED42 BC= the token, so if it is int(, HL-BC=0 and sets the Z flag pop hl ;E1 jr z,2 ;2802 so if it is the right token, skip 2 bytes xor a ;AF this is to set the z flag I think ret ; C9 ;And this is where the code gets creative. HL is the number of arguments passed and OP1 has the last argument. the arguments are stored reverse in the FPS, so it can be confusing. To pass a value, just store it to OP1 and do FE01C9... So here goes... ld a,(843Fh) ;3A3F84 this is the key press... it is used in my quickkeys program B_Call(478Ch) ;EF8C47 this is SetXXOP1 cp 1 ;FE01 does something flag-wise to let it exit the hook with modified Ans ret ;C9
Awesome, although I managed to do just that successfully. What I'm trying to do is take care of arguments. Here's my code, as well as where I'm stuck: ParserHook:
relocate(appbackupscreen)
.db 83h ; Required for all hooks
;Check to see if the command is one of the following:
;Output to display the normal 6x8 routine. This is ;for compatability in case a user wants to update ;his program to do a different font
;
or a ;Which condition? ;If an instruction is being ;read, we don't ;waste time seeing what ;instruction it is ret z
;For Text(), Output(), the value of register A will ;be equal to 2. We can then check the value of the ;token being used.
cp 1 jr z, _ cp 2 jr nz, Not_2
_
ld hl, ($965D) ;HL now points ;to the instruction ;being read.
;Decrease hl to check for two byte token. HL ;usually points to the second byte of a two byte token, ;if it is a two byte one
dec hl
ld a, (hl) inc hl
cp $BB jr z, Check_Instruction_Two_Byte_Token
;Is this the Output() statement?
cp $E0 jr z, CorrelationOutput
So, CorrelationOutput is run. How do I solve something like A + 1 in Output(A+1, 2, "A")?
1587
« on: November 17, 2010, 09:04:35 pm »
Will we be able to edit the buffer pixels in the normal font?
I'm afraid I don't know what you mean, but I'd have to say "No" anyways
1588
« on: November 17, 2010, 07:21:03 pm »
I don't know why, but when you said "any text" (since you don't have a name for the program), the word "TERMINATOR" came to mind
1589
« on: November 17, 2010, 02:05:16 am »
Does HL point to the numerical data itself or the token data?
It could be anything. HL points to the beginning of the expression for the Row of where to place the text. The expression could be 3 + 6, it could be A, it could be sin(60), or it could be 5. For example: Output(A + 5, 3, "TEXT")
1590
« on: November 17, 2010, 01:59:27 am »
Are you using the parser hook? (I forget)
Yes, I'm using the parser hook
Pages: 1 ... 104 105 [106] 107 108 ... 194
|