[gameprogrammer] Re: More scripting engines

On Thursday 29 April 2004 18.30, Alan Wolfe wrote:
> gotos may be evil but at the core of computers that's pretty much
> all you got (:
>
> jmp
> jnz
> call (special case yeah...)
>
> etc :P

Of course - but you don't have high level block oriented flow control 
in asm, so there's no conflict. Goes for my VM as well, and most 
other VMs, I guess. The current instruction set includes these:

        JUMP    jump
        JUMPZ   jump if zero
        JUMPNZ  jump if not zero
        CSKIP   perform "reg OP reg" and skip the next
                instruction if the result is non-zero
        CALL    call w/ run time binding
        CCALL   call with compile time binding
        RETURN  guess what ;-)

JUMPZ and CSKIP aren't used yet, as there's no optimizer. I'll 
probably use specialized instructions for faster loops, switches and 
stuff, but that doesn't make the asm language block oriented.


//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
|  Free/Open Source audio engine for games and multimedia.  |
| MIDI, modular synthesis, real time effects, scripting,... |
`-----------------------------------> http://audiality.org -'
   --- http://olofson.net --- http://www.reologica.se ---


Other related posts: