And surely the whole spectre issue could be lessened if we could be less reliant on CPUs having to guess what to keep in cache, which code paths are most likely, etc?
X86 assembly doesn’t have to be scary
11–20 of 129 posts
Re: X86 assembly doesn’t have to be scary
#12If your intention is to avoid scaring newbies off, I'm not sure if 16bit real mode, PC boot process, BIOS services and all that arcana that follows is the best place to begin.
Why not? If they're determined enough, they'll get it. I learned a lot back in the day by spending many hours with the book PC Intern and some other book on x86 Assembler. Granted, I had a little experience with assembler on a C=64, but, I learned _that_ in a similar way.
That's the exact opposite mindset of someone trying to "not scare newbies away."
Re: X86 assembly doesn’t have to be scary
#13Earlier quoted context omitted.
Why not? If they're determined enough, they'll get it. I learned a lot back in the day by spending many hours with the book PC Intern and some other book on x86 Assembler. Granted, I had a little experience with assembler on a C=64, but, I learned _that_ in a similar way.
> If they're determined enough, they'll get it. That's the exact opposite mindset of someone trying to "not scare newbies away."
Re: X86 assembly doesn’t have to be scary
#14I wonder if the history of x86 is holding us back in a big way. It started out being close to the metal but now it's an abstraction that can mislead you if you think processors are literally working the way x86 assembly describes. And surely the whole spectre issue could be lessened if we could be less reliant on CPUs having to guess what to keep in cache, which code paths are most likely, etc?
Re: X86 assembly doesn’t have to be scary
#15https://github.com/nebulet/nebulet/blob/master/wasm/fibonacc...
https://github.com/Hanks10100/wasm-examples/blob/master/simp...
Re: X86 assembly doesn’t have to be scary
#16I wonder if the history of x86 is holding us back in a big way. It started out being close to the metal but now it's an abstraction that can mislead you if you think processors are literally working the way x86 assembly describes. And surely the whole spectre issue could be lessened if we could be less reliant on CPUs having to guess what to keep in cache, which code paths are most likely, etc?
i think thats a potentially very fruitful approach, but would it have helped the spectre situation in any way?
oh, what you're suggesting in an analog for compiler driven speculation? that may have helped, and is also probably worth thinking about
Re: X86 assembly doesn’t have to be scary
#17I wonder if the history of x86 is holding us back in a big way. It started out being close to the metal but now it's an abstraction that can mislead you if you think processors are literally working the way x86 assembly describes. And surely the whole spectre issue could be lessened if we could be less reliant on CPUs having to guess what to keep in cache, which code paths are most likely, etc?
Speculation is part of out of order execution, which is logic to execute code passages when their inputs are ready, as opposed to strictly in program order, while maintaining the program visible effects of executing in program order. It works the same in ARM, MIPS etc. Not doing OOO execution roughly halves CPU throughput on your average code. AFAIK OOO without speculation is possible, but loses maybe half of its efficacy.
Actual experts may want to correct my numbers.
Re: X86 assembly doesn’t have to be scary
#18I wonder if the history of x86 is holding us back in a big way. It started out being close to the metal but now it's an abstraction that can mislead you if you think processors are literally working the way x86 assembly describes. And surely the whole spectre issue could be lessened if we could be less reliant on CPUs having to guess what to keep in cache, which code paths are most likely, etc?
Re: X86 assembly doesn’t have to be scary
#19Loved the article. Then one can follow up with some MS-DOS classics. https://www.amazon.com/Peter-Nortons-Assembly-Language-Book/... https://www.amazon.com/Advanced-S-DOS-Programming-Microsoft-... https://www.amazon.com/Peter-Norton-Programmers-Bible-progra... https://www.amazon.de/PC-Intern-Programming-Encyclopedia-Dev...
https://www.amazon.com/Zen-Assembly-Language-Knowledge-Progr...
https://www.amazon.com/Zen-Graphics-Programming-2nd-Applicat...
https://www.amazon.com/Zen-Code-Optimization-Ultimate-Softwa...
Zen of Asm is also online, I think a few of the other works, too.
Re: X86 assembly doesn’t have to be scary
#20I was talking to a couple of guys about what I had been doing on my C=64, and when I mentioned the assembly stuff I was writing, one of them said, "How can you possibly write anything with only three registers?!" (just the accumulator and x/y registers). I was wondering what the big deal was since that was the only architecture I had known at that point. Every game and utility I had were only using three registers, so it was already proven to me that three were "enough".
It's funny how you can just adapt and work with whatever is available, and that becomes your norm. Especially when you don't even realize there are other options out there.
Those were the days!