HPLua
From Hplua
Contents |
Introduction
hplua is the lua programming language (see http://www.lua.org) for portable devices. right now it's called hplua because it has been ported to the hp50g calculator.
Getting Started
go to the source forge project (see link left) and download the latest release, unless you want the source code just get the bin download. This contains the lua.hp hp50g binary. There is also a Windows binary of hplua in this package. Of course, you could just run the official windows lua binary for your lua development. this binary is here so you can try your lua code on the very same logic as runs on portable devices.
The binary for your hp50g calculator is called lua.hp. unfortunately, i have not made hplua run standalone on the calculator and it must be launched via the ARMtoolbox. there is a binary release of the toolbox bundled in the lua bin download. see the readme files for explanation on how to install this. essentially, its just a LIB.
i have found it vastly easier to simply transfer files to the calculator by putting them onto a SD card and transferring this card to the calculator. i recommend this to, at least, get started. try out one of the samples like sunset.lua
Differences to Official LUA
i have added c-syntax binary operators to hplua. i have found it useful for bitwise data manipulation. furthermore \ (backslash) performs integer divide. eg 10\3 = 3
hplua uses 25 digit BCD internally for calculation. therefore numeric values will differ somewhat from those in standard ieee-754 implementations.
Recommended LUA Documentation
- firtly, see http://www.lua.org
- the book, "Programming in Lua, Second Edition (Paperback) by Roberto Ierusalimschy", is highly recommended.
- the book, "Beginning Lua Programming (Programmer to Programmer) by Kurt Jung, Aaron Brown", also looks interesting.
- the lua reference manual is available as a book, but the same content is also available on lua.org, http://www.lua.org/docs.html
