Hi Richard
I'll need to do a lot more reading to know what most of your code is doing.
I sort of understand some of it but there is a lot I don't.
You say it is for a 64 Led cube though there only appears to be 12 leds in the lookup?
I really need to upgrade to PBP3 compiler Gold as I can't run your code with my set up.
On learning about the Decimal and Binary I tried to run some code for 20 Leds but some didn't light, namely the Leds whose decimal was 16.
Is there something else that needs to be changed in the code.

Code:
'****************************************************************
'*  Name    : CharliePlex                                     *
'*  Author  : Jim                   *
'*  Notice  : Copyright (c) 2016 [select VIEW...EDITOR OPTIONS] *
'*          : All Rights Reserved                               *
'*  Date    : 21/06/2016                                        *
'*  Version : 1.0                                               *
'*  Notes   : For PIC 16F84A                                                 *
'****************************************************************
#CONFIG
    __CONFIG _XT_OSC & _CP_OFF
#ENDCONFIG
'DEFINES:
     define OSC 10
     led var byte
     tmp var byte
     mainloop:
        
        for led=0 to 19
        lookup led,[12,12,9,9,3,3,7,7,10,10,5,5,11,11,6,6,13,13,14,14],tmp
        TRISB = $f0|tmp
        lookup led,[2,1,4,2,8,4,16,8,4,1,8,2,16,4,8,1,16,2,16,1],tmp
        PORTB = tmp
        pause 400
        next
         
goto mainloop
16 would be PORTB.4(00010000) by my Bin/Dec table.

Regards
Jim