lua-users home
lua-l archive

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


David Given wrote:
I've tried making C compilers work on the 6502 and Z80; while they do
have stacks, they only really like doing pushes and pops and are
egregiously unoptimised for stack frame random access.

I don't remember if I ever looked into the produced code, but The Manx C compiler I used on the Apple II seemed to work fine. I don't think I measured its efficiency, though, because I used it mainly for high-level code. It would be interesting to dig it up and see what tricks it used.

Anyway, that's why I mentioned the 6809: as far as I know, it was the first 8-bit CPU specifically designed to make stack frames easy to use (e.g. it had frame pointer-relative instructions). It turned out to be actually slower than the 6502 in my applications, but that's another matter :-)

  Enrico