DAT 2343 Creating Programs with MASM Arrow ASM

  • Slides: 12
Download presentation
DAT 2343 Creating Programs with MASM / Arrow ASM © Alan T. Pinck /

DAT 2343 Creating Programs with MASM / Arrow ASM © Alan T. Pinck / Algonquin College; 2003

The Text-Edit Stage Use Note. Pad or any other text editor you feel comfortable

The Text-Edit Stage Use Note. Pad or any other text editor you feel comfortable with to create your source program file. (Recommended that you do NOT use a word processor). Save with extension. ASM Identification comments at beginning (lines starting with semicolons) n n n source file name brief description of purpose author and date written Body of source in 4 columns (separated by at least on space): n n labels (where required by the logic) mnemonic operations (or pseudo-ops) operands (registers, immediate values, label references comments (when intent is not obvious)

Creating an Object File with MASM At a DOS prompt (in, or with a

Creating an Object File with MASM At a DOS prompt (in, or with a PATH set to the MASM directory), enter n MASM will prompt for n n source file : xxxx. ASM object file : xxxx. OBJ (hit <Enter> to accept default) listing file : NUL. LST (change to xxxx. LST if desired) cross-reference file : NUL. CRF (hit <Enter>) Alternately, you could enter: MASM xxxx. ASM; (replacing “xxxx” with your file’s primary name) to accept all defaults n

Creating an Object File with Arrow ASM Identical to MASM except leave the ‘M’

Creating an Object File with Arrow ASM Identical to MASM except leave the ‘M’ off; that is: n ASM n Arrow ASM will provide the same prompts as MASM or n ASM xxxx. ASM;

Correcting Source Errors MASM/ASM will display a list of all the errors it discovered

Correcting Source Errors MASM/ASM will display a list of all the errors it discovered in your source file; the error messages will include line number references. For difficult to interpret errors, it may be useful to have MASM/ASM generate the. LST file; this will also contain the error messages at/following the location where they were detected.

Creating an EXE with MASM (LINK) From the DOS prompt (with the same directory

Creating an EXE with MASM (LINK) From the DOS prompt (with the same directory conditions as for MASM), type: n LINK will prompt for the files it needs; you will need to specify the name of the. OBJ created by MASM and otherwise accept the defaults. Alternately, type: n LINK xxxx. OBJ; If you are creating a. COM style program, you will get a warning message about not having a stack segment; ignore this. Do NOT use LINK with object files created with the Arrow ASM

Creating an EXE with Arrow (VAL) Arrow’s equivalent to MASM’s LINK is called VAL;

Creating an EXE with Arrow (VAL) Arrow’s equivalent to MASM’s LINK is called VAL; in its simplest form (when creating a. EXE style program) type: n VAL instead of LINK (everything else should be the same) Do NOT use VAL with. OBJ files created by MASM

Creating a. COM with MASM (EXE 2 BIN) (Assuming your original source was coded

Creating a. COM with MASM (EXE 2 BIN) (Assuming your original source was coded in a form compatible with a. COM style program), type: n EXE 2 BIN xxxx. EXE, xxxx. COM where “xxxx” should be replaced with your primary file name.

Creating a. COM with Arrow (VAL) Instead of using the basic form of VAL

Creating a. COM with Arrow (VAL) Instead of using the basic form of VAL to create a. EXE program, run VAL with the COM option: VAL /COM to cause it to output a. COM style program

Comparison of MASM and Arrow ASM In later versions MASM supplies some additional features

Comparison of MASM and Arrow ASM In later versions MASM supplies some additional features and forms useful for developing very large Assembler based systems. These features are not available in the Arrow Assembler. The Arrow Assembler is free. The Arrow Assembler was designed to be equivalent to MASM version 3 (anything that works in Arrow Assembler will also work in MASM; even later versions)

Arrow Assembler Usage Demonstration Download and run the file Arrow. AVI using the Media.

Arrow Assembler Usage Demonstration Download and run the file Arrow. AVI using the Media. Player.

End of Lecture

End of Lecture