by daniellarusso · 5y ago · 0 comments
So, dumb question, I had never considered that assembly would have ‘network access’, so are there other ‘higher-level’ systems accessible in assembly?
It just seemed like a different level of abstraction to me.
[edit]
I get it now. I reread the last section and looked over the assembly. ‘Mapping’ to syscalls on the OS.
If you have a higher level language, that simply has no features to talk to the network and no facilities to insert lower level code, make direct syscalls etc. somehow, then barring exploits, you really can't access the network card.
If you think about it, some parts of the operating system of a computer are actually written in assembly. How are the syscalls themselves implemented etc?
If you want to learn more about what can be done without all these abstractions, then the "toilet paper computer" is awesome if you ask me. We did this in high school comp sci class (with a simulator but the teacher started us off with an actual roll of toilet paper to explain the concept).
Raw machine code does have peripheral access via interrupts and/or the BIOS (which is kind of a "barebones" OS in firmware).
Usually there are several layers of abstraction on top of this (network card drivers, the TCP/IP stack, Unix sockets, etc.) so we don't have to deal with sending raw commands to the network card, but that's just convenience (and those are themselves machine code too).
The rest of your comment was instructive.
But in the end it all compiles to assembly so everything is potentially accessible there.