This page is kept for historic reasons. The jal compiler and libraries available from this page are not recommended for new users. If you want to refer to this version of Jal I suggest you call it "vintage Jal". A much more mature Jal compiler, packaged with a set of libraries, is available from http://code.google.com/p/jallib/. The compiler itself is maintained at http://www.casadeyork.com/jalv2/. Bert van Dam has written a number of books using Jal. He provides his own libraries to support the project in his books. Check his website at http://www.vandam.tk/. |
Up to my PIC page,
To my professional home page
http://www.xs4all.nl/~wf/wouter/pic/jal/index.html
last modified 2001-07-12
Januari 2003: the Jal compiler source is available under GPL.
Jal is a high-level language for a number of Microchip PIC (16c84, 16f84, 12c508, 12c509, 16F877) and Ubicom SX (SX18 and SX28) microcontrollers. I created Jal because I did not like any of the low-cost (or free) languages for these chips and implementing a high level language looked like a nice project. Implementing an existing HLL seemed more difficult and less fun than creating my own, so I just started writing the compiler and the language evolved on with it.
Sorry for all C-lovers, but Jal is more like Pascal. I don't like C that much (although for practical reasons I use C a lot, the Jal compiler is written in C) and I wanted a HLL which is better mached to the PIC architecture, to my programming habits, and which I could explain to the kids of the local electronics club without giving a full course on computer architecture.
All reactions (experiences, suggestions, projects, bugs, contributions, flames, whatever) are welcome. Reactions that are 'for my eyes only' can be sent to me, but in most cases the Jallist is a better forum.
The Jal compiler is freeware: you are free to copy and use the compiler and the documentation for whatever purpose you want, except for Jal for life-critical or weapons systems is explicitly forbidden. I don't like the idea of anyone being killed because some Jal bug - or by the absence thereof! There is absolutely no warranty for the fitness of the provided software and documentation for any purpose. I like to be notified of any significant use (on the Jallist, by postcard, email or whatever), but that is not an obligation.
The Jal libraries are covered by the GNU Library General Public License, which means that you are free to distribute either these libraries or derived versions. You are even allowed to ask money for it, but you are not allowed to remove the LGPL notice. Confrom the LGPL there is no such obligation for the compiled version (hex file), so you can freely sell or (give away) a product which contains these libraries in compiled form. In simple words: you can use Jal for commercial applications.
Sorry, the source of the Jal compiler is not available.
For a quick impression of Jal you could read either the summary or the examples section of the on-line manual. The release notes explain the difference between the public versions of Jal. Although I don't get much questions I wrote a Jal FAQ. For a first-time PIC users the english version of the 16x84 assignments I wrote for the local "young engineers" club might be interesting.
The Jallist (a mailing list) at Yahoo!Groups has (may 2001) 181 members who can answer all kinds of questions (often better than I could) and are interested to read your experiences. Note that this list runs on a free mailing list server, so you must accept al little advertising. The files and links pages of the jallist might also be interesting for non-members.
There is a Jal page at techref that provides some code fragments, and another page that provides some links.
BTW the piclist and the piclist pages at techref are THE place for all general (non-Jal) PIC questions.
Rindert Nauta has made a math library by wrapping some fixed point routines from the Microchip AN00617 and AN526B application notes in Jal procedures.
Essentially the same Jal distribution is available for dos/windows (a zip file, ~400Kb) and (not all versions) for linux (tgz file, ~220Kb).
The distributions contain:
release | (new) features |
04-50.zip
sorry, dos/win only |
some 18F support |
04-40.zip
sorry, dos/win only |
various bug fixes 16f628 lib files |
04-35.zip
04-35.tgz |
corrections: - COMF instruction simulation - problem with out parameters for functions - handling of directory separator character additions: - minimalistic support for 12CE674 - ; as alternative for -- (to make it easier to 'import' commented MPASM fragments) |
04-33.zip |
corrections: - decfsz/incfsz in in-line assembler on 12-bit cores always used f as target - simulation of decfsz/incfsz always used f as target - previous version contained wrong documentation |
04-32 |
- generates 8K code for the 16f877, but the generated code
is about twice the size of 16x84 (and previous 16f877) code - example e1008.jal lets a 16f877 quote a small part of 'the rhyme of the ancient mariner' to a serial link; e1008.tcl shows how I created this example (when you can read tcl) - supports 12c508 (but this has not been tested on a real chip) - generates save/restore code for interrupt - generates 'put/'get when a var is passed as volatile parameter - various reported problems solved |
04-22.zip |
limited support for the 16f877: - 2k code - 96 file registers - configuration word is fixed 0x3F7A - support for the I/O pins - support for reading and writing eeprom and flash - no support for most on-chip peripherals The other resources of a 16f877 can of course be used via in-line assembly. |
04-18.zip |
- pass function result back in w (optimization) - use jumps for compound boolean expressions - use dest-f opcodes (optimization) |
04-17 |
- solved 'asm goto p' problem - '-r...' option determines the output produced by teh compiler - 'pragma keep var x, y, z' prevents the optimizer from removing unused variables |
04-16 |
- replace tail call in procedure or function by a goto - problem with passing 'put & 'get (introduced in 0.4-15) solved |
04-15 |
- asm output file shows page and bank overhead - code, page prefix for assembler instructions - pragma preserve code, page - pragma to switch bank instruction elimination: -ob and -oB - SX code now somewhat better, but still around 2* size of 16x84 code - w used for parameter passing; pragma optimize [no] w, parameters -ow and -oW - "at" works for parameters, jpic.jal reworked to use this (produces less code now) - bug in interval corrected (could hang serial routines) - jal.doc added (all documentation in one file, dos/windows only) |
04-10.zip
04-10.tgz |
latest version that is fully documented |
|