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

Pages: 1 ... 129 130 [131] 132 133 ... 153
1951
The Axe Parser Project / Re: Features Wishlist
« on: October 05, 2010, 10:53:31 am »
@LordConupiter: Not 2 calc data sending. I'm talking about having the ability to run other programs from an Axe compiled program.
did you mean that! sorry, I misinterpreted your Post, for U suggested to use the Get command, and that's already used for data transfer between 2 calcs.

@Runer: how did you do that! those two code block next to each other?

A table:
Code: [Select]
[table][tr][td]Put one code block in here[/td][td]        [/td][td]Put another code block in here[/td][/tr][/table]

1952
Axe / Re: Running External Programs
« on: October 05, 2010, 10:29:37 am »
Asm( is already used to run hex within a program. There would need to be a different command for it.

If you need a different token, how about AsmPrgm? Although you could always use Asm() for this too, and just check if a program name or hex is inside the parentheses and parse it accordingly.

1953
The Axe Parser Project / Re: Features Wishlist
« on: October 05, 2010, 10:27:11 am »
Feature Request:

TI-Basic has the ability to transfer control to another executable, then return when done. Axe should be able to do the same. Maybe, use the command Get( or something, where the command

Get(prgmAAA)

would cause the executable to transfer execution to the asm program AAA, then return to the main.

If you want to call another Axe program, unless you desperately need them to be two separate compiled programs, this can already be achieved with included programs. Just call it as a subroutine in your main program without a Return, like this:

Code: (Your main program) [Select]
.PROGRAM

ClrHome
Disp "Hello "
sub(A)
Disp i
Return

Lbl A
prgmINCLUDE
       
Code: (prgmINCLUDE) [Select]
..

Disp "world!"
Return

1954
TI Z80 / Re: My First Quantum Translocator
« on: October 05, 2010, 10:11:20 am »
And a quick question: why is the following code in the program? The code seems pretty infinite-velocity-proof already, so you can probably get rid of it.
Code: [Select]
:If sub(CY,-3
:If V>50000
:0→V
:End
:End
Um. Uh. The V>50000 actually tests if your velocity is negative, or at least I think it does. This prevents the 0->V from taking effect unless you are moving upward, which could be a problem with the way I've done ground collision...basically, I forgot. Thanks for extras.

Also, I'm fairly sure that the bluescale does NOT harm the screen. There's a relevant thread on UTI.

Oh, in that case, you could optimize it by changing If V>50000 to !If V≥≥0

1955
Axe / Re: how to make an appvar????
« on: October 05, 2010, 10:06:14 am »
It probably doesn't work because, as of now, there's only a SortD() command ;)

1956
Axe / Re: RAM addresses
« on: October 04, 2010, 09:45:43 pm »
Here you go :) You'd want to use Disp sub(W2H,A)

1957
Axe / Re: Routines
« on: October 04, 2010, 09:42:03 pm »
Here's a very compact 125-byte library for hex display. It contains the following subroutines:
  • N2H: Nibble to hex – Example: 13sub(N2H) would return the character "D"
  • B2H: Byte to hex – Example: sub(B2H,69) would return a pointer to the string "45"
  • W2H: Word (2 bytes) to hex – Example: sub(W2H,1234) would return a pointer to the string "04D2"

To include it in your program, send prgmHEXLIB to your calculator and put prgmHEXLIB among the other subroutines in your program. Just make that sure wherever you put it, it won't be accidentally reached and executed unless you call it.

I challenge anyone to find a single optimization in this code or produce a smaller library of their own ;) (/me waits for Quigibo to make it way more compact than anyone thought possible)


EDIT: Changed name from prgmHEXSRC to prgmHEXLIB and reuploaded. This name just seems more appropriate for a library that you don't compile as a standalone program.

1958
TI Z80 / Re: My First Quantum Translocator
« on: October 04, 2010, 08:46:38 pm »
235 bytes gone ;) AND a feature added: Instead of setting the screen contrast to 50 after the intro (ignoring what it was previously set at), it now sets the screen contrast back to what the user had it set at.

And a quick question: why is the following code in the program? The code seems pretty infinite-velocity-proof already, so you can probably get rid of it.
Code: [Select]
:If sub(CY,-3
:If V>50000
:0→V
:End
:End

1959
Axe / Re: Several questions
« on: October 04, 2010, 06:17:22 pm »
ASM is a totally different animal from BASIC. But the ASM jump commands I'm familiar with, JL and JP both take fairly long times to jump as far as I'm aware. I'm not sure if Axe uses those commands for GOTO though.

JR and JP take 12 clock cycles at most. That's 2 microseconds (2*10-6 seconds) at 6MHz, so I would hardly call that a "fairly long time." :P

1960
TI Z80 / Re: My First Quantum Translocator
« on: October 04, 2010, 05:15:47 pm »
I'm going to say this now as a warning before anyone tests this on a physical calculator: the blue screen effect may look cool, but it can permanently damage your screen. Even though it only flashes for an instant, it can't be too good for the screen. JustCause, I would suggest removing it.

EDIT: I take that back, I didn't actually try the program until now. It looks like the flash is very brief and shouldn't really do anything.

1961
The Axe Parser Project / Re: Bug Reports
« on: October 04, 2010, 04:57:09 pm »
Yeah, that would probably do it :-[ But why would even compile successfully for that matter?

1962
The Axe Parser Project / Re: Axe Parser
« on: October 04, 2010, 04:55:57 pm »
Ah right, I didn't think of that...

1963
The Axe Parser Project / Re: Axe Parser
« on: October 04, 2010, 04:21:53 pm »
≥≥0 definitely requires code, as it needs to check the sign bit and return it's inverse. And I'm also wondering why ≥≥CONST is 11 bytes larger than ≥≥0, because it seems to me that it could be optimized to just combine -CONST and ≥≥0 and only be 4 bytes larger.

1964
The Axe Parser Project / Re: Bug Reports
« on: October 04, 2010, 04:02:18 pm »
In the Commands.htm file, fPart() and iPart() are reversed. iPart() is the real token for the nib{} command and fPart() is the real token for the float{} command.


EDIT: Here's something completely unrelated, but I don't want to double post:

Dereferencing doesn't seem to be acting right to me... aren't the built-in variables at constant addresses, and loading constants takes 3 bytes? So why does loading a variable's address with the ° modifier (e.g. ) take 6 bytes? And why does it not combine properly with operations? (e.g. A°+1 takes 9 bytes)

1965
The Axe Parser Project / Re: Axe Parser
« on: October 04, 2010, 03:54:38 pm »
While we're on the topic of optimizations... Would something like A-128≥≥0 be more optimized than A≥≥128? And if so, why is the ≥≥CONST entry in Auto Opts.txt listed as taking a whole 11 bytes more than ≥≥0?

Pages: 1 ... 129 130 [131] 132 133 ... 153