Follow

I'm looking for source code of MS-DOS .COM programs in real-mode 8086 Assembly written in NASM syntax, which I 'd like to study.

It's proving harder than I thought as there's surprisingly little code like that.

· · Web · 7 · 13 · 4

@jens I hoped the long history and vast popularity of MS-DOS would have produced a sufficiently large corpus of such code.

@jens Thanks, for practical reasons it would be better to have the code online.

@amoroso While I did play a lot with assembly back in the day, I don't think any of it was NASM syntax. Most of the stuff (including my own) was Turbo Assembler (TASM) and some was Microsoft (MASM). I don't think NASM popped up on my radar until I abandoned MS-DOS/Windows for Linux around when Windows XP was released.

You might have better luck finding some of this old stuff although I'm not sure how easy it to study. I believe NASM should be able to read and assemble TASM style source code but that probably won't help for your studies.

@jens

@amoroso @jens not necessarily, the NASM syntax may be the tricky, or is just that there wasn't that much of a OSS culture back in DOS days (there was freeware though).

When I was writing assembler for DOS, TASM and MASM were way more popular. Shouldn't be too difficult to convert between syntax, may be?

@reidrac You're right, I forgot NASM came much later. Converting from other syntax is indeed possible.

@amoroso try with Simtel: archive.org/search.php?query=s

It used to be a freeware/shareware site and I recall downloading ZIP archives with ASM snippets and tools that included the source code.

@amoroso exploring one of these must be fun!

I had a couple of them back in the day.

@j12i That's a possibility, but I'd like to study how the sources organize and reference data and code.

@amoroso I *think* I wrote this in NASM syntax - it was 2013, so difficult to remember that far back...
@amoroso Note that if you can't open the file (because Mastodon doesn't like non-media attachments), here's a pastebin: https://pastebin.com/DsZF9vd6 .

@amoroso the early Peter Norton books included rewrites in assembly. I just trashed mine last week, sorry.

@amoroso I've got something that might fit the bill. It's ( x86 + 16-bit real mode + NASM ). A possible deal killer is that it uses some extended 386 instructions, albeit not many.

github.com/PeterFidelman/PSFTr

I eventually stopped using NASM because I wanted something that would run on-target on the 80186 in a HP 200LX. (NASM targets any x86, but the assembler itself requires 386 or better.) That is what brought me back to Borland Turbo Assembler, and later Forth.

@amoroso
Are there still some of the old BBSes around, that carried Brown's interrupt list and so on? IIRC there was a lot of ASM source code around in these times. Mostly MASM. Keyboard drivers, macro TSRs and such.

@amoroso FWIW, I skimmed archive.org out of pure curiosity, and there's an old SIMTEL CD, for example: archive.org/download/Simtel20_
path MSDOS/ASMUTL: ia800502.us.archive.org/view_a
there should be some other gems in there as well...

@amoroso @theruran there used to be a site called VX Heavens and I know there was a lot of NASM code there. I assume there's an archive of it somewhere but it was seized in 2012 nakedsecurity.sophos.com/2012/

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!