Re: design a simple "bytecode"

From: Groepaz <groepaz_at_gmx.net>
Date: Wed, 26 Oct 2011 20:57:58 +0200
Message-Id: <201110262057.58667.groepaz@gmx.net>
On Wednesday 26 October 2011, you wrote:
> An interesting detail: Pascal pushes a lot of things on the Stack.
> The one of the 6502 is much to small. So I created my own Stack.
> IIRC two locations of the zero page points to this stack. If I have
> to push something on the Stack, I use "sta (zp),Y" (where Y=0) and
> then decrease the pointer. And all this is done inside the macro
> file.
> But the Z80 and 65816 can use all 64 KB as Stack. So the above
> trick isn't needed for these two processors and normal Stack
> operations can be used.
> 
> I hope this was clear enough. If not, you know where to find me :)

sounds pretty much like CC65 works (or any other compiler for a stack based 
language on the c64 =))

as for bytecode, i'd rather do it similar to how basic compilers on the c64 
usually work. ie produce some kind of tokenized high level language as output, 
which then runs interpreted on the target machine.

-- 

http://www.hitmen-console.org    http://magicdisk.untergrund.net
http://www.pokefinder.org        http://ftp.pokefinder.org

I don't know the key to success, but the key to failure is trying to please 
everybody. 
<Bill Cosby>


       Message was sent through the cbm-hackers mailing list
Received on 2011-10-26 19:00:32

Archive generated by hypermail 2.2.0.