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

Pages: 1 ... 20 21 [22] 23 24 ... 215
316
Humour and Jokes / Re: 9001 signs you're addicted to calcs and Omni
« on: October 12, 2011, 05:29:26 am »
2411: Instead of digging through nested spoilers, you just click "Quote".
2412: You use the "Modify" button instead  >:D

317
Miscellaneous / Re: How much English words do you know?
« on: October 12, 2011, 03:20:36 am »
Apparently I'm 33 in my vocab age. However, I suspect I know somewhat more than that (along with many of the people here) because some portion of my vocabulary has a lot more technical material in it than most people.

EDIT: I fall short of my vocabulary age by 45%  :w00t:

318
Axe / Re: Questions about Self Modifying Code
« on: October 12, 2011, 03:07:13 am »
Quigibo, thanks for explaining Lambdas to me. I can really see how they might be used now.

Anyway, yeongJIN_COOL, while the others are right, I do remember wanting to learn SMC for myself. I still maintain that you don't need it for your current project. There's very little good information available on it because it's such a difficult/specialized technique*. The basic situation where SMC is used is those cases where you have code that is largely repetitive. It occasionally turns out that it's actually more efficient to write new code in where the old code differs than to use two different blocks of code. The whole thing hinges on the fact that code and data are exactly the same thing at the machine level. When you write to memory, you're potentially writing valid code, even if it will never be executed.

The basic cycle of SMC is

1: Execute
2: Write new code to the existing code in (1)
3: Goto (1)

Now, SMC is very dangerous because if you set a single bit in the code improperly, you may cause a complete program crash and also because it can be very difficult to follow the flow of a self modifying program, leading to bugs if you're not careful.

Basically, avoid SMC like the plague unless there's some problem that cannot be reasonably solved without it or you have near-complete access to/understanding of the assembly level source. When you have to use it, spend a lot of time making sure that the SMC is *absolutely* correct before writing anything else. Bad SMC can have some incredibly strange behavior.

* I spent quite awhile on Google reading comments about how "you shouldn't use SMC" before I gave up and asked Calc84. Now I use it in Khavi to solve the difficult problem of not knowing where in memory the interpreter threads will be located at any time before runtime. Windows uses a very similar method to get programs to run at places in memory that they weren't compiled to run at.

319
ASM / Re: Streamlined Asm routines
« on: October 11, 2011, 07:18:16 pm »
Multiply hl by 1000 to turn it into milliseconds. If you don't need all of the precision, leftshifting hl by 10 is approximately the same.

320
Axe / Re: Questions about Self Modifying Code
« on: October 11, 2011, 06:24:49 pm »
question lists
1: How does it work?
2:How do I use it?
3: Can I see the example(code) of it?

1) Code that modifies itself while it's running is called "Self-modifying code."

2) You modify the code, then you change PC to point to the modified code. However, there are very few situations in which SMC is the only way to write a program. I would highly recommend avoiding it if at all possible, especially if you're working with Axe rather than ASM.

3) Cue calc84...

321
Khavi / Re: Khavi: Java on the Prizm
« on: October 10, 2011, 06:55:15 pm »
The main difference between LuaFX and Khavi's Lua virtual machine is that LuaFX will be more like TI's Lua interpreter; It will be able to take plaintext Lua code, compile it to bytecode, and then execute that bytecode. All Khavi does is execute the bytecode. The compilation is left to the user and computer side compilers.

As for the Prizm Compiler, that was z80man's project, so I'm not sure how far he got on it. As I recall, he put it on hold to work on Walnut. It would have compiled to native ASM, so it wouldn't have been a part of Khavi (although Khavi can indeed run non-Khavi programs alongside the interpreters).

322
Yeah. lobsters are great(to eat). we would never mistreat them
Anyways, what are they going to do next? sue us for mistreatment of fish?

>:D

323
Khavi / Re: Khavi: Java on the Prizm
« on: October 10, 2011, 02:22:49 pm »
It won't be entirely LuaFX compatible, as far as I'm aware. LuaFX is a complete implementation of the Lua interpreter. Khavi is an implementation of the Lua virtual machine (which is admittedly all that LuaFX includes at the moment).

324
Humour and Jokes / Re: Human
« on: October 10, 2011, 02:07:26 pm »
Holy Necropost, Batman  O.O

325
KnightOS / Re: KnightOS - A 3rd Party Operating System
« on: October 10, 2011, 01:06:25 pm »
You're free to post updates for KnightOS. Just be warned that if you post outside the KOS subforum (or this thread), you will be banned.

On an unrelated note, glad to see updates for this.

326
Khavi / Re: Khavi: Java on the Prizm
« on: October 10, 2011, 03:58:11 am »
That's mostly because I don't like using .s files. Everything except the Gnu GPL is still source, though.

327
TI Z80 / Re: truvid videos
« on: October 09, 2011, 11:37:46 pm »
That is the best. I thought that truvid was a joke, there is like no way for it to be as fast as in the video!

It's definitely real and yes, it's actually that fast.

328
Axe / Re: Optimize me plz.
« on: October 09, 2011, 05:49:33 pm »
Yes.

329
Axe / Re: Optimize me plz.
« on: October 09, 2011, 05:32:39 pm »
If you didn't mind a 90 degree rotation, then this might be more optimized:

Code: [Select]
:For(A,0,95
:A^12->X
:A/8->Y
:Pt-On(X,Y,RotC(Pt-get(X,Y)))
:END

330
Axe / Re: Optimize me plz.
« on: October 09, 2011, 05:14:30 pm »
Code: [Select]
:cos(A)->D
:sin(A)->E
:For(X,0,95)
:For(Y,0,63)
:If pxl-Test(X,Y)^r
:Pxl-on(X-Y*E//128,Y8D+(X-16*E)//128)
:END:END:END

That's a bit more optimized, although I'm sure Runer could improve upon it.

Pages: 1 ... 20 21 [22] 23 24 ... 215