Show Posts

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 - Xeda112358

Pages: 1 ... 205 206 [207] 208 209 ... 317
3091
Grammer / Re: Grammer
« on: October 12, 2011, 07:16:02 am »
So as kind of a side update, I am working on writing/completing an actual tutorial for Grammer. I am also trying to add in a way to execute code as an interrupt (because this will allow for things like grayscale). So pretty much, I need to find a new token for this. I use Goto to jump to a section of code and prgm to execute code as a subroutine, so what do I use to execute the code as an interrupt?

For BASIC programmers, an interrupt in Grammer will mean that a section of code will get executed over 100 times per second along with the normal code flow.

3092
ASM / Re: Streamlined Asm routines
« on: October 11, 2011, 08:24:12 pm »
So if you want to delay for approximately 'a' seconds you can try this:
Code: [Select]
     ld b,107
     halt
     djnz $-1
     dec a
     jr nz,$-6
     ret
Does this help?

3093
Grammer / Re: Grammer
« on: October 11, 2011, 08:16:03 pm »
Maybe, but I don't see why. I just tried running a Grammer program from DCS7 and it worked and then I tried running a program with DCS7 active, but from the homescreen and it worked. I don't know what is causing the problem :/

3094
Grammer / Re: Grammer
« on: October 11, 2011, 08:10:39 pm »
Hmm, well that is odd. I checked the most recent download here and it works for me. I am not sure what went wrong, then :/

3095
Grammer / Re: Grammer
« on: October 11, 2011, 10:11:49 am »
I don't think there is such a thing as a "complete" programming language, but I do agree that it is needed :) Currently, the user can access memory (reading and writing bytes 8- or 16-bits at a time) so in a way that can be used for array support. I don't believe I documented this in the Commands.pdf file (because this is a way to actually cause a crash if used incorrectly), but I will show how, here:


(x reads a byte at address x. For example, (Lbl "HELLO should return the first byte after .HELLO
{x reads a 16-bit value (little endian) at address x
int(x,a writes a byte (a) to address x
iPart(x,a writes a word (a) to an address (x)


Does this help?

3096
Grammer / Re: Grammer
« on: October 11, 2011, 09:38:23 am »
EDIT: Is there a possibility to let grammer in rom and still execute grammer programs??
I plan to make it an APP sometime in the future, so that might be helpful :) I will try to gradually modify Grammer until it will work as an APP, too.

Also, that problem with having to resend Grammer is weird... it must have been a TI-Connect error, I guess.

EDIT: I wonder how I should go about adding array support...

3097
The Axe Parser Project / Re: Assembly Programmers - Help Axe Optimize!
« on: October 09, 2011, 07:26:47 pm »
Thanks :) I think I learned it from you folks :)
EDIT: It does use 2 more cycles though, right?

3098
The Axe Parser Project / Re: Assembly Programmers - Help Axe Optimize!
« on: October 09, 2011, 05:38:20 pm »
Hmm, would this optimisation work to save one more byte? (sorry, I could be wrong):
Code: [Select]
p_CheckSum:
.db __CheckSumEnd-$-1
ld b,h
ld c,l
pop hl
ex      (sp),hl
xor a
ld d,a
__CheckSumLoop:
add a,(hl)
jr nc,$+3
inc d
cpi
jp pe,__CheckSumLoop
ld h,d
ld l,a
ret
__CheckSumEnd:

3099
Grammer / Re: Grammer
« on: October 09, 2011, 10:42:08 am »
Thanks! I was discussing on IRC a few days ago about adding grayscale >.> I don't know if I will add it, but I hear people like it <.<

3100
Grammer / Re: Grammer
« on: October 09, 2011, 09:51:08 am »
Okay, well you might like this update that I just threw together then :) (And I am sure you won't be the only one to like this!)

Now, when using the Pt-On( or Pt-Off( command, if you want to use hex data, you simply add 8 to the method. For example, to draw using the overwrite method, use a value of 8. So here is an example using a circle:
Code: [Select]
.0:Asm(prgmGRAMMER
Lbl "SPRITE→Z
Repeat A=15
Pt-Off(10,Z,Y,X,1,8             ;Draws an inverted circle
DispGraph
Pt-Off(10,Z,Y,X,1,8             ;Re inverts the circle
getKey→A
X+A=3
-A=2
If >88
X
→X
Y+A=1
-A=4
If >56
Y
→Y
End
Goto Lbl "Stop
.SPRITE
3C4281818181423C
.Stop
Stop

I hope this proves to be useful!
EDIT: Oops, better upload the program :-[

3101
Grammer / Re: Grammer
« on: October 09, 2011, 09:04:53 am »
Also, in the program you just gave me, the "SPRITE->A line stores the line after .SPRITE into A, correct? And if I want to show my sprite in your example program in the PDF (where you can move the sprite around) I just replace the 01234567 with the code?
Okay, here is a breakdown of what it does:
the Lbl "SPRITE→A kind of does what you think. Technically, it stores the memory location of the line after .SPRITE. So a neat biproduct of this is this: Say you have two sprites stored after .SPRITE. If you wanted to access the second sprite, just do A+8 (assuming the sprites are 8 bytes).

So to answer your question about the sprite data, you do simply replace the 01234567. If you wanted to, though, you could do some other crazy things (like make a program to store all your sprites in), but that is a little more advanced :) If you want an example of doing this, feel free to ask!
And the code I'm getting back is really messed up (e.g. + and randM(({->??). It's supposed to be like that, right?
Yes, it is supposed to be like that, which is kind of unfortunate (especially if you wanted to copy the data by hand). I will see what  I can do about adding support for hex data to make your lives a bit easier.

3102
Grammer / Re: Grammer
« on: October 08, 2011, 05:22:16 pm »
Hi and thanks! I was actually gone for about a day and a half and just got back! So let's see, you are having trouble with the sprites? Well as Yeong mentioned, 0=32, but in binary that is 00100000, so 8 zeros would draw an 8x8 sprite of just a column of pixels.

I still need to add a command to use hex data for sprite data, but for now, you can try this:
-Draw the sprite in the upper left corner of the graph screen
-Copy this code to a program and execute it:
Code: [Select]
.0:Asm(prgmGRAMMER
Lbl "SPRITE→A
Pt-On(4,A,0,0,1,8       ;This swaps the data on screen
ClrDraw
Pt-Off(0,A,0,0,1,8       ;Draws the sprite back
DispGraph
Stop
Return                   ;Executed by TI-BASIC
.SPRITE
00000000            ;8 bytes for the sprite data
-When you open up the program, the 00000000 line should be replaced with the sprite data :)

The way this works is that with the Pt-On( command, using option 4 will replace the sprite on the screen with the sprite data (it swaps everything). I hope this helps and it is awesome knowing more people are interested!

3103
Grammer / Re: Grammer
« on: October 06, 2011, 04:22:13 pm »
Okay, I will change that, then :) Thanks!

Also, I am working on adding a feature for particle effects that will let you use other pieces of RAM. However, if I do this, then the current setup won't work (which means my examples won't work and any work done with the particle features won't work with the new version).

Is this okay for people?

EDIT: Actually, never mind, I will just add code to make it all still work :) I will just change the default buffer to appBackUpScreen

3104
Grammer / Re: Grammer
« on: October 06, 2011, 03:23:24 pm »
Hmm, I am not sure what is wrong :( There are no writes to the LCD port that would cause this, so my only other idea is that it is writing to a RAM address that it isn't supposed to, but I did add in checks to make sure it wouldn't write outside of the screen  :/ I've no clue what is wrong :( Has it done this using the current version? maybe I added the code to prevent writing outside of the screen after releasing the previous version?

3105
Grammer / Re: Grammer
« on: October 06, 2011, 03:14:46 pm »
Hmm, what is your calculator (83+/84+/SE)?

Pages: 1 ... 205 206 [207] 208 209 ... 317