0 Members and 6 Guests are viewing this topic.
.# represents the 16-bit or operationL₆→AWhile -768-L₆{A}ʳ#{A+L₃-L₆}ʳ→{A}ʳ+1→AEnd
That's pretty much the way to do it. You'd be surprised just how fast one massive For() loop that OR's the contents of both buffers is, though. I calculated that the following loop runs about 40 times per second at 6MHz:Code: [Select]Repeat getKey(15)For(A,0,383).That ﹢ symbol is the 16-bit OR operator{A*2+L₆}ʳ﹢{A*2+L₃}ʳ→{A*2+L₆}ʳEndC+1→CEnd
Repeat getKey(15)For(A,0,383).That ﹢ symbol is the 16-bit OR operator{A*2+L₆}ʳ﹢{A*2+L₃}ʳ→{A*2+L₆}ʳEndC+1→CEnd
Quote from: Runer112 on October 02, 2010, 12:14:28 pmThat's pretty much the way to do it. You'd be surprised just how fast one massive For() loop that OR's the contents of both buffers is, though. I calculated that the following loop runs about 40 times per second at 6MHz:Code: [Select]Repeat getKey(15)For(A,0,383).That ﹢ symbol is the 16-bit OR operator{A*2+L₆}ʳ﹢{A*2+L₃}ʳ→{A*2+L₆}ʳEndC+1→CEndWhoa, how'd you get the small r to work in a code tag?
min→{L1+A}While {L1+A}<max{L1+A}+1→{L1+A}<code>End
For(Var, min, max)<code>End
Quick question: Is this:Code: (1 byte variable For() loop) [Select]min→{L1+A}While {L1+A}<max{L1+A}+1→{L1+A}<code>Endfaster than:Code: (Standard For() loop) [Select]For(Var, min, max)<code>End?
For(A,0,5)<code>End0->AWhile -5<Code>A+1->AEnd
:Lbl LP//code:Goto LP
:While 1//code:End
True. And just wondering: Does anyone have an example of where DS<( would be useful?