lua-users home
lua-l archive

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

Tom Bates wrote:

I am using a Microtec C/C++ cross compiler under Windows for a Motorola
68331 processor. I am currently working on porting Lua to a very limited
embedded platform that does not support floating point in hardware, so I
have built Lua using longs as Lua numbers. In this environment then, it
strikes me that the compiler is correct, and this code will not be
generated, which is fine.

Man, I can remember using that compiler 10 or so years ago...I just
did a quick search and it looks like Mentor Graphics picked them up.

But for now, I just need to get the port working. At the moment, the
interpreter does not build correct code from source, but the engine does
execute compiled code correctly.

I'm doing something similar, but with an ARM processor. And I
have the same problem as you (maybe). I'm using longs instead
of float or double too.

I can define one-line functions (within the input buffer limit)
and I can type single line input, but if I feed the bare bones
interpreter a multi-line function, it chokes somewhere in the
middle of parsing the function.

I'm narrowing down the search bit by bit, and my next step is
having a look at my realloc() function.

This is 5.1.1 by the way, and I also plan to go back and test
with the 5.0.3 code to see if there's a difference.

I only have 64 K of RAM to work with, but lots of FLASH for the
C code. The applications that will be written are pretty small,
so I don't need support for huge arryas etc.