Assembly Source Code Using MASM 6.15

by Jim Krumm

|Home| |Computer Science| |Casper College| |Java Source Code| |C++ Source Code| |Visual C++.NET| |Visual Basic| |Assembly Source Code| |Linux| |Dice Program|

|Wyoming| |Casper Area| |American Album| |Personal Album| |Hawaii| |Florida| |Denmark| |Greece| |Paris| |London| |Amsterdam| |Cozumel| |Links| |Sitemap|

Click here to go to the Computer Science Department Home Page for Casper College at www.caspercomsci.com.  


Source Code Examples of Assembly Written in MASM615:

We program in 32 bit assembly using Microsoft's MASM615 in our Computer Organization Course, COSC2150 and TextPad to edit, assemble, and run the source code. The following program is about as simple as it gets to write a program in assembly, making use of the Irvine library to display the traditional "hello" program using the Irvine functions WriteString and Crlf.

Hello Program


The following program shows how to add the two numbers, 5 and 17, using reverse polish notation and the stack.

Reverse Polish Program


The following program asks the user how many numbers they wish to enter, and determines the average of these values using arrays. It shows how to navigate up and down the values stored in the array, how to loop, and how to divide, add, and subtract.

Arrays and Averaging Program


The following program shows how to do a few simple comparisons of signed values with assembly. This program uses jle (jump if less than or equal to), jge (jump if greater than or equal to), jl (jump if less than), and jne (jump if not equal to).

Conditional Loops


©All rights reserved by James Krumm. Originally made available at www.caspercomsci.com. Materials here can be used, and redistributed, provided proper reference is made to the origin and author(s) of these materials. Please send any corrections or suggestions to jkrumm@caspercollege.edu. Last modified July 8, 2009.


To find out more about the Casper College Computer Science Program contact us at:

James Krumm
Department Head
Computer Science,
Wold Physical Sciences Building,
Casper College,
125 College Drive,
Casper, Wyoming 82601
(307) 268-2519 jkrumm@caspercollege.edu

[Return to Home Page]

|Home| |Computer Science| |Casper College| |Java Source Code| |C++ Source Code| |Visual C++.NET| |Visual Basic| |Assembly Source Code| |Linux| |Dice Program|

|Wyoming| |Casper Area| |American Album| |Personal Album| |Hawaii| |Florida| |Denmark| |Greece| |Paris| |London| |Amsterdam| |Cozumel| |Links| |Sitemap|