Accidentally created ASM++ | Prime Reacts

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ม.ค. 2025

ความคิดเห็น • 170

  • @monad_tcp
    @monad_tcp ปีที่แล้ว +161

    2:29 C is like a circular saw hanging from the ceiling by a chain and you use it like nunchakus , C++ is like a portable angle grinder that you also use like nunchakus

    • @basedfacistman
      @basedfacistman ปีที่แล้ว

      and rust is like the tranny dildo

    • @fredflintstone8048
      @fredflintstone8048 ปีที่แล้ว +21

      I love meaningless analogies for different kinds of computer languages. They're often simply parroted by people who wouldn't know how well they hit the target or not.

    • @complexity5545
      @complexity5545 ปีที่แล้ว +2

      I like this analogy better. Its a little more accurate. LoL
      I mean which one is more dangerous: the "angle grinder."
      Some people don't know how much PPE you have to use with an angle grinder which depends on the blade and the stock.

    • @complexity5545
      @complexity5545 ปีที่แล้ว

      @@fredflintstone8048Some of us programmers have to man handle crazy tools for the engineering stuff. The saws are accurate. More people get injured by those darn angle grinders than the circular saws due to abuse; just like c++. They never see it coming. Some fools take the safety guards off angle grinders and go head first into incorrectly using it. Next thing you know, you're in a emergency room because the blade road up your chest and into your neck. Its just like the horror stories of c++.
      loL

  • @jbvalle
    @jbvalle ปีที่แล้ว +24

    As an embedded systems engineer I mainly work with C. We mainly use assembly for tasks where we want to achieve run time optimizations of like 3-4% or a bit more. We also use assembly for tasks where our uC has some new not yet fully supported peripherals used for encryption or any kind of processing enhancements where assembly could give us improved performance. For these purposes assembly is really great, I think people just misunderstand the purpose of C and Assembly, because systems especially near to the hardware where you need this kind of control these languages both work great

  • @stends113
    @stends113 ปีที่แล้ว +30

    So he reinvented *Macro* Assemblers? Of course i see some improvements, and new items, but the concept has been there since at least the 90'ies.

    • @Gregorius421
      @Gregorius421 ปีที่แล้ว +5

      Only TASM, MASM, HLA support function call and conditional syntax, as an extra to the macro assembler part.

  • @official_mosfet
    @official_mosfet 11 หลายเดือนก่อน +2

    This project can be no joke the future and i wouldn't care because it would be really cool

  • @longlostwraith5106
    @longlostwraith5106 ปีที่แล้ว +29

    So... a macro-assembler. A tool that existed since the 70s...

  • @ZehMatt
    @ZehMatt ปีที่แล้ว +15

    I wonder if people heard about MASM, it has structs, macros, variables, pretty much all you need.

    • @overbored1337
      @overbored1337 ปีที่แล้ว +1

      Yeah masm is great.
      Also thanks for Zydis 🙂

  • @c4ashley
    @c4ashley ปีที่แล้ว +42

    As a sometimes-Assembly programmer myself, this is beautiful. Being able to see control flow, instead of a flat wall of instructions? Yes please! But I'm usually assembling for PIC or the ancient H8/500 though, so it'd probably be a bit big task to make it work for my use case.

    • @U_Geek
      @U_Geek ปีที่แล้ว +5

      I just finished a semester of "Computer architecture" the lab part was DOS masm asm programming. It was fun but after my 5th jump island I wanted to quit the course.

    • @OneMilian
      @OneMilian 11 หลายเดือนก่อน +1

      I don't know if I'm actually using Assembly, but I love compiling mid language code to assembly and observe how a cpu can solve problems. It's very clever and I learn alot by myself

  • @nashiora
    @nashiora ปีที่แล้ว +10

    While bootstrapping should definitely be possible for most general purpose languages to be considered feature complete, and as much as I like bootstrapping compilers, it creates a ton of extra work that is not often a great idea as your first step.Build your compiler, then some tools and additional test programs that are easier to verify both by hand and with your tooling, give it a real tester on your dev experience or software you don't care as much about. Once that's done you still have to make sure your original bootstrap compiler exists and is maintained through the whole duration of building the new compiler in its own language, and you'll need to keep that bootstrap around for a while after too. It's just a lot of work to be your very first goal (even though I wish it were easier, I would LOVE for it to be my first goal)

  • @FQAN17
    @FQAN17 ปีที่แล้ว +15

    I worked in ASM back in the 80s. Guess I’m one of those old people.

    • @styleisaweapon
      @styleisaweapon ปีที่แล้ว +2

      do you recognize that this guy is reinventing turbo assemblers ideal mode, but isnt using macros for reasons?

  • @RadicalGaming1000
    @RadicalGaming1000 ปีที่แล้ว +4

    "A language is not a language until it can compile itself" - Prime

    • @Iuigi_t
      @Iuigi_t 11 หลายเดือนก่อน +1

      So JS, Java, and Python aren't a language, because they aren't compiled

  • @AllanSavolainen
    @AllanSavolainen ปีที่แล้ว +6

    Borland Turbo Pascal was nice as you could just begin assembler block and write nicely intended asm and then end the block and continue in Pascal.

  • @UnFiltered1776
    @UnFiltered1776 11 หลายเดือนก่อน +2

    That floating sawblade is optimal if you can build the Rube-Goldberg machinations to queue up and launch your data at it.

  • @marcogergele6183
    @marcogergele6183 3 หลายเดือนก่อน

    I can't help but immediately think of the channel “Tsoding Daily”, the two are certainly brothers in spirit.

  • @efemboygg
    @efemboygg ปีที่แล้ว +4

    i have no idea why i learned nasm, but i did it a while ago and was kinda surprised that i recognized all different nasm opperations liek jumps, moves, cmps, and other stuff that i forget. super cool to see an even easier to code asm language type thingy

  • @fredflintstone8048
    @fredflintstone8048 ปีที่แล้ว +2

    I write ASM just for fun, as a hobby, and on my old IBM-PCXT. I'm too lazy to dig up and load an old C IDE / compiler that will run on DOS.
    The last project I did was write an interface for the battery backed clock calendar card that I got with the machine. I had no inteface software for it.
    I looked up the chip, traced the circuit, and wrote in ASM to support it.
    It works great. I see writing in ASM as a hobby. It takes too long to create anything non trivial in a production environment.
    Yeah, I'm an old guy who learned ASM in school although I used to irritate the professor by telling him that writing in ASM was a waste of time and that developers needed to write in C or C++...
    I told him I thought it would be ok to create TSRs with it.. He agreed, he tried to write one and couldn't get it to work.. 😂😂

  • @hi117117
    @hi117117 ปีที่แล้ว +4

    "The moment you program with strings is the moment you know you messed up" then what is any web server that serves HTML with inline JavaScript?

  • @kuhluhOG
    @kuhluhOG ปีที่แล้ว

    6:36 GCC and clang (LLVM's C compiler) are written in C++.

  • @Hector-bj3ls
    @Hector-bj3ls 7 หลายเดือนก่อน

    C isn't like swinging wood at a floating saw.
    It's literally like wood work. You carefully measure, you spend years practicing, and as you gain experience you cut yourself less and less with the razor sharp tools.
    C++ is wood work with power tools. Some of the have plastic guards, but when you make a mistake you take your arms off with it.

  • @nordgaren2358
    @nordgaren2358 ปีที่แล้ว +1

    Well, generally I only write asm for two reasons:
    I need to hook a function with a custom calling convention, and the easiest way to do that is to just write a wrapper that saves the arguments, call my hook, return and check return, then restore everything and jump back to the original function. So this solution won't work for me, unfortunately.
    The other reason would be to write asm in another process to call a function in that process, or to setup a code hook in another process. This be helpful, actually, but usually I do this kind of binary chicanery through C#. Usually I have a string that has some formatters in it, so I can place the args and function address in, as the args will change with each call, and the function address will likely change each time the program is restarted (if it has aslr), so I need an easy way to format said args and addresses into a string to be assembled by (usually) keystone engine, and then injected and called. I also generally do this with some kind of UI, since working with a process externally, and C# also allows for easy to create UIs, imo. At least that is what I am used to.
    I do want to replace the above with Rust, somehow. Even if I have to make it ffi with a WPF UI.
    Idk. I, personally, like writing assembly and the documentation that is required to use it. I don't have to do it very often, though.

  • @JakobKenda
    @JakobKenda ปีที่แล้ว +1

    my programming professor said: "C is a mustang. Java is your mom."

    • @skadragon
      @skadragon 10 หลายเดือนก่อน

      You don't want any of your friends to see you riding her?

  • @patryk3772
    @patryk3772 ปีที่แล้ว +2

    It is already asm++. It's called HLA (High Level Assembly).

  • @-ciii-
    @-ciii- 11 หลายเดือนก่อน

    3:20 Well, unfortunately, due to System V ABI function call convention, we have to use registers to pass arguments to functions

  • @casperes0912
    @casperes0912 11 หลายเดือนก่อน +1

    When it comes to significant whitespace; It fits in with assembly. I'm generally against significant whitespace, but it fits with asm

  • @ristopaasivirta9770
    @ristopaasivirta9770 ปีที่แล้ว +15

    I have been thinking of making a simplified version of C.
    C--

    • @foty7
      @foty7 ปีที่แล้ว +8

      You've actually been beaten to the punch there!

    • @knogger7756
      @knogger7756 ปีที่แล้ว +9

      Sadly, C-- already exists en.wikipedia.org/wiki/C--

  • @ProfessorRainman
    @ProfessorRainman 11 หลายเดือนก่อน

    Just subbed to the dude and he went from 11 subs (Prime being his 11th) and now he has 1.44k!

  • @thommccarthy1139
    @thommccarthy1139 ปีที่แล้ว

    Is that Bird in the background? So good.

  • @dooZyz
    @dooZyz ปีที่แล้ว +1

    To be fair, this is just a DSL that has ASM like features.

  • @TheKennyWorld
    @TheKennyWorld 11 หลายเดือนก่อน

    I don't put spaces only for *if*, idk why I am just used to it

  • @MateuszAdamowski-k8b
    @MateuszAdamowski-k8b ปีที่แล้ว +4

    1:15 "use strict";

  • @JLarky
    @JLarky ปีที่แล้ว

    5:59 confused CPython noises

  • @retropaganda8442
    @retropaganda8442 11 หลายเดือนก่อน

    Doesn't GCC already have a nice embedded assembly where you don't have to choose which register to use?

  • @winnie8614
    @winnie8614 11 หลายเดือนก่อน

    I saw code that had space between function name and parenthesis

  • @AllanSavolainen
    @AllanSavolainen ปีที่แล้ว

    Before watching this video I'll mention my old favorite, Sphinx C--. It was basicly assembly with some handy C features like loops and structs etc but most of the code was written as assembly.

  • @hirisu
    @hirisu 11 หลายเดือนก่อน

    "My greatest programming pet peeve is when fors and ifs look like functions"
    liked subscribed fuck that nonsense

  • @danielgrenehed2904
    @danielgrenehed2904 ปีที่แล้ว

    wow, how have I missed the fact that I treat functions and for/if differently with the space before the parethesis? And I do agree with prime, but I had not even recognized that I write code that way

  • @remrevo3944
    @remrevo3944 ปีที่แล้ว +6

    The thing is around 90% of that can be done by switching from nasm to fasm (which is implemented in itself) and implementing a few things in its awesome macro system.
    Still cool project.

    • @infastin3795
      @infastin3795 ปีที่แล้ว +1

      uasm pretty much supports everything shown in the video out of the box

    • @ivanjermakov
      @ivanjermakov ปีที่แล้ว +2

      Fasm was my first thought when I saw the title, such a cool project.

    • @remrevo3944
      @remrevo3944 ปีที่แล้ว +1

      @@ivanjermakov I mostly know fasm from Tsoding, but his streams kind of motivated doing some things in assembly myself and it is definitely a good learning experience.
      Though sometimes I wish it had builtin support for dwarf-debug data.
      But I guess I will have to build something for that at some point.

  • @CEOofGameDev
    @CEOofGameDev ปีที่แล้ว

    4:57
    BASED

  • @alexaustin6961
    @alexaustin6961 8 หลายเดือนก่อน

    DUDE that stuff about the parentheses around the if statements is so true. I get upset returning to C++ from Rust simply because of that

  • @winnie8614
    @winnie8614 11 หลายเดือนก่อน

    It needs register deallocation/relocation
    after making a call it would mess up current function's arguments

  •  ปีที่แล้ว +10

    It’s dangerously close to python syntax… feels sexy

  • @thingsiplay
    @thingsiplay ปีที่แล้ว

    1:23 You argument would be true for any other language, but Assembler is actually just bunch of strings. What would be the difference, to have Assembler language embedded into C and not wrapped up in strings? The outcome what the Assembler compiler gets is exactly the same.

  • @Jplaysterraria
    @Jplaysterraria ปีที่แล้ว +8

    From the perspective of someone who had to grade students asm code in University, I really hate renaming registers. Most x86_64 asm instructions have side effects on other registers and you can easily modify the wrong register when calling an instruction. Having to keep track of both the name and the underlying register is a pain I don't want to go through...

    • @marcs9451
      @marcs9451 ปีที่แล้ว +1

      actual x86 skill issue

  • @3_14pie
    @3_14pie ปีที่แล้ว +2

    Every language is just ml syntactic sugar

  • @BryonLape
    @BryonLape 11 หลายเดือนก่อน +1

    Assembler is too high level. Write the program on paper, convert the instructions and operators to hex, then enter them by hand into memory.

  • @musicalducky6623
    @musicalducky6623 ปีที่แล้ว +1

    Immediate like for not having parenthesis around if statements

  • @Fudmottin
    @Fudmottin ปีที่แล้ว

    So what are your opinions on MIX?

  • @seasong7655
    @seasong7655 ปีที่แล้ว +1

    5:00 He can't handle the python zen 😅😅

  • @actually_it_is_rocket_science
    @actually_it_is_rocket_science ปีที่แล้ว

    As an embedded aircraft software engineer __asm__ hits home. Static and dynamic code analysis tools hate it so much.

  • @paulzupan3732
    @paulzupan3732 11 หลายเดือนก่อน

    What exactly is wrong with significant whitespace

  • @tutoraqw
    @tutoraqw 11 หลายเดือนก่อน

    The guy in the video was listening brazillian bossa nova "The Girl From Ipanema". (BR here)

  • @josegabrielgruber
    @josegabrielgruber ปีที่แล้ว +1

    Holly molly, you've summoned Deitel Deitel.
    I agree with Prime, it's a very cool project, I'm really looking forward towards hearing more about it. But, please Code Nybble, be more civilized

  • @Vlfkfnejisjejrjtjrie
    @Vlfkfnejisjejrjtjrie ปีที่แล้ว

    Baby hand on that thumbnail. Baby hand Prime

  • @bloody_albatross
    @bloody_albatross ปีที่แล้ว

    I don't know if that was a fever dream or real, but I think to remember there was some sort of win32 assembler that directly worked on the exe files, 20 years ago or so Like the project file WAS the release exe file. It had some syntax for defining and calling functions, but otherwise was assembly. If it wasn't a dream, that is. I think there was some emulator written in it. For NES or an even older system.

  • @skeleton_craftGaming
    @skeleton_craftGaming 11 หลายเดือนก่อน

    In assembly, you can choose your ABI on a whim
    I think that the lack of () mskes python really hard to read...

  • @someman7
    @someman7 11 หลายเดือนก่อน

    Why the significant whitespace hate? Why require a whole line for the end token? Especially because you're going to indent anyway.

  • @Karol-g9d
    @Karol-g9d ปีที่แล้ว +1

    binary code is compiled in assembler

    • @JonathanTheZombie
      @JonathanTheZombie ปีที่แล้ว +2

      Assemblers turn assembly into machine code. Compilation happens well before this.

    • @Karol-g9d
      @Karol-g9d ปีที่แล้ว

      Oups @@JonathanTheZombie

  • @OffroadTreks
    @OffroadTreks ปีที่แล้ว +4

    This reminds me, the original Roller Coaster Tycoon was written in Microsoft Macro Assembler by one dude.

  • @fragajjia
    @fragajjia ปีที่แล้ว

    What's the hoodie he's wearing here? I like the lining of the hood :x

  • @TECHN01200
    @TECHN01200 ปีที่แล้ว +1

    With C, you should just compile and assemble a separate *.o file from assembly and link to that instead of using strings.

    • @Joorin4711
      @Joorin4711 ปีที่แล้ว +4

      It's called "inline assembly" for a reason. It lets you inject that special sauce when you need it without having to call a function written in assembly.

  • @Sommyie
    @Sommyie ปีที่แล้ว

    I love ruby because you can use, or not use, {} and (). It's pure chaos

  • @GottZ
    @GottZ ปีที่แล้ว +1

    PFF.. programming via strings.. just get ye little handbook of intel 8086 machine code and type down all dem opcodes by hand into a byte array. (not kidding, I've done this at a time where I did not know c had __asm__)

  • @ivanmaglica264
    @ivanmaglica264 11 หลายเดือนก่อน

    Agreed, parenthesis around if statement condition is just visual and cognitive noise. They serve no real purpose and could easily be omitted. Parenthesis surrounding sub-statements to evaluate them together are still necessary.

  • @skeleton_craftGaming
    @skeleton_craftGaming 11 หลายเดือนก่อน

    1:35 That's literally the same code...

  • @flow1194
    @flow1194 ปีที่แล้ว

    he talking about 2 vs 4 spaces. my perrsonal discussion is 8 vs 16 and i have a shortcut for switching between them

  • @TheBadFred
    @TheBadFred 7 หลายเดือนก่อน

    In the old days we had only fast assembly and slow basic.

  • @endredomokos1770
    @endredomokos1770 ปีที่แล้ว

    So you exploded this channel!

  • @retropaganda8442
    @retropaganda8442 11 หลายเดือนก่อน

    Indentation with tabs is freedom for the reader, as you can choose how many columns a tab renders to, visually.
    Screw spaces. Screw mixed tabs and spaces, this is pure devil.

  • @MrDejvidkit
    @MrDejvidkit ปีที่แล้ว

    Whitespace's significance is cool.

  • @ilionsd
    @ilionsd ปีที่แล้ว +2

    Imagine JS compiler/interpreter written in JS

    • @mumk
      @mumk ปีที่แล้ว +2

      Imagine C compiler written in JS

  • @Gregorius421
    @Gregorius421 ปีที่แล้ว

    So ASM++ ... then where's the inheritance?? 😀 Nice project though, nice syntax.
    In any case there's High Level Assembler (HLA) and TASM, MASM which have these features (function call and conditions), all with different syntax.

  • @megaing1322
    @megaing1322 ปีที่แล้ว

    I love how you liked how clean the first assembly looked and then suddenly started disliking it when he realized that it uses indentation... Almost as if indentation makes for easily readable code and people who dislike it don't have rational reasons for it xD.

    • @eveleynce
      @eveleynce ปีที่แล้ว

      it's not the existence of indentation, it's enforcing the SIZE of the indentation that sucks.

    • @megaing1322
      @megaing1322 ปีที่แล้ว

      @@eveleynce Hm? What language does that? And that isn't what he complained about.

  • @thegreenxeno9430
    @thegreenxeno9430 ปีที่แล้ว

    Construct++ when?

  • @monad_tcp
    @monad_tcp ปีที่แล้ว +2

    15:08 therefor Javascript is not a real programming language because V8 is written in C++. But Python is because there's a python interpreter written in python.

    • @JiggyJones0
      @JiggyJones0 ปีที่แล้ว +1

      There are also JS interpreters written in JS.

  • @martinvuyk5326
    @martinvuyk5326 11 หลายเดือนก่อน

    Ehm, even Rust compiles to LLVM IR, which means... it still uses C++ (gcc uses C). Most languages nowadays use a compiler backend to lower to ASM. What this guy did is more or less a framework or bunch of utils to sugar coat "standard" Assembly (RISC instructions that basically any CPU architecture supports), you still would be able to use custom ASM commands for each architecture.

  • @arnaud_b42
    @arnaud_b42 ปีที่แล้ว

    Tried coding asm functions for a small 42school project... after several unsuccessful attempts to end my own life, I came to the following conclusion: When compiling C or C++ to an executable (with the appropriate flags you can get the asm code into a separate file) you can see that the compiler actually makes cleaner and more optimised code than you can possibly write yourself. Just code it in asm and also C/C++ and benchmark your asm against the compiler asm... Coding asm yourself save can save you 0.000001s in 0.000001% of the cases🤣

  • @m4rt_
    @m4rt_ ปีที่แล้ว

    I hate it when people don't write "Hello, World!" with the correct capitalization, with a missing comma, or even a missing exclamation mark.

  • @Endelin
    @Endelin ปีที่แล้ว

    Haskell has significant whitespace too. 😔

  • @styleisaweapon
    @styleisaweapon ปีที่แล้ว +4

    Assembly 2 was invented decades ago...a little language called TERSE and you wont believe how nice it was

  • @NexusGamingRadical
    @NexusGamingRadical ปีที่แล้ว

    @1:30. Thats SQL tho

  • @pdougall1
    @pdougall1 ปีที่แล้ว

    Just need a NASM LSP dog, good to go 😎

  • @GRHmedia
    @GRHmedia ปีที่แล้ว

    90% of programming languages use another compiler to compile them most use C or C++. python, java, js, lisp, lua, ... Rust was originally Ocaml which was originally written in C. At least Rust can compile itself now though.

    • @eveleynce
      @eveleynce ปีที่แล้ว

      lua actually does have a lua compiler, but since lua is *by definition* interoperable and embeddable in C, it makes sense to just compile it with C too, helps with the compatibility

  • @KvapuJanjalia
    @KvapuJanjalia ปีที่แล้ว

    Reminds me of MASM (Macro Assembler).

  • @soniablanche5672
    @soniablanche5672 ปีที่แล้ว

    "When you program with string"
    oh so like SQL ?

  • @georgerogers1166
    @georgerogers1166 ปีที่แล้ว

    Nice Macro assembler

  • @RohithCIS
    @RohithCIS ปีที่แล้ว

    So... what Assembly is to C, is what C is to Python? With the string meta programming and all?

  • @SimGunther
    @SimGunther ปีที่แล้ว +1

    3:57 Wait until he finds out that this is literally block parameters, which is used in Swift's SIL 🤯
    Also in 10:14, term rewrite systems usually are layered from the most fundamental blocks like functions & modules all the way down to the tiniest of statements.

  • @MrZombastic
    @MrZombastic 11 หลายเดือนก่อน

    u mean jdasml?
    toms a genius

  • @alexkozliayev9902
    @alexkozliayev9902 7 หลายเดือนก่อน

    That guy just invented C

  • @mohammedalmahdiasad6832
    @mohammedalmahdiasad6832 11 หลายเดือนก่อน

    it will be useful if it is the other way around and used in reverse engineering ide

  • @VivBrodock
    @VivBrodock 10 หลายเดือนก่อน

    is the meme going to be that he just recreates an already existing language?

  • @TheOneTrueMaNicXs
    @TheOneTrueMaNicXs 11 หลายเดือนก่อน

    Does nobody remember high level assembly?

  • @Sommyie
    @Sommyie ปีที่แล้ว

    I work in DevOps and was shown a project at work that's using.... React.... And.... Node.... And i almost laughed. Ugh, i have to automate the damn builds.

  • @FrederikSchumacher
    @FrederikSchumacher 11 หลายเดือนก่อน

    People that feel unable to work without brace or block syntax are like "I NEED these little JAILS, they give structure and containment. Without that containment, how would I know what freedom is?". People that can deal with significant whitespace are like "Just drive to the left of the road, as long as we're all in agreement about the same side it'll work out". Go is like "Hold my beer! Here, by constitution, you have liberties, HOWEVER if I arbitrarily decide you violate one of these liberties in a way that doesn't matter except for taste, I'll put you down".

    • @FrederikSchumacher
      @FrederikSchumacher 11 หลายเดือนก่อน

      And Pascal is like 🤪, good riddance!

  • @mierenmans
    @mierenmans 11 หลายเดือนก่อน

    this assembly language feels a lot like webassembly text but made for native cpu's lol

  • @medilies
    @medilies ปีที่แล้ว

    Why is download disabled

  • @electrostatic1
    @electrostatic1 ปีที่แล้ว

    ASM-DSL

  • @stzi7691
    @stzi7691 ปีที่แล้ว

    Wait till he finds out how easy it is to implement a FORTH compiler. Might be an Ocaml distraction again 🙂.

  • @RandomGeometryDashStuff
    @RandomGeometryDashStuff 11 หลายเดือนก่อน

    01:13 rip tcl programmers

  • @cheebadigga4092
    @cheebadigga4092 ปีที่แล้ว

    everybody knows NASM is written in ObjC

  •  11 หลายเดือนก่อน

    6:45 by this logic js is not a real language...?