------------------------- Week 13 Notes for DAT2343 ------------------------- -Ian! D. Allen - idallen@idallen.ca - www.idallen.com Assignment 10 is due this week (Week 13). Assignment 11 is due in Week 14. Project 4 is due in Week 14. Lecture Notes for This Week 26index_assembler_programming.htm Index to Assembly Language Programming 27DevelopingAssemblerPrograms.htm 27. Developing Programs in Assembler 28AssemblerTools.htm 28. Assembler Programming Tools - 28Arrow.avi - 28MASM_Arrow_ASM.pps 29programs_style.htm Sample Programs and Program Style - addtwo.asm gcd.asm labels.asm onepage.asm stars.asm - first.asm getshow.asm noecho.asm series.asm tail.asm ---------------------- APPENDIX for Project 4 ---------------------- I wrote a small DOS BATCH file that does an ASM followed by VAL followed by running your executable. You can get this file by doing the following download in your Windows 95 virtual machine: 1. In your Win95 Virtual Machine, open "The Internet". 2. Enter this URL: http://ian.idallen.ca/root.zip (note the .CA, not .COM) and save the root.zip file to your Win95 Desktop. Close "The Internet" window. 3. Open the root.zip file on the Win95 Desktop (double-click on it). It should open with the WinZip program. 4. Select the "Extract" icon at the top of WinZip (or via the Actions menu). 5. On the left, in the "Extract to" box, enter the C:\ directory: \ On the left, select "All files" On the left, select "Overwrite existing files" On the left, select "Use folder names" Then push the "Extract" button. 6. If you get a "Confirm File Overwrite" dialog box, select "Yes to All". 7. If you get a "Confirm File Replacement" dialog box, select "Yes to All". 8. Close the WinZip program. Drag the root.zip file to the Recyle Bin and empty it. 9. Open a MS-DOS prompt in the DAT2343 directory using the Win95 Desktop MS-DOS Prompt icon (double-click on it). 10. At the DOS prompt, type: DO ONEPAGE The DO.BAT BATCH file will run ASM ONEPAGE.ASM, then VAL ONEPAGE.OBJ, and if all that works it will finally execute your ONEPAGE.COM. You can re-run ONEPAGE.COM by typing ONEPAGE at the DOS prompt. 11. At the DOS prompt, type: CLEAN This will call a CLEAN.BAT BATCH file to remove all the *.OBJ and *.COM files from this directory. You can view these DOS BATCH files under the C:\arrow.asm directory. All supplied files are Read-Only; to edit them, you must turn off Read-Only. Editing your P4.ASM File ------------------------ If you don't like using Notepad as an editor under Win95, you can prepare your P4.ASM file in another text editor on your host computer (e.g. VIM or EMACS under Linux) and cut-and-paste the host screen into Notepad in your vitrual Win95 and then save it from NOTEPAD and run it in the DOS window. Do *NOT* use a word processor (e.g. MSWord) to prepare your P4.ASM file. You must use a real text editor, not a word processor. Remember that you can move between windows in Win95 using ALT-TAB, and NOTEPAD uses keyboard shortcuts, so once you have copied your P4.ASM program into your clipboard on your host computer, you can ALT-TAB to NOTEPAD, ALT-E A to select all text in NOTEPAD, CTRL-V to paste the new program from the clipboard into NOTEPAD, ALT-F S to save the program, ALT-TAB to switch to the MS-DOS window, UP-ARROW to recall the last "DO P4" line, and push RETURN to assemble and run. If you have problems, edit and repeat. If NOTEPAD opens the "Save As" dialog box when you try to save a file, it may be because the file is Read-Only. Be careful with the "Save As" dialog box in NOTEPAD - if you type a name "foo.asm" here and save, you will create a new file "foo.asm.txt", which you will have to rename to "foo.asm". Avoid the "Save As" dialog box in NOTEPAD.