When I was very little and learning Pascal, I had only the foggiest notion of machine code and no idea about linkers and loaders whatsoever. I could, however, write a program in Pascal and then the compiler would magically turn it into an executable (EXE!) file. The only way I could conceive to write a compiler myself was this: To write a program that was really an interpreter, and then, to "compile" some source, I would concatenate the executable of my interpreter and the source to be "compiled." The interpreter would know, when run, to examine itself, seek to the point where its own executable code ended, and find the program it was suppose to interpret. Presto! A program to generate self-running exectables from source code! But it was not, of course, in any sense a compiler.

As far as I can tell, this is pretty much how the Matlab compiler works.

March 2020

S M T W T F S
1234567
891011121314
15 161718192021
22232425262728
293031    

Style Credit

Syndicate

RSS Atom
Page generated Aug. 11th, 2025 12:15 pm
Powered by Dreamwidth Studios

Expand Cut Tags

No cut tags

Most Popular Tags

Page Summary