• @[email protected]
    link
    fedilink
    English
    69 months ago

    I was pretty into x86 asm in my teens. Nasm was my go to. Anyone else ever play with MenuetOS?

  • @[email protected]
    link
    fedilink
    English
    28
    edit-2
    9 months ago

    IMHO assembly isn’t hard. When you gain enough experience you start to see „visual patterns“ in your code. For example jumping over some lines often equals to a if/else statement or jumping back is often a loop etc. Then you are able to skim code without the necessity to read each line.

    The most difficult part is to keep track of the big picture because it is so verbose. Otherwise it’s a handful or two of instructions you use 90+% of the time.

    I needed it often in the past in the PLC world but it is dying out slowly. Nonetheless, when I encounter 30+ year old software I’m happy to be able to get along. And your experience transitions to other architectures like changing from one higher language to another.

    Nonetheless, if I’m able to choose, I’ll take Go. Please and thank you 😊

    • @[email protected]
      link
      fedilink
      English
      9
      edit-2
      9 months ago

      The most difficult part is to keep track of the big picture because it is so verbose. Otherwise it’s a handful or two of instructions you use 90+% of the time.

      It’s a long time since I wrote any assembly in anger, but I don’t remember this being an issue. Back then Id be writing 2D and 3D graphics demos. Reasonably complex things, but the challenge was always getting it fast enought to keep the frame rate up, not code structure.

      As you say, I think you just establish patterns to decompose the problem.

  • @[email protected]
    link
    fedilink
    399 months ago

    Look at mister fancy pants with and assembler.

    How about entering straight opcode, operand with only a hex keypad and two pairs of 7 segment LEDs. You can only see one set of numbers at a time. You had to write it out on paper to be able to keep track and count positions so you don’t use your spot.

    I had to do this as a project in school. Two 8088 units that we breadboarded to a UART that we used to drive a fiber optic link to communicate with each other with a basic protocol. All descrete components hand wired and coded.

    It made you tie all of skills together into a full system of hardware and software.

  • @[email protected]
    link
    fedilink
    129 months ago

    OS and embedded dev here. I use assembly all the time. I’ve even worked on firmware that was entirely in assembly of strict requirements that couldn’t be met in C.

    Also even machine code hides a lot about how the underlying machine works so if you really want to do computing from scratch you really do hate to invent the universe because there’s abstractions all the way up the hardware stack just like there is in software.

  • JoYo
    link
    fedilink
    English
    809 months ago

    I get the feeling that all of these assembly jokes are justifications to avoid learning assembly.

    You can still make syscalls in assembly. Assembly isnt magic. It isn’t starting from the creation of matter and energy, it’s just very specific code.

  • AFK BRB Chocolate
    link
    fedilink
    English
    89 months ago

    I had an assembly class in college. I didn’t love of at all. Got my first job after graduating and it was writing space shuttle engine control software, which was in assembly. I was kind of surprised at how fast it became natural after dealing with it full time. Still, it felt luxurious when we upgraded the controller and could do the software in C.

  • Cethin
    link
    fedilink
    English
    249 months ago

    Anyone who thinks OP asking about Assembly with this meme should play the game Turing Complete. It’s great. You have to design a computer all the way from the most basic logic gates (I think you only get a NAND gate to start), designing an ALU and CPU, creating your own machine language, and writing your own programs in the language you designed, and it’s all simulated the whole time. Machine language is pretty advanced as far as things go.

    • @[email protected]
      link
      fedilink
      89 months ago

      We got to do something simular in uni. We modeled the CPU in VHDL and had to set up our own language, then we were to program a game for it. One of the most fun and interesting courses we got to do!

    • @[email protected]
      link
      fedilink
      English
      139 months ago

      From your description this sounds more like a job in IBM’s R&D department than a game

  • @[email protected]
    link
    fedilink
    4
    edit-2
    9 months ago

    From my understanding, one of the actual use case of assembly is for cyber security engineers to dump assembly instructions from a compiled program, so they can check for any potential vulnerability. I’ve also seen assembly included in an embedded codebase (the overall project is in C), which I assume is for more optimized performance and deterministic behavior

  • @[email protected]
    link
    fedilink
    69 months ago

    I learned assembly for a few weeks when I first started a new job once (didn’t even have anything to do with my job), and I always felt like my brain was tired after trying to write in assembly. Just took so much more mental concentration than writing in c for example.

  • finley
    link
    fedilink
    English
    99 months ago

    I remember watching assembly demos in the early-mid 90s and thinking those guys were wizards

    • sagOP
      link
      fedilink
      29 months ago

      I have Dyslexia ¯_(ツ)_/¯ Sorry.

      • The Ramen Dutchman
        link
        fedilink
        5
        edit-2
        9 months ago

        You dropped this \

        Short explanation: Type ¯\\\_(ツ)\_/¯ to see ¯\_(ツ)_/¯.

        Long expanation: Lemmy supports formatting, like _italic_ becomes italic. To stop this from happening, you can put a \ before it like \_; the \ isn’t shown. This is why ¯\_(ツ)_/¯ becomes ¯_(ツ)_/¯. To show a \ you need an additional \ like so: \\, and to make sure _ is shown and not turned into italic, it too needs \. This is why ¯\\\_(ツ)\_/¯ becomes ¯\_(ツ)_/¯

        • @[email protected]
          link
          fedilink
          English
          2
          edit-2
          9 months ago

          Alternatively, you can just use the `` enclosure, used for single line code.
          That is a “grave accent” or a “backtick”, the key you will find on the left of the ‘1’ key and under the ‘Esc’ key on a standard (ISO, maybe) 104/105 key qwerty keyboard.

          ¯\_(ツ)_/¯

        • @[email protected]
          link
          fedilink
          English
          19 months ago

          I’m sorry, I have no idea what you’re talking about. Could you explain it in assembly?

          • The Ramen Dutchman
            link
            fedilink
            5
            edit-2
            9 months ago
            global _main
                extern  _GetStdHandle@4
                extern  _WriteFile@20
                extern  _ExitProcess@4
            
                section .text
            _main:
                ; DWORD  bytes;    
                mov     ebp, esp
                sub     esp, 4
            
                ; hStdOut = GetstdHandle( STD_OUTPUT_HANDLE)
                push    -11
                call    _GetStdHandle@4
                mov     ebx, eax    
            
                ; WriteFile( hstdOut, message, length(message), &bytes, 0);
                push    0
                lea     eax, [ebp-4]
                push    eax
                push    (message_end - message)
                push    message
                push    ebx
                call    _WriteFile@20
            
                ; ExitProcess(0)
                push    0
                call    _ExitProcess@4
            
                ; never here
                hlt
            message:
                db      '¯\\\_(ツ)\_/¯', 10
            message_end:
            
            • Lightscription
              link
              fedilink
              1
              edit-2
              9 months ago

              Do you want to show us what that looks like in assembly, ASCII from machine code? …ha, ha, ha, no!

              Depends on the device, I know. Such a pain without the higher level languages.

              What would it look like for ARM android touch screens? Just for one character…

              But if some characters go missing or are exchanged for others for no discernable reason, then might that be an exploit on a EC or assembly level?

        • @[email protected]
          link
          fedilink
          29 months ago

          The backslash is known as an escape character in this context, because it removes (escapes) the special meaning of the following character.

          It’s also used that way in most Unix shells.

  • TunaCowboy
    link
    fedilink
    7
    edit-2
    9 months ago

    Syscalls are sitting right there, and you can always just link libc…

  • Hanrahan
    link
    fedilink
    English
    79 months ago

    Not since the 1980s on a Commodore 64.

    SYS64738