Learning ASM

  • SpinRite v6.1 Release #3
    Guest:
    The 3rd release of SpinRite v6.1 is published and may be obtained by all SpinRite v6.0 owners at the SpinRite v6.1 Pre-Release page. (SpinRite will shortly be officially updated to v6.1 so this page will be renamed.) The primary new feature, and the reason for this release, was the discovery of memory problems in some systems that were affecting SpinRite's operation. So SpinRite now incorporates a built-in test of the system's memory. For the full story, please see this page in the "Pre-Release Announcements & Feedback" forum.
    /Steve.
  • Be sure to checkout “Tips & Tricks”
    Dear Guest Visitor → Once you register and log-in please checkout the “Tips & Tricks” page for some very handy tips!

    /Steve.
  • BootAble – FreeDOS boot testing freeware

    To obtain direct, low-level access to a system's mass storage drives, SpinRite runs under a GRC-customized version of FreeDOS which has been modified to add compatibility with all file systems. In order to run SpinRite it must first be possible to boot FreeDOS.

    GRC's “BootAble” freeware allows anyone to easily create BIOS-bootable media in order to workout and confirm the details of getting a machine to boot FreeDOS through a BIOS. Once the means of doing that has been determined, the media created by SpinRite can be booted and run in the same way.

    The participants here, who have taken the time to share their knowledge and experience, their successes and some frustrations with booting their computers into FreeDOS, have created a valuable knowledgebase which will benefit everyone who follows.

    You may click on the image to the right to obtain your own copy of BootAble. Then use the knowledge and experience documented here to boot your computer(s) into FreeDOS. And please do not hesitate to ask questions – nowhere else can better answers be found.

    (You may permanently close this reminder with the 'X' in the upper right.)

ShadowMeow

Well-known member
Nov 3, 2023
99
11
I'm on a mission to learn ASM. It's going to be difficult at the beginning but in a few years I guess I can master it.
 
As strange as this may sound, there is a game (probably more) on Steam that may be helpful. (Making learning fun can be quite helpful for some learners.) Check out https://store.steampowered.com/app/792100/7_Billion_Humans/ . It's visual, but it definitely reminds me of my days learning 6502 assembler.... the instructions you visualize are very close to 6502 assembler. It will probably go on sale at some point, so if you don't think it's worth full price, stick it on your wishlist and wait for a sale notification. Also, I suspect some other games on Steam may also be in a similar category and get recommended to you. (Such as ASTRA-256 Assembler, Shenzhen I/O, TIS-100 .)
 
  • Like
Reactions: ShadowMeow
I don’t know is your are trying to learn assembly to make money or just for fun or both, but it you are try to make money in general by making software I would be careful. It does not seem clear to me what languages and development tools people make employment decision want the people working on the code to be investing time and money into. But I think that understanding assembly is helpful in understanding how computers work and in my mind it helps understand higher level languages.
 
  • Like
Reactions: ShadowMeow
I don’t know is your are trying to learn assembly to make money or just for fun or both, but it you are try to make money in general by making software I would be careful. It does not seem clear to me what languages and development tools people make employment decision want the people working on the code to be investing time and money into. But I think that understanding assembly is helpful in understanding how computers work and in my mind it helps understand higher level languages.
Just for fun. Not everyone is driven by money.
 
  • Like
Reactions: jms
As strange as this may sound, there is a game (probably more) on Steam that may be helpful. (Making learning fun can be quite helpful for some learners.) Check out https://store.steampowered.com/app/792100/7_Billion_Humans/ . It's visual, but it definitely reminds me of my days learning 6502 assembler.... the instructions you visualize are very close to 6502 assembler. It will probably go on sale at some point, so if you don't think it's worth full price, stick it on your wishlist and wait for a sale notification. Also, I suspect some other games on Steam may also be in a similar category and get recommended to you. (Such as ASTRA-256 Assembler, Shenzhen I/O, TIS-100 .)
Going to check that game out! Want to learn 6502 assembler as well. As a kid I had a Commodore 64 and that was magic to me. Was a little bit too young at the time to understand what was happening when reading the code. But now, almost 40 years later, I should be able to understand (some of) it). Bought a second hand Commdore 64 a few months ago, so I have a real 6502 available. Or actually, a 6510, but I understand that's not actually that different.
 
Just for fun. Not everyone is driven by money.
There are different assembly languages for different CPUs. Steve did say on a different twit podcast that a thing call a TI launchpad could be used to learn assembly, but it is not x86 assembly. I think the TI launchpad has a small instruction set like maybe 40 instruction.

I asked ChatGPT “in the most fundamental way, when programming a generic von Neumann computer, what be the most essential assembly instructions?” It gave a pretty good answer, so I copied and pasted it into a word processing document and saved the response. Later, I posted the response on Pavel Yosifovich blog. The blog was about his x86 64 bit programming course. Some one was asking for resources learning assembly. I decided to share my thoughts. Here is the link:



https://scorpiosoftware.net/2023/11/02/x64-architecture-and-programming-class/
 
Simple "Hello World!" program that works under FreeDOS...

Code:
org 0x100 ; Code starts at offset 100h
use16 ; Use 16-bit code

mov ax,0900h ; DOS function: AX = 0900h (Show Message)
mov dx,hello ; DX = "Hello World!$"
int 21h ; Call a DOS function: AX = 0900h (Show Message)

mov ax,4c00h ; DOS function: AX = 4c00h (Exit)
int 21h ; Call a DOS function: AX = 4c00h (Exit)

hello db "Hello World!$"

Compiling Code...

Code:
nasm hello.asm -o hello.com
 
Last edited:
I think that the most important thing for learning MASM (x86 ASM) is having a truly comfortable development environment.

Assuming you're using Windows, everyone raves about the free Visual Studio Community Edition . You'll need to get MASM's tools which are now also available at no charge from Microsoft. Once you have those things in place, you'll have a very comfortable environment where you can write, edit, debug (single step and view registers and memory, etc.)

Then you'll have an environment where you're COMFORTABLY able to write x86 assembly code that looks like this:
1713538708286.png
 
I never got very far with this, but I'll throw in a link to Maria Markstedter's site in case you're interested in a bit of Arm assembly. She's approaching it from a security research point of view. Pretty easy to find an old Raspberry Pi to practice on.
 
I think that the most important thing for learning MASM (x86 ASM) is having a truly comfortable development environment.

Assuming you're using Windows, everyone raves about the free Visual Studio Community Edition . You'll need to get MASM's tools which are now also available at no charge from Microsoft. Once you have those things in place, you'll have a very comfortable environment where you can write, edit, debug (single step and view registers and memory, etc.)

Then you'll have an environment where you're COMFORTABLY able to write x86 assembly code that looks like this:
Yes, I just sent Microsoft another email asking about their developer licenses. OMG it is boring reading software licenses. If they actually email me back and I decide to buy some software from them I will ask why visual studio is so blotted. It would be really cool to have Steve's brain.
 
Yes, I just sent Microsoft another email asking about their developer licenses. OMG it is boring reading software licenses. If they actually email me back and I decide to buy some software from them I will ask why visual studio is so blotted. It would be really cool to have Steve's brain.
Well really the brain of any one really good at 32-bit or 64-bit intel assembler.
 
I wonder if Visual Studio Code could be used instead of the full Visual Studio? Out of the box, Code supports Typescript/JavaScript and C# (and maybe HTML and CSS, as its target is for web developers) but you can install plugins to support more stuff (I think MS has some Python support as well, which I only know about because I added the plugin for Jupyter Notebook, and it installed Python language support as a result)

I'm sure there's ASM language support. You would need to install the MASM Tools Steve linked at the very least.
 
Yes, I just sent Microsoft another email asking about their developer licenses. OMG it is boring reading software licenses. If they actually email me back and I decide to buy some software from them I will ask why visual studio is so blotted. It would be really cool to have Steve's brain.
You could always just use an open source assembler like FASM (Flat Assembler 2)
Discussion thread for FASM - https://board.flatassembler.net/topic.php?t=22855
FASM syntax
FAQ on FASM vs MASM
The Fresh IDE with FASM built in.
 
Last edited:
You could always just use an open source assembler like FASM (Flat Assembler 2)
That also looks like a great learning tool. What's not clear is whether a debugging facility is also integrated? For learning, an integrated debugging facility is SO important. That's what Visual Studio Code offers, and since it's free and the MASM tools are free, that's what I would recommend for Windows users. (y)
 
  • Like
Reactions: GBark
When I try to download MASM's tools. I get this message We're sorry, this download is no longer available.