Re: TIB: increment/decrement and skip


[Prev][Next][Index][Thread]

Re: TIB: increment/decrement and skip




On Tue, 3 Feb 1998 01:33:22 EST TGaArdvark@aol.com writes:
>
>> Are there any real use for the IS< and DS<
>> functions?  I cannot figure out what situation
>> would require them.  Any ideas?
>
>HAHA! I've been wondering this for years. I have
>never used them or seen a program which used them.
>I know what they do but prefer for or while loops.
>Anyone else know what they could be used to do?

They're used to Increment the first parameter and skip the next
instruction if it's greater than the second parameter, and to Decrement
the first parameter and skip the next instruction if it's less than the
second parameter.

The reason I sometimes use them is because they're faster than a for
loop.  It has to do with the way it's interpreted into machine code.  If
you know assembly, "inc a" is faster than "add a,1".

6.7s 33b
:ClLCD
:For(X,1,100
:Disp X
:End

9.5s 44b
:ClLCD
:1->X
:Lbl A
:Disp X
:IS>(X,100
:Goto A

Well, at least it was faster for something I did on the 85 a few years
ago.  There is still one use for IS>(, the second parameter can be a
variable, so you can conditionally check to see if an incremented
variable is greater than another variable used in other calculations.  It
does have it's usefulness, though I like For better.  You just have to
determine the proper code for each individual program's need.


Sincerely,
The Unibomer

Jared Ivey
Unibomer@Juno.com
http://www.geocities.com/SiliconValley/Vista/7342

"usenet: it's not an obsession.  it's just something I have to do ALL THE
TIME" -- Meredith "gypsy" Tanner


_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]


Follow-Ups: References: