[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: 1746914132566879.png (606 KB, 732x549)
606 KB
606 KB PNG
So what actually happens inside the computer when you compile and execute a program
>>
File: 1744730057449789.png (925 KB, 777x599)
925 KB
925 KB PNG
I COME FROM THE NET
>>
File: file.png (739 KB, 908x990)
739 KB
739 KB PNG
>>107749715
>>
>>107749715
your executable is loaded into memory, the instruction pointer is pointed to wherever the EXE file header directs it, and then execution of your program starts
>>
>>107749715
Executing a program tells the computer which transitors to switch in which order so that some data ends up in the correct place in the RAM or registers of the cpu. Different CPU architectures use different circuits, so the instructions have to change which is why you need to recompile a program if you want to use it on a different CPU architecture.
Think of it like this: you have machine and someone tells you to flick the switch, turn a knob and then press the start button. Then you get another machine and want to use the same instructions, but then you realize that this machine doesn't even have a knob so you have to ask for new instructions.
>>
File: power.webm (3.84 MB, 640x480)
3.84 MB
3.84 MB WEBM
the transistors flip from off to on and it looks something like this
>>
File: 1681679201660433.jpg (84 KB, 640x640)
84 KB
84 KB JPG
>>
>>107751631
But wounl
But wouldn't t ha
But wouldn't that result in a lot of BUGS?!? Hahaha ho ho ho
>>
File: qqc7wisj4f.png (1.2 MB, 2300x1276)
1.2 MB
1.2 MB PNG
>>107749715
something something jews something something adolf hitler
>>
>>107749715
electrons move back and forth
how detailed do you want?
>>
>>107749715
Electrons race around the circuitry in logic-based patterns encoded by the symbols that represent the program that was compiled and executed.
>>
>>107749715
Learn assembly and find out
>>
the elves carry the program sir
>>
>>107749715
For every file loaded, the OS running in the CPU will tell the SSD and DMA to work in tandem and copy certain specific sectors from the disk to the RAM, and they will eventually do it.
So the OS will do the above to load the compiler and the compiler will do it to every source file.
Then it will scan the source files line by line creating several tables based on it that will later be used to construct a program (that is basically a list of instructions). the compiler will also do tricks such as copy pasting the content of functions to places calling these functions to make the program run faster, and unroll loops.
This will normally generate a file per source file, and finally, the compiler (or a dedicated linker program) will get all the files and connect all the functions and such into a single cohesive package that you call a program.
Then when you tell the OS to load the program, it will do the process above but for the file of the program.
>>
File: third_build_2.jpg (805 KB, 2048x1607)
805 KB
805 KB JPG
>>107749715
>>
File: Arduino_Uno_-_R3.jpg (17 KB, 250x250)
17 KB
17 KB JPG
>>107752999
>shrinks that shit
>>
>>107752999
A little messy with the opcode jumpers but still better than the original. GG anon. Now can you please fix the dogpile that is reprogramming the firmware? TIA.
>>
>>107749715
>So what actually happens inside the computer when you compile and execute a program
The "compile" part is outside the scope of this thread. But the execute part is accessible to any White man of modest diligence.

https://archive.org/details/jclarkscottbuthowdoitknowthebasicprinciplesofcomputersforeveryonejohnc.scott2009

https://www.youtube.com/playlist?list=PLYE0XunAbwfDvfabOlNWLViRcMI54M6CR
>>
>>107749715
it's a series of tubes
>>
>>107749715
You commune with the demonic realm.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.