r/eli5_programming • u/Yeahhh_bitch • Jun 20 '20
Question What is machine independent code?
Does it mean that any compiler can understand it?
4
Upvotes
r/eli5_programming • u/Yeahhh_bitch • Jun 20 '20
Does it mean that any compiler can understand it?
View all comments
Show parent comment
1
u/cuotos Jun 21 '20
I didn't really answer any of this in my other comment.
Your code talks to ram via the cpu, regardless of platform you just need to talk to the cpu and say "save this" or "grab this from memory location X".
You only need to know how to interact with the CPU, which is why it's important your code is built to talk to it.
As far as you are concerned, memory is just a list of addresses you store stuff. You don't care where it is. The cpu could be using a printer to save the data to A4 paper for all you knew, and then need a scanner to scan the paper and read it back in when you request it. It's not your problem.