SDK logo

MASM32 for teaching Assembler Programming

The MASM32 SDK has a simplified console interface that makes it well suited for teaching students the basics of assembler programming within a reasonable time frame. Instead of wasting a semester trying to write the functionality of a runtime library which is almost exclusively an advanced task, the teacher can start students on the basics of assembler in a modern protected mode environment without having to start on trivial tasks like displaying text at the console and getting user input from the console.

Why is MASM different ?
MASM differs from conventional compilers in that it does not have any built in runtime library at all and without the basic building blocks the student's task is much more difficult and has a much higher failure rate. Instead of being face with boring and uninteresting technical data removed from its context, by providing a runtime library with macro support the student can learn the various levels of technical data while writing code that actually works and does something useful.

Over the ten year period that the MASM32 SDK has been available it has proven to be a far more successful strategy with a far higher success rate than the old methods of wasting time teaching DOS real mode programming and for the teacher this means a higher success rate with students taking a course of low level programming. The end result is a student that has learnt something useful about modern protected mode programming, has a greater understanding of how computers work and how higher level languages perform under the hood
.

Example
A MASM32 console application has this basic form. This template was generated directly in the MASM32 Editor from one of its built in scripts.

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
    include \masm32\include\masm32rt.inc
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

comment * -----------------------------------------------------
                     Build this console app with
                  "MAKEIT.BAT" on the PROJECT menu.
        ----------------------------------------------------- *

    .data?
      value dd ?

    .data
      item dd 0

    .code

start:
  
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

    call main
    inkey        ; wait for a keystroke before exiting
    exit

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

main proc

    print "Hello World",13,10
    ret

main endp

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

end start

A template of this type is easily extended when the teacher wants the student to learn how to write procedures, learn how instructions work, use and understand low level control flow logic and in fact all of the basics of how an executable program works. MASM comes with intrinsic pseudo high level notation like .IF blocks and .WHILE loops and this capacity has been extended to a switch block for both integer evaluation and string comparison.

Licencing
The MASM32 SDK is licenced so it can be downloaded and used in an educational context completely free of any charge. In different jurisdictions around the world, educational institutions may be subject to different requirements and contractual arrangements and if this is the case the institution should contact the local office of the Microsoft Corporation within their jurisdiction to negotiate the appropriate form of  licencing for the Microsoft binaries necessary to build assembler language programs.