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:

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.4h -- 15 Sept 2008
  • fixed all warnings with '-W -Wall'
  • added makefiles from Rob
  • added `pragma speed' and `pragma size'
  • fixed `movlb' generation
  • fixed HEX generation on 16 bit cores
  • allow TRIS 5 - 9 (formerly was 5 - 7)
  • introduced pragma nostack
  • return zero on success, system dependent non-zero on failure
  • minimize the amount of pic_state saved in an interrupt
  • changed to new makefile
2.4g -- 5 June 2008
  • using `AT cexpr' instead of `AT var' doesn't work with function parameters
2.4f -- (unreleased)
  • B00042 : Inline assembly using conditional operations might get optimized away
  • B00041 : inlining a function or procedure that takes a volatile parameter results in `invalid operation'

Lastest release files (JALv2 2.4h):
README.txt
archive/README.txt
Binaries (win32 and linux with chipdef files)
archive/jalv24h.zip
Sources
archive/jalv24hsrc.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 B00043 medium all Inline assembly -- procedures passed array elements don't work correctly.
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) open
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