24

In Computer Science when do you learn the fundamentals of high level languages and the methodologies a compiler uses to create assembly instructions? What is the primary book used for this course? Like, if you're using Ada or Ghidra and trying to piece together what is happening in binary execution, I want to know structures to look for on this basic level.

I'm asking about the simple stuff like what you find in Arduino sketches with variables, type declarations, branching, looping, booleans, flags, interrupts etc. Also how these might differ across architectures like CISC/RISC, Harvard/von Neumann, and various platform specifics like unique instruction set architecture implementations.

I have several microcontrollers with Flash Forth running the threaded interpreter. I never learned to branch and loop in FF like I can in Bash, Arduino, or Python. I hope exploring the post topic will help me fill in the gap in my understanding using the good ol' hacker's chainsaw. If any of you can read between the lines of this inquiry and make inference that might be helpful please show me the shortcuts. I am a deeply intuitive learner that needs to build from a foundation of application above memorization or theory. TIA

you are viewing a single comment's thread
view the rest of the comments
[-] marcos@lemmy.world 2 points 2 years ago

"Deeper understanding of how these compilers are written" you can get in a compiler book. I've found a copy of the dragon book here: https://iitd-plos.github.io/col729/refs/ALSUdragonbook.pdf

Currently, I'd recommend you read a monadic parser tutorial and jump over the practical material about compiler parsing (the theory is still very useful). There re more modern books, more focused on semantics, but I don't remember of any to recommend you.

"Deeper understanding about compilers across different architectures" looks like an assembly course to me. If you want to compare RISC and CISC, you'll probably want x86 assembly and something like MIPS. (Notice that you will probably never use any of those on practice. But any assembly you would use on practice is too complicated to start with.)

But that "yet share common compiled structures" part, I have no idea at all. I'm not sure anybody formally studies this. You may want to read about the LLVM intermediate representation and how to create a backend for it.

[-] HaywardT@lemmy.sdf.org 2 points 2 years ago

The LLVM is probably the most appropriate answer to my question. Books about the development of it would be outstanding.

this post was submitted on 14 Mar 2024
24 points (96.2% liked)

Programming

28322 readers
758 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS