From: Esra Sdrawkcab on
On Mon, 26 Apr 2010 15:02:57 +0200, Robert Redelmeier
<redelm(a)ev1.net.invalid> wrote:

[editor with key processing]

> In ASM (or C if it'll do this), you'd implement via a jmp table
> (`jmp [ebx]`) and terminate each of the letter functions with
> `jmp keyloop`. Or the equivalent call [ebx]/ret. More or
> less how the C compiler will code it anyways.

Pshurely 'call [ebx]' and end each section with 'ret', no goto required?

> obTroll: In many ways, GOTO is reminiscent of the slightly
> more recent calculator debate between fans of TI algebraic
> notation and HP reverse polish notation.

Damn, missed that!

betterTroll: what about Comefrom?

>
> -- Robert
>
Needs a CRLF in there?

--
Nuns! Nuns! Reverse
From: Alexei A. Frounze on
On Apr 26, 11:38 pm, "Rod Pemberton" <do_not_h...(a)havenone.cmm> wrote:
> "Alexei A. Frounze" <alexfrun...(a)gmail.com> wrote in messagenews:3175dd42-6ff2-452b-af2e-93de277ec661(a)t14g2000prm.googlegroups.com...
> On Apr 26, 2:06 am, "Rod Pemberton" <do_not_h...(a)havenone.cmm> wrote:
>
>
>
> > while(0 /*shouldn't it actually be 1 because with 0 it
> > won't execute even once*/)
>
> Eee...  Good catch!  Sorry, that doesn't work.
>
> But, no, definately not "while(1)"...  That'd would be a loop.  How about
> "do {} while(0)"...  With a "break" or "continue", we should have a forward
> or backward goto.  If the "break" or "continue" is not executed, the entire
> section only executes once, as if the "do {} while(0)" was not there.
> Hopefully, that's correct this time?
>
> :-)
>
> Rod Pemberton

That (do {} while(0)) is a possibility and it is sometimes used for
other purposes. Also, you could just put a break at the end of
while(1)/for(;;)'s block.

Alex
From: Robert Redelmeier on
In alt.lang.asm Esra Sdrawkcab <admin(a)127.0.0.1> wrote in part:
> [editor with key processing]

> Pshurely 'call [ebx]' and end each section with 'ret', no goto required?

Certainly if you wish to reuse the commands between different
modes. Less if you are desparately counting cycles on an 8088
(jmp saves a jmp after the ret). Also less good if the key
never returns "exit".

>> obTroll: In many ways, GOTO is reminiscent of the slightly
>> more recent calculator debate between fans of TI algebraic
>> notation and HP reverse polish notation.
>
> Damn, missed that!
>
> betterTroll: what about Comefrom?

??? what is even slightly trollish about COMEFROM?

It is an obvious debugging tool with _plenty_ of
hardware support (brkpt instructions & debug registers).

If someone chooses to use COMEFROM in their code, they
must think their code has bugs. They would know :)

>> -- Robert
>>
> Needs a CRLF in there?

'dems fightin' words. You callin' me MS-DOSish :)

Yes, I realize \n is old-school correct from when people (incl
me) had real paper ttys. I tr to save readers an extra line on
their too-short read-boxes. (I normally run monitors in portrait
mode with 100+ lines).

-- Robert



>
From: Nathan Baker on
"Robert Redelmeier" <redelm(a)ev1.net.invalid> wrote in message
news:hr8ak7$vhk$1(a)speranza.aioe.org...
>
> modes. Less if you are desparately counting cycles on an 8088
> (jmp saves a jmp after the ret).

Don't you mean that a 'jmp' saves a 'ret' after a 'ret'??

For nested calls, the final call can be replaced by a jmp. E.g.:

,---
Afunc:
<misc. code & func calls>
call Zfunc
`---

replaced by...

,---
Afunc:
<misc. code & func calls>
jmp Zfunc
`---

Nathan.


From: Esra Sdrawkcab on
On Wed, 28 Apr 2010 04:38:47 +0100, Robert Redelmeier
<redelm(a)ev1.net.invalid> wrote:

> In alt.lang.asm Esra Sdrawkcab <admin(a)127.0.0.1> wrote in part:
>> [editor with key processing]
>
>> Pshurely 'call [ebx]' and end each section with 'ret', no goto required?
>
> Certainly if you wish to reuse the commands between different
> modes. Less if you are desparately counting cycles on an 8088
> (jmp saves a jmp after the ret). Also less good if the key
> never returns "exit".
>
Fairy 'nuff. But we're looking at speed, not (lack of) "Goto"s then.

>>> obTroll: In many ways, GOTO is reminiscent of the slightly
>>> more recent calculator debate between fans of TI algebraic
>>> notation and HP reverse polish notation.
>>
>> Damn, missed that!
>>
>> betterTroll: what about Comefrom?
>
> ??? what is even slightly trollish about COMEFROM?
>
> It is an obvious debugging tool with _plenty_ of
> hardware support (brkpt instructions & debug registers).
>
> If someone chooses to use COMEFROM in their code, they
> must think their code has bugs. They would know :)
>
>>> -- Robert
>>>
>> Needs a CRLF in there?
>
> 'dems fightin' words. You callin' me MS-DOSish :)
>
> Yes, I realize \n is old-school correct from when people (incl
> me) had real paper ttys. I tr to save readers an extra line on
> their too-short read-boxes. (I normally run monitors in portrait
> mode with 100+ lines).
>
> -- Robert
>
Ok a newline then!

I was taught sig sep should be newline dash dash space newline.
>
>>


--
Nuns! Nuns! Reverse
First  |  Prev  |  Next  |  Last
Pages: 1 2 3
Prev: on goto
Next: HLA v2.9 is now available on Webster