I don't have time to write code for people, but essentially they are two separate considerations - commands and data.
The normal operating of the device will be data - you send an 'A' and it prints an 'A', you send a 't' it prints a 't' - pretty simple.
Then there are ASCII control data, you send the ASCII symbol for CLR and it clears the screen, you send CR and it scrolls the display and places the cursor on the bottom line. Any of these control codes needs to branch to separate code sections to complete.
Then there is actual LCD commands (assuming you want to go to this level?), you would need to send a specific unused control code, and this would switch the PIC to expect command codes rather than data, and the PIC would switch the LCD to command mode and pass the following data to it. Another control code (or the same one again) could be used to switch the PIC back to normal operation.