Dec 102017
MASM 5.0 conversion help for the A86 Assembler.
File MASM50.ZIP from The Programmer’s Corner in
Category Assembly Language
MASM 5.0 conversion help for the A86 Assembler.
File Name File Size Zip Size Zip Type
MASM50.TXT 2890 1337 deflated
TPCREAD.ME 199 165 deflated

Download File MASM50.ZIP Here

Contents of the MASM50.TXT file

A86 equivalents for some MASM 5.0 built-in macros

This chart was prepared in response to a couple of my users, who are trying to
work through the MASM 5.0 code in Norton's new assembly language book. It's a
sad condition that the so-called "standard" assembler keeps changing, so that
MASM users are forced to send another $50--75 every couple of years to
Microsoft, if they wish to keep up with the literature.

Please read Chapter 12 of the A86 manual for an overview of conversion of MASM
programs to A86. You'll find that the best method for reworking the program
in Norton's book is to eliminate all of the following "red-tape" directives
entirely, and make the program into a .COM program. In that case, you must
also eliminate all the program instructions designed to load segment registers
(such as MOV AX,DGROUP followed by MOV DS,AX). You can do so because a .COM
program already starts with all segments pointing to the same 64K area. The
stack pointer is also automatically initialized, up at the top of the 64K area
where it will not interfere with program or data. Thus you can ignore
segmentation entirely. Instead of linking successively greater numbers of
.OBJ files, you simply assemble the corresponding source files -- A86
assembles faster than LINK links, so this is no penalty.

By eliminating all the segmentation red tape, you are making your program
much, much simpler to code and understand. But if you wish to slavishly mimic
the MASM macros presented, you can substitute the equivalents that follow
here. But, again, I am utterly convinced that if you do so, you'll end up
with more headaches and less understanding than you would if you ripped out
all segmentation directives and initializations from the start.

IMPORTANT NOTE: The leading underscores of _DATA and _TEXT, where
presented, are significant and must be included!

MASM: dosseg

A86: The only effect of this directive appears to be to add a comment
record to the object file, presumably for Microsoft's debugger's
benefit. It can be deleted from A86 code.

MASM: .model small or
.model compact or
.model medium or
.model large


MASM: .code

A86: if model is small or compact: _TEXT SEGMENT WORD PUBLIC 'CODE'
if model is medium or large: modname_TEXT SEGMENT WORD PUBLIC 'CODE'

...where "modname" is the name of this module

MASM: .data


MASM: .stack

ORG 0400H

MASM: extrn MYPROC:proc

A86: if model is small or compact: EXTRN MYPROC:near
if model is medium or large: EXTRN MYPROC:far

...where MYPROC is any name of a procedure you are declaring

 December 10, 2017  Add comments

Leave a Reply