is there a way to somehow compact all this, considering existing hardware limitations?
as has been pointed out many times, use the flash memory

https://www.picbasic.co.uk/forum/sho...ithin-PBP-code