Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. The Lounge
  3. Another Assembly Guide

Another Assembly Guide

Scheduled Pinned Locked Moved The Lounge
tutorialquestionlearning
22 Posts 7 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Lost User

    LOL! Yes, now what did I say that was so bad? Maybe defending assembly language? :laugh: Oh, I don't even know what to say, or if it is allowed. LOL So, I would like to button my position with this: A man-made compiler can't beat the one in my head. Or yours. And it never will.

    honey the codewitchH Offline
    honey the codewitchH Offline
    honey the codewitch
    wrote on last edited by
    #21

    Where we don't see eye to eye, regarding our respective positions is your notion that hardware should not be coded on in stuff other than assembly. Now maybe I misunderstood your position but that was my takeaway from your initial reply to me. I routinely interface directly with the hardware, in C++, on IoT devices where every byte of RAM and every CPU cycle counts, because I'm dealing with timing sensitive hardware, a real-time system, and very limited RAM and CPU. The only reason I can do it is because I learned to code in assembly. 30+ years later I find assembly hamstrings me when I have to use it. All of the sudden, my code instead of working on the entire ESP32 line will only work on the Tensilica Xtensa 6 without nearly doubling the amount of code I have to write to get it to also support the Risc-V variant of the ESP32. So I avoid it, even for development where I'm interfacing directly with hardware. And I can do so where every cycle counts. I've written an NES emulator that runs in 240mhz with 512kB of RAM. Mostly in C++

    To err is human. Fortune favors the monsters.

    1 Reply Last reply
    0
    • honey the codewitchH honey the codewitch

      Here's what I haven't been able to get someone with your position to do for me: Generate a string of optimized, non-SIMD instructions that I can't produce vicariously with C or C++ If you can do that I will reconsider my position. The reason we wouldn't have been having this conversation 20 years ago is C and C++ compilers were garbage. They are worlds apart than what we work with today. I used to lean toward your position. When compilers changed, so did I.

      To err is human. Fortune favors the monsters.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #22

      Be specific. What are "strings of non-SIMD instructions not produced vicariously with C or C++", and why not just ask the question you really want the answer to? I can probably tell you, and it will be the truth. I also have no idea what optimized means, other than I routinely re-work all code until it can't be beaten by any compiler -- size or speed. Heck, it's usually written that way the first time!!! To me, SSE (or MMX... another type of SIMD) is simply part of the package I use every day, and not some mysterious, far-off concept that "maybe" the compiler has intrinsic macros for. We can leave it here, agree we each have our good points (I believe we do), or you can explain your question better and I will accept and win your challenge, whatever it is. I just know the difference between ASM and all compiled languages, and the compiler I use to create is a gift from God, the same one we all have and decide whether or not to make good use of. You're not beating that with a man-made anything. One might even write a "Photoshop" in 1 MB using pure assembly! And it would take forever. :-D But, a team...

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups