PHP[PHP], 84 79 7084 79 70 63+1 bytes
<?for(;$i=fgetc(STDIN);$c+=$i==';';$c=$argn[$i++];$a+=$c==";")if($i=='#'&&print$c^A^R||$a=~-print chr($c%127)$a%127)$c=0;;
Reads from stdin.
Try it online!
From 84 to 79. I replaced the charcodes with the strings to remove unnecessary ord function. Replaced nested bracesRun as pipe with conditional &&-nR.
From 79 to 71. I removed the initialization of $c. This generates a PHP notice which can be suppressed via the ini (you can also just execute php -d display_error=0. Also switched to short tags. See Code Golf PHP Notices.Try it online!