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 The compiler itself is maintained at 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

Jal : (not?) Just Another Language

Up to my PIC page, To my professional home page
last modified 2001-07-12

Januari 2003: the Jal compiler source is available under GPL.

what is Jal?

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.

legal status

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.

Jal on the web

Some links:

I removed some older links that were no longer active. If you have a Jal project on the web send me the URL so I can add it.


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:

The documentation is not up-to-date, the recent distributions contain a number of features that are not documented in the manual. The table below gives some information about this. The releases that are shown as hyperlinks are available for download. Unless there are strong reasons against this the latest version should be used.

release (new) features
sorry, dos/win only
some 18F support
sorry, dos/win only
various bug fixes
16f628 lib files
- COMF instruction simulation
- problem with out parameters for functions
- handling of directory separator character
- minimalistic support for 12CE674
- ; as alternative for -- (to make it easier to 'import' commented MPASM fragments) 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 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. - 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)
latest version that is fully documented

some usefull banner links

[ Join Now | Ring Hub | Random | << Prev | Next >> ]
V3-URL Direct URL: to this page Free programmers' resources, free web designers' resources, free software Free programmer's resources
DJGPP The Dos/Windows version of Jal is compiled by DJGPP
Microchip for PIC datasheet, application notes etc.
Ubicom for SX datasheet, application notes etc.
DonTronics Sells various PIC boards (simmsticks!) and other PIC-related things.
Parallax Parallax sells SX chips, SX programmers and much more.
PICList The PIC mailing list, THE place to be for both PIC wannabees and die-hards.
techref: PIC lots of information on TECHREF : PIC
techref: SX and lots of information on TECHREF : SX
P.H.Anderson P.H.Anderson: a good source for hobbyists to buy PICs. Lots of compilers, including free ones (Jal is under free Pascal-like compilers).
DJO Amersfoort (Dutch) the electronics/computers hobby club where Jal was first used.
Snail Instruments Snail Instruments sells PICs at reasonable prices and accepts payment in low-tech ways like mailed cash.