JALv2 Homepage

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

More JAL bits and libraries can be found:

jallib -- libraries for everything
Rob Hamerling's Homepage for all Microchip device files
Single Multiple with Constant Calculator
Original JAL
Stef's PIC Pages
JAL Books
Yahoo Group
Release history:
2.4q2 -- 23 January 2014
  • fixed floating point constant 0
  • incorrect movlp_nop usage
  • fixed branching optimizer on conditional branch
  • fixed bug in pic_multiply_create_fn16
2.4q -- 13 November 2013
  • don't allow bit offset placement to non-bit variables (var BYTE x at y:2)
  • allow `VAR xx AT rec['.'member]['['subscript']']...'
  • allow non-bit variables to declare byte offets (VAR BYTE x AT y + 2)
  • fixed and returned an optimization that reduces code size when an empty if block is found: IF cond THEN END IF (thanks Albert!)
  • minor optimization. In this sequence: `movwf val; movf val,w' remove the second as redundant. This happens with the `pass result in w' and `return result in w' code.
  • an inline assembly move to a constant location did not set the data bits correctly (movwf 0x90).
  • assign from constant was completely munged in most cases
  • fixed documentation errors (thanks Rob!)
  • expanded documentation for records
  • minor code generation optimization in equality operators
  • beginning of floating point support
  • fixed an error that caused false positives with branch errors
  • clear out last multiply/divide values when branching
  • always inline some multiplies on the 16 bit cores
  • fixed a problem in binary AND and binary OR when val1 is shared and val2 is not *or* dst is in a different bank than val2
  • parsed assignment within a procedure definition (default parameter) but default parameters are not allowed. (Rob)
  • re-ordered some optimizations for tigher code (Michael)
  • detect if a function is declared but not defined
  • when assigning from a pointer of smaller type, the calle to extend the sign was missing (Michael)
  • variables manually placed in shared regions must have the SHARED flag set (this is internal to the compiler. A variable allocated in a shared region will now act correctly. Formerly, the shared attribute was missing in this case.)
  • fixed variable allocator
  • fixed SHARED testing in the event that part, but not all of a variable is shared
  • cleaned up new warning from gcc 4.7.2
  • fixed string constant initialization when the string contains an embedded '\0'
  • 16 bit inline multiply did not setup indirection correctly
  • added `asm reset'
  • for _usec_delay, if the PIC temporary varaiable is in shared space, emit NOP instead of the datahi/datalo instructions.
  • fixed data skip errors.
  • upcasting a constant value causes incorrect code to be generated
  • fixed MULF (thanks again Michael).
  • fixed a bug in the skip conditional optimizer (thanks again Michael)
  • cmd_analyze() didn't handle assembly properly
  • inline assembly, using the `bank' prefix doesn't work correctly on the 14 bit hybrids
  • fixed stack depth reporting
  • fixed w optimization removals
2.4p -- 3 Sep 2011
  • added -fastmath which does:
    • create different multiply functions for different sizes. Normally one multiply function is created representing the largest operands used
    • if a multiply is only used once, inline it
  • as a side effect of above, multiplication with differently sized operands has been optimized to only loop enough for the smallest operand
  • use native MULWF instruction on 16 bit cores
  • on 16 bit cores, multiplies <= WORD * WORD are always done inline
  • fixed bug in the branchbit optimizer
  • added, `SHARED,' to the variable definition part of the documentation, and explicitly stated that variable allocations are never done from the SHARED regions.
  • a direct inline assembly `goto' or `call' was missed by the optimizer
  • broke 16 bit addition/subtraction of different sized variables
  • uncovered latent bug resulting in incorrect multiplication creation
  • fixed 16 bit emulator
  • a bug where a variable, only initialized by assignment to the return value of a function, could be incorrectly optimized away
  • passing a constant array element into an inline function fails
  • an extra division was required when '/' and '%' are used next to each other (patch sent by Geoffrey Hausheer)
  • -fastmath, where the destination is the same as one of the operands failed (Geoffrey Hausheer)
  • fix a missing multiply due to confusion between pic_multiply_inline16bit and pic_multiply_inline (Geoffrey Hausheer)
  • on 16 bit cores, inline multiplies of 1 x 3 (Geoffrey Hausheer)
  • long-chain if/elsif/... clauses in which one entry is TRUE does not correctly skip further entries leading to incorrect warnings (Rob)
  • fixed 14 bit hybrid branch optimization (Per)
  • allow string constants to be passed directly to procedures: eg: string_out("hello")
  • fixed re-entrancy bug
  • On 16 bit systems ISR entry assumes the saved variables exist in bank 0 which is rarely if ever the case
  • implemented `pragma frame' which forces all variables in a procedure to be placed together in a single block
  • the source line numbers in the ASM file were off by one. (Arcady)
  • lfsr should use the value instead of the base directly
  • loading an array into a pointer should use the value instead of using the variable directly
  • when an array is passed to a function, it should be marked `assigned' because the function might assign an element
  • it was possible to define a variable as a flexible array. This should only be allowed as parameters.
Lastest release files (JALv2 2.4q):
Binaries (win32 and linux with chipdef files)
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.
Binaries (win32 and linux with chipdef files)


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!