JALv2 Homepage

Welcome to the JALv2 homepage. JALv2 is a rewrite of Wouter van Ooijen's famous Just Another Language.

JALv2 adds the following enhancements to the original:

  • More variable types:
    • BIT - 1 bit
    • BYTE - 8 bit, unsigned
    • SBYTE - 8 bit, signed
    • WORD - 16 bit, unsigned
    • SWORD - 16 bit, signed
    • DWORD - 32 bit, unsigned
    • SDWORD - 32 bit, signed
    • user defined : [S]BYTE*n, creates an n-BYTE signed or unsigned
    • user defined : [S]BIT*n, creates an n-BIT signed or unsigned
    • Arrays
  • Allow an index in FOR loops (FOR expr USING var...)
  • Built-in multiply and divide
  • Variables automatically placed on any page
  • CASE statement for flow control
  • Co-operative multi-tasking

More JAL bits and libraries can be found:

jallib -- libraries for everything
http://code.google.com/p/jallib/
Rob Hammerling's Homepage for all Microchip device files
http://www.robh.nl/
Single Multiple with Constant Calculator
http://www.casadeyork.com/jalv2/cmul.cgi
Original JAL
www.voti.nl/jal/index_1.html
Stef's PIC Pages
http://pic.flappie.nl
Wattystuff
http://www.wattystuff.net/tiki/tiki-index.php?page=PIC+Micro
Bert van Dam Pages
http://members.home.nl/b.vandam/
Yahoo Group
http://tech.groups.yahoo.com/group/jallist
Release history:
2.4k -- 08 May 2009
  • very minor optimization for bit value return
  • B00059: compiler generated 'put for bits doesn't work
  • B00058: compiler generated 'put doesn't work
  • B00057: cannot pass volatile bit out parameter
  • fixed jalpragm.txt to match the code
  • B00060: cannot assign to a multi-bit on 16 bit cores
  • cleaned up signed/unsigned and truncation warnings
  • B00061: 16 bit cores should save TBLPTR/TABLAT on ISR
  • B00039: FSR should be saved if used in an ISR
  • B00063: IF cond THEN...generates bad code in some cases
  • databits aren't set correctly on indirectly called functions
  • if an indirect function used no data space *and* called other functions that *did* use data space, the space for those data would not be correctly allocated.
  • added internal constant, JAL_BUILD, which gives a monotonically increasing build #
2.4j -- 12 Mar 2009
  • B00052: Allow any characters in an include filename except ';' and '--'. Also, the filename may neither begin nor end with a space.
  • B00053: Added _warn, _error, and _debug (Thanks Sebastien!)
  • B00054: Fixed `pragma error' to display any text on the line after the pragma
  • B00050: If `-loader18' was used, the code wouldn't skip over any preamble.
  • B00051: `const blah = 0x400; var word x at blah' failed miserably
  • passing an array element into an inline procedure failed (always only passed the first element of the array)
  • B00056: added 'tblrd' and 'tblwr' to inline assembly
  • fixed comparing signed constants
  • in some instances assigning a negative number to a signed variable that can clearly contain it resulted in signed/unsigned mismatch
  • Removed OS/2 Makefiles (see above)
  • Issue warning when multi-byte string is used in an expression (x = "abc" * 2 --> only 'a' is used)
  • *Always* set the 2nd high bit when passing constant arrays

Lastest release files (JALv2 2.4k):
README.txt
archive/README.txt
Binaries (win32 and linux with chipdef files)
archive/jalv24k.zip
Sources
archive/jalv24ksrc.zip
Archive
Bleeding edge files. Warning -- these are probably in the midst of being tested, and some features may not work. Always look at the README file to see what changes have come in! The version is always one higher than the last release.
README.txt
archive/beta/README.txt
Binaries (win32 and linux with chipdef files)
archive/beta/jalv2.zip
Sources
archive/beta/jalv2src.zip
Documentation

  • Language Reference
  • Compiler Options
  • Pragmas
  • Chipdef Setup
  • Curious Perversions
    These are just some minor projects I've done that probably don't belong in either a MicroController, or in JAL. Use at your own risk!
Bugs/Issues/Requests
JALv2 versions are in the form x.y.z
x
major version, currently 2
y
minor version increments with each release
z
used only for beta releases
Severity is
request
feature request
low
either not often used or not stated as critical
medium
prevents someone from using a feature JALv2
high
prevents many from using a feature JALv2
critical
compiler horribly broken
IDSeverityVersionDescriptionFixed
B00063 medium all IF cond THEN might generates incorrect code for some cases 2.4k
B00062 medium all context saves should only save context if used in both user and interrupt (currently context is always saved if used in an interrupt). open
B00061 medium all 16 bit cores should save _tblptr & _tablat 2.4k
B00060 medium all assignment to bits on 16 bit cores fails 2.4k
B00059 medium all compiler generated bit 'put procedure is incorrect 2.4k
B00058 medium all compiler generated 'put procedure does nothing 2.4k
B00057 medium all cannot pass volatile OUT bit parameter 2.4k
B00056 request all Allow `tblrd' and `tblwr' in the inline assembly 2.4j
B00055 request all Allow both interrupt levels to be used on an 16 bit core open
B00054 request all Any characters after `pragma error' should appear in the error message 2.4j
B00053 request all would like user-generated warnings and errors if a particular code path might be executed 2.4j
B00052 request all allow any characters in an include filename except ';' and '--'. Also, the filename may neither begin nor end with a space. 2.4j
B00051 medium all `const blah = cexpr; var word xx at blah' failed miserably 2.4j
B00050 medium all when -loader18 is used the initial GOTO to skip any preamble is missing 2.4j
B00049 medium all In some instances, variable allocation can take hours. open
B00048 low all version string should have letter appended (2.4i) 2.4i
B00047 medium all open
B00046 low all compiler directives (``if cexpr...'') incorrectly opened a new block 2.4i
B00045 medium all Inline function parameters that are not used directly (only used via another variable placed `at' the parameter) weren't working correctly. 2.4i
B00044 medium all inline function return wasn't being handled correctly 2.4i
B00043 medium all Inline assembly -- procedures passed array elements don't work correctly. 2.4i
B00042 medium all Inline assembly using conditional operations might get optimized away 2.4f
B00041 medium all inlining a function or procedure that takes a volatile variable results in `invalid operation' when called. 2.4f
B00040 medium all x - C, where x is two bytes, C > x, and lsb C is 0 fails (gordon). 2.4e
B00039 medium all FSR is not saved during a context switch, so if an ISR uses an array bad things can happen (gordon) 2.4k
B00038 medium all assignment to multi-bit variables isn't shifting the result into the correct bits. 2.4d
B00037 high 2.4c division fails due to invalid assumptions about subtraction 2.4d
B00036 medium all Inline parameters that are specifically positioned are incorrectly replaced with locals. 2.4d
B00035 high all compiler crashes with lookup tables on 16 bit cores 2.4c
B00034 request 2.4 ability to program the ID bytes open
B00033 request 2.4 repeat..until loop 2.4b
B00032 request 2.4 `exit loop' request for all loop types 2.4b
B00031 medium 2.4 inline assembly might incorrectly use bank and page operators on 16 bit cores 2.4b
B00030 request 2.4a Would like pascal - styled record support open
B00029 high 2.4a (probably all) The simple construct `forever loop end loop' will hang the compiler 2.4b
B00028 low 2.4a Under some circumstances the optimizer might issue ``opt pass has gone infinite'' This will lead to slightly unoptimized code but the resulting program should run correctly. 2.4b
B00027 medium all wrong registers used when receiving the result of a function in an inlined function 2.4a
B00026 medium 2.4 Loop optimization bug with nested IFs 2.4a
B00025 medium 2.4 Occasionally the hardware stack computation is off. open
B00024 med 2.4 Compiler is re-using state variables that are in use in some cases. 2.4a
B00023 low 2.3 Alaised variables in inline functions don't work 2.4
B00022 low 2.3 Passing multiple filenames on the command line crashes the compiler 2.4
B00021 low all Cannot alias a pseudo-variable 2.4
Workaround: create a dummy variable with the same name as the pseudo-variable.
B00020 medium 2.2.3a indexing into a multi-byte lookup table doesn't work 2.4
B00019 medium 2.2.3a nest 'if...end if' directives get confused if an `else' follows an `end it' 2.2.3b
B00018 medium 2.2.3a long jump tables generate incorrect code 2.2.3b
B00017 medium 2.2.3a `pragma interrupt fast' doesn't generate any code 2.2.3b
B00016 medium 2.2.3 An empty IF block immediately followed by procedure or function call will generate bad code. 2.2.3b
B00015 medium all A temporary is used by a FOR statement (eg, FOR x + 1 LOOP) it will likely be overwritten somewhere in the block. 2.4
B00014 low all Compiler leaks memory like a sieve open
B00013 low 2.2.3 When only CONST arrays are passed into as flexible arrays, PCLATH<6> gets set 2.2.3b
B00012 medium 2.2.3 Bad code is generated when the result of a flexible array read is passed directly to another function 2.2.3b
B00011 request 2.2.3 Constant strings should be able to be passed directly to a procedure with flexible arrays, eg write_string("hello") open
B00010 request 2.2.3 Should be able to pass psuedo-arrays to a procedure with flexible arrays open
B00009 request all 16-bit support 2.4
B00008 request all variables should be allowed to be placed in EEPROM open
B00007 request all Inline assembly should be able to get the address of a variable closed
This simply isn't possible with the current compiler because the compiler has no idea where a variable will be placed until long after the inline assembly has been parsed. For this to work the compiler would first need to emit assembly code, then a second pass to compiler the assembly, or alternately only emit assembly and have MPLAB complete the process.
B00006 mild 2.2.3 If -bloader is used the page and data bits may not be set correctly 2.2.3a
B00005 mild 2.2.3 Flexible strings, when passed a non-const array would not set _irp correctly 2.2.3a
B00004 mild 2.2.3 spurious `requires boolean expression' 2.2.3a
B00003 mild 2.2.3 multi-byte decrement doesn't work correctly in the self assignment case (eg, x = x - 1) 2.2.3a
B00002 med 2.2.3 const shift right and shift right arithmetic does not work correctly (eg, x = 5 >> y) 2.2.3a
B00001 low 2.2.3 jalv2 should show help if no file is present, or if and of "/help", "/h", "/?" are present 2.2.3a