for one
your volup: subroutine
has a goto main in it , this will eat up the stack , pic18 subs can only nest 22 levels deep at the most
subroutines aren't re-entrant and must return to where they called from .

VOLUP: ' All variables are set as bytes
'
Z = $01 ' For future functions
DO
IF Leader > DL1 THEN
GOSUB VOLUP1 ' Go to increase volume
ELSE
pattern = 0
GOSUB Out_595
GOTO MAIN
ENDIF
PULSIN INFRA,0,Leader ' Check again for start pulse (autorepeat function) WORKS
LOOP
GOTO VOLUP ' Go back to main routine to check for another button press
'
'================================================= =================================================
'================================ VOLUME INCREASE AND BYTE CALCULATIONS =======================
'================================================= =================================================
'
VOLUP1: