• umbraroze@kbin.social
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Oh you fancy PC people and your fancy syscall instruction.

    I still don’t know why I could remember jsr $ab1e. I didn’t even write that much assembly.

    • pranaless@beehaw.org
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago
      use std::process::Command;
      
      fn main() {
          Command::new("sh")
              .arg("-c")
              .arg("echo Hello World!")
              .spawn()
              .unwrap();
      }
      

      Like this?

      • 30p87@feddit.de
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        No, more like

        use std::process::Command; fn main() { Command::new("sh").arg("-c").arg("echo Hello World!").spawn().unwrap(); }
        

        .
        Just a little bit shorter, as it seems /s

  • r00ty@kbin.life
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Or, you could just go the whole hog. Create your own simple CPU emulator, design a basic 8bitesque CPU, give it an output port that is the console, and load up some basic ASM to cycle through Hello World to the console port.