How Arduino UNO differentiate between program/flash and serial terminal data
Unlike out kids it does what it is told, not what we thought we told it to do.  Different instructions do different things. Serial.print(&quot;Hi&quot;); is stored in RAM will print from Ram, however if you Serial.print(F(&quot;Hi&quot;); it will print from flash. The &quot;F&quot; macro tells it where to print from. The Serial.print(&quot;Hi&quot;); is stored in flash but moved to RAM and stored there while your program is started and is running whether you print it or not. The &quot;F&quot; macro keeps it in flash not using RAM. Everything that happens when it starts either in your code or the boot loader is code that has been programed and stored in the flash. The Boot loader decodes the code data stream when uploading and stores it in the specified location. It does not know what it is it just reads it and stores it. I do not know what it is called here but there use to be a program module called &quot;CSTART&quot; that upon reset got control; initialized all the memory and set up the variables before turning control over to the user program. Arduino does the same thing, data has to be placed in the right place before starting.