Skip to content

Comment on The Art of Assembly Language (1996)

Comments

I love assembly language! I stream my programming sessions Monday-Saturday 5am-10am on Twitch (https://twitch.tv/nybblesio).

All of my previous streams are archived here: https://www.youtube.com/channel/UCaV77OIv89qfsnncY5J2zvg

I have around 23 videos now on YouTube covering both ARM 64-bit and x86 assembly language.

I have two projects on the schedule that are 100% assembly language:

- Let's Make an Arcade Game in MS-DOS: 100% x86 assembly language. I use DOSBOX and period tools for this project.

- Arcade Kernel Kit: 100% ARM AArch64 assembly language running on Raspberry Pi 3.

All of the code for these is available on Github: https://github.com/nybblesio

I'm also working on a game engine called Ryu: The Arcade Construction Kit where I'm writing my own assembler for classic arcade CPUs.

I'll be working on the x86 project again starting 2 April through 7 April.

Cool initiative, but please don't add music to the videos. It makes me nervous and unable to focus on you talking. Such a waste of otherwise great content.

Thanks for the feedback. The videos I have on my YouTube channel to-date are all from my Twitch streams. For or better or worse, these streams capture my working habits: when the camera isn't running, I'm doing the exact same thing -- even talking to myself. :) For some reason, suffering from ADHD, music helps to focus my attention. I've never been able to explain why.

However, with all that said, I am producing non-stream content that will start airing on my YouTube channel soon (within the next 30 days). This content will be more structured and focus on a specific topics with a set lesson plans. These videos won't feature any background music. I hope you'll be able to enjoy these when they're available.

Thanks for making these videos. I'm watching the "x86 assembly language programming on reference arcade game" video right now.

Knowing that the music is there for your focus actually makes it a lot easier for me to focus as well, somehow. Glad to know that.

Your voice is very relaxing, I'm actually working while I watch! Great explanations also.

Started watching your x86 stuff from the beginning. The music issues at first are distracting but I really like it. Keep up the good work. I'll see if I can keep up but you do really stream the whole five hours!

Why not use headphones?

Thank you! I've been meaning to dive into leaning x86 and 64-bit, you just made it much easier :)

I appreciate the hell out of people like you who take the time to spread their hard-earned practical wisdom. <3

Do you know or remember "Core war"? I loved it as a kid, and it taught me how to program.

I haven't seen your videos before, but they look neat. I glanced at one of your repos and was surprised to see .8 extensions! a86 was definitely my favorite flavor of x86 assembly in that era and d86 was pretty remarkable.

Absolutely agree: a86/d86 and later a386/d386 were my go-to assemblers for the early-to-mid PC era. Great macro facilities, library tools, listing files, and very fast.

a86 works great under DOSBOX but, sadly, d86 does not. I'm stuck using Turbo Debugger. Which, as tools of the time go, wasn't at all shabby and DOSBOX emulates it very well.

Hmm.

According to the DOSBox debugger, it gets stuck in an infinite loop poking/polling interrupts:

  278407: CPU:Illegal/Unhandled opcode 63
  278408: CPU:Illegal Unhandled Interrupt Called 6
  278410: CPU:Illegal/Unhandled opcode 63
  278411: CPU:Illegal Unhandled Interrupt Called 6
  278413: CPU:Illegal/Unhandled opcode 63
  278414: CPU:Illegal Unhandled Interrupt Called 6
  278416: CPU:Illegal/Unhandled opcode 63
I wonder if the DOSBox developers are aware of this, and if you could interest them in fiddling around to see what the cause is. It could be something very simple.

(Based on the fact that D86 was last updated in 2000 I doubt the author is going to be too interested in tinkering with it.)

---

HOWEVER!

D86 works just fine in QEMU - and, even better, if you use a CPU idle program for DOS to make QEMU not chew 100% of one core, the idle program will continue to have an effect even while D86 is running.

This being said, I have no idea how to use D86 :) and so cannot say whether an idler program will impact anything.

I tested with the IDLE.COM in "VMAdditions.iso" (date 3 Aug 2004, cksum 281796710). The program is so small (128 bytes FTW) that I see no issue with just

jMiO2DHAjsAmoaAAo/wAJqGiAKP+AIzIJscGoABAASajogC6GAC0Mc0huuIIkCCIdDO67giJdCu6+oECCIp0I/ v0+i7/LvwAqUgSCI2iuh4IkACOdAu6Zgj/dAO6KlDpQIE6ybo2UOg0deir/nIFA4Ctfv/DtE2/3s0YnXVARIc=

so you don't have to go index-of-/-hunting (you can just `base64 -d > idle.com` instead). I don't think whoever wrote this will mind :P

(Deliberately not using monospace for the block above to make things less visually jarring)

I haven't tried QEMU but I have successfully run D86 under an MS-DOS instances running in Virtual Machine and Parallels. However, these environment aren't well tuned for games and sound emulation is more or less useless.

My guess is that the author of D86, Eric Issacson (http://www.eji.com/), made use of some of his inside knowledge from his Intel days. Specifically, I know he liked to use encodings of the AAM instruction with bases other than 10. Intel didn't document the opcode properly so history records it as only supporting base 10, but it in fact can support quite a few number bases. Anyhow, I would speculate that DOSBOX doesn't support such a flexible interpretation of the encodings and that's why it's throwing illegal instruction exceptions. Maybe I should patch DOSBOX on stream sometime and submit the patch to the maintainers.

My guess is that the author of D86 ... made use of some of his inside knowledge from his Intel days.

I continue to be amazed at the amount of backward-compatibility inside the average Intel x86 CPU. If something stays out of long mode, it can still do all of that. Impressive, really.

And... I hadn't thought through to the point of considering what you were using D86 for :)

I agree, things like sound emulation leave a lot to be desired. I only use QEMU for its networking and HW-accel virtualization - DOSBox runs rings around it with eg Win3.1...

Have you tried PCem and 86Box?

Maybe I should patch DOSBOX on stream sometime and submit the patch to the maintainers.

Now that would be really awesome. :D

What are the main benefits of a(3)86 compared to free assemblers such as FASM or NASM? a386 costs a good chunk of money, so trying to understand the value proposition here.

Thanks for one of the most enjoyable streams on Twitch - keep up the great work!

You are a God amongst mere mortals. Gotta check you out.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.