It Isn’t WebAssembly, But It Is Assembly In Your Browser

Sun, 30 Apr 2023 11:10:53 +1000

Andrew Pam <xanni [at] glasswings.com.au>

Andrew Pam
<https://hackaday.com/2023/04/11/it-isnt-webassembly-but-it-is-assembly-in-your-browser/>

"You might think assembly language on a PC is passe. After all, we have a host
of efficient high-level languages and plenty of resources. But there are times
you want to use assembly for some reason. Even if you don’t, the art of writing
assembly language is very satisfying for some people — like an intricate logic
puzzle. Getting your assembly language fix on a microcontroller is usually
pretty simple, but on a PC there are a lot of hoops to jump. So why not use
your browser? That’s the point of this snazzy 8086 assembler and emulator that
runs in your browser. Actually, it is not native to the browser, but thanks to
WebAssembly, it works fine there, too.

No need to set up strange operating system environments or link to an
executable file format. Just write some code, watch it run, and examine all the
resulting registers. You can do things using BIOS interrupts, though, so if you
want to write to the screen or whatnot, you can do that, too.

The emulation isn’t very fast, but if you are single-stepping or watching,
that’s not a bad thing. It does mean you may want to adjust your timing loops,
though. We didn’t test our theory, but we expect this is only real mode 8086
emulation because we don’t see any protected mode registers. That’s not a
problem, though. For a learning tool, you’d probably want to stick with real
mode, anyway. The GitHub page has many examples, ranging from a sort to
factorials. Just the kind of programs you want for learning about the
language."

Via Diane A.

Share and enjoy,
               *** Xanni ***
--
mailto:xanni@xanadu.net               Andrew Pam
http://xanadu.com.au/                 Chief Scientist, Xanadu
https://glasswings.com.au/            Partner, Glass Wings
https://sericyb.com.au/               Manager, Serious Cybernetics

Comment via email

Home E-Mail Sponsors Index Search About Us