Not sure I get your intention but I think this may help from the article
You may wonder how the Arduino knows when serial communication is trying to send it a sketch to load, or just communicating through the serial monitor with the sketch that is already running on the Arduino? The answer is simple. The bootloader program that accepts sketches and reprograms the Arduino only runs in the first couple of seconds after the Arduino's processor is reset. If the bootloader program running on the Arduino does not receive a certain sequence of characters indicating a sketch is attempting to upload, it quits running and starts the sketch that you loaded previously.
But why don't you use SoftwareSerial library or better still AltSoftSerial?