16
Haxk20
16d

Do you know when you got into like a real low level programming ?
Not when you learn assembler because that takes ages to learn to the skill level where you can actually use it properly.
For me it is writing device tree files in Linux kernel. One typo and the mobile phone is literally dead.
Oh I accidentally typed one more 0 to the voltage in regulator. Yeah goodbye phone.
You have to be careful as fuck and read the shit six times before you flash it on the phone.
And oh God mainlining a phone. It surely is fun seeing the phone boot the same exact kernel version my PC uses. But dang it is hard.

Comments
  • 3
    Master of bleeding edge is back!
  • 2
    @-ANGRY-STUDENT- Who said i ever fucking left ?
  • 3
    Actually I did get into low level with assembly - I developed some stuff in Matlab and then ported it to a DSP in assembly for my final thesis.
  • 1
  • 1
    I also did assembly. Nice stuff. Makes much more sense to me than anything else tbh.
  • 2
    @NoMad Yeah it makes sense which is nice about it. But when you get into bootloader shit. Oh god your eyes will hurt so much that its crazy.
  • 2
    Yeah, I think when you can actually destroy the hardware you're at the right level... Then again, off by one in some nuclear reactor emergency shutdown code written in Visual Basic can be quite hazardous 🍿
  • 0
    @murrayd Well i dont have access to that kind of stuff and if i did i sure as hell would not production test my crap. Cause yeah simple bug and nuclear crap would go off. Yeahhhh nope
  • 4
    The general problem I see with assembly is that people tend to assume all instructions are equal, which leads to "har har I beat the C compiler, I use way fewer instructions", and then "crap why is my version slower than the C version?!" moments.

    It's "easy" to knock something out in it, but to do it in a properly optimised fashion (usually the whole point of using ASM) isn't so trivial.
  • 2
    @AlmondSauce I like to look at GCC's disassembly, and sometimes it's using quite clever tricks.

    Another point is, once you get the hang of assembly, you have a good idea what C code will compile to, and that helps having fast C code. C isn't just fast because it's C, it's also fast because of C programmers. If you code in C, you think half in assembly.
  • 1
  • 1
    I also developed some real low level stuff too. One of my projects I used plain javascript instead of react or angular. Can you believe that?
  • 1
    Any pointers on how to learn assembly for C noobie? Learning assembly always seem very dry and complicated to me. And that usually troubles me when I'm trying to solve ctf challenge or attempting buffer overflows.
  • 0
    @zerouplink Here is a good old void pointer:

    void *ptr;

    Haha JK, but x86 assembly is particularly ugly. Maybe you could buy some nice little Cortex-M eval board for 10, 20 bucks. The CPU is smallish, and the instruction set quite digestible. And it's an area where you'll still actually need assembly in practice from time to time.

    Here's a big and free tutorial that includes pretty much everything: https://mikrocontroller.net/article...
Add Comment