You are here

Frequently Asked Questions


A common way to address the individual bytes of a word (or larger)
variable is to split it as an array of bytes.

This can be done as follows

var word w
var byte wb[2] at w

You can then refer the two bytes of the word w as wb[0] and wb[1]

To define bits within a byte, you may do the following:
var byte my_byte
var bit my_bit at my_byte : 0
var bit*3 my_bits at my_byte : 1

If the individual bytes of an array need a specific name alias keyword can be used as given below.

var word val
var byte val_array[2] at val
var byte hibyte at val + 0
var byte lowbyte at val + 1

Here is another example:

var byte*10 val
var byte val_array[10] at val
var byte byte5 at val + 5
var word byte7_8 at val + 7
var volatile bit bit0 at byte5 : 0
var volatile bit*3 bits at byte5 : 1

Don't define a bit*3 variable where it will pass the end of a byte. This will not work:
var bit*3 bits3 at byte5 : 7

This website has a very good introduction PICs and JAL available at
The original author, Wouter too has a Starting With PIC guide which is a bit dated.

JAL is TLA (Three Letter Acronym) which stands for Just Another Language

JAL is a high-level language for a PIC microcontroller. It lets you write and program PIC micros easily. It is open source and free. You have a free compiler, IDE , simulator  and fullfledged libraries available for JAL. The curent version of JAL supports the PIC 10,12,16 and 18F series PICS.

The difference of JAL and assembly is given below.


if count % 10 == 0 then

Samething in assembly

 ;; 093 : if count % 10 == 0 then

movf H'2C',w
movwf H'36'
movlw H'0A'
movwf H'37'
bcf H'0A',4
call _708__vector
movf H'38',w
movf H'35',w
sublw H'00'
bcf H'0A',3
bcf H'0A',4
goto if_16915_by
if_16915_th: ; 007B

The orignal jal (Also named Jal 0.4x) was built by Wouter van Ooijen. See his jal website at

Jalv2 is a complete re-rewrite of the orignal jal. It can be found at