About me
Home
Resumé
CV
Pictures

Course Work
CSE300-FA98

Teaching
Portfolio
CSE240-SP99
CSE207-FA03

Misc
eHarmony
Documents

Tools

Basic Instructions

To help get you started I have provided some of the basic instructions that you will probably want to be familiar with as you start this first project. Later on we will cover some of the more advanced instructions and eventually move on to i386 instructions. This list is not meant to be a complete description. You should reference your text book for additional information. Occassionally, you will find that some instructions are poorly or incompletely documented. Possibly HelpPC will be able to help you. It is a fairly complete manual for the PC and includes lots of detailed techinical information you may find useful. Sometimes it is quicker to just write a short little program that will test the instructions in question. At that point, you can run your code through a debugger and watch what happens as you single step through each instruction. If you are stuck, you can email me for help or drop by my office hours.

If I have any mistakes on this page, please let me know immediately so I can fix these. I believe it is all typed correctly, but double check with me if you are not sure. Thank you.

mov destination, source
The destination may be a register, memory location, or indirect memory location (ds:[bx]). The source may be an immediate value, register, memory location, or indirect memory location. No flags are modified during this operation.

add destination, source
The source and destinations are added together and stored in the destination location. Flags will be modified to reflect if the result is zero, caused a carry, overflowed, etc.
Same as the sub operation

mul partialSource
This instruction is explained with an informative picture in your book p.70-71, but the short of it is you can call mul cl which will take the value in cl and multiply it against the value in al. The result will be stored in ax. The other way to call this function is to call mul cx which will multiply ax with cx. The result will be stored in DX:AX (high 16-bits in DX and the lower 16-bits in AX)

div partialSource
This instruction is explained with an informative picture in your book p.72-73, but for a quick view, place your value in AX and call div cl which will put the quotient in al and the remainder in ah. Similarily, you can place your value in DX:AX and call div cx which will put the quotient in ax and the remainder in dx.

jmp destination
Unconditionally jumps to a location in your code within one signed byte from the current location. If you are outside of that range you will need to override the jump with the keyword FAR. jmp FAR destination where destination is any valid label.

je destination
Similar to jmp, except this will check the flags to see if a condition has been meet. There are dozens of variations on conditional jumps. Please reference your book to see how each of the different ones work.

push register
pushes a value on the stack. No flags are changed during this operation

pop register
pops a value from the stack into the specified register. No flags are changed during this operation

int intNumber
generates the specified interrupt
Last Modified: January 26, 1999 - Barry E. Mapen