Why use the STACK? 1) Registers are in short supply 2) Programs using stack are easier to document and easier to use. Think of int 21h 3) HLLs use the stack. Most large projects use a combination of HLLs and Assembly. To get your assembly code to work with the rest of the of the HLL code you mustuse stack to pass parameters. Libraries ----------- We write fairly general reusable procedures useful in a wide variety of situtations. How do we organize and manage these procedures? Another software engineering problem. We could just physically include the code for for a procedure with any program that uses it. Merge a couple of files and voila, we're done. In MASM INCLUDE fileName requests MASM to INSERT a copy of the disk file named "fileName" at the current position in the source code. But there is a far better way than include for storing, managing, and accessing procedures. ==> LIBRARIES MASM assmebles a program into a .OBJ (object) file LINK links together one or more .OBJ files to produce a .EXE file. LINK is designed to handle specially formatted collections of .OBJ files called LIBRARIES LINK will search thru one or more libraries for a required procedure and will adjoin the code for these procedures to the program. For example, a library may contain 100 procedures of which your program requires only 3. LINK will find these 3 and extract the code only for these 3 and links this code to your program. To set up a library type lib libName Read Pgs 122 - 123 in the book. Look at MASM manual ------------------------------------------------ Review: 1) Representation a) 2's complement b) Overflow c) sign extension d) ASCII 3) Programming in Assembly MASKS Procedures Using the stack Nothing on Libraries until the next exam. Good Luck.