;this variable is used to keep the mans position. ;this variable is used to keep the zombies position

Similar documents
db "Please enter up to 256 characters (press Enter Key to finish): ",0dh,0ah,'$'

COMPUTER ENGINEERING DEPARTMENT

COMPUTER ENGINEERING DEPARTMENT

Marking Scheme. Examination Paper. Module: Microprocessors (630313)

Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 5: Procedures. Chapter Overview. The Book's Link Library

We will first study the basic instructions for doing multiplications and divisions

Lab 6: Conditional Processing

CONTENTS. 1. Display a Message Display a one Digit Number Accept a Character from keyboard and display the character 4

Lab 5: Input/Output using a Library of Procedures

Marking Scheme. Examination Paper Department of CE. Module: Microprocessors (630313)

Assembly Language for Intel-Based Computers, 5 th Edition. Chapter 9: Strings and Arrays

EC 333 Microprocessor and Interfacing Techniques (3+1)

Overview: 1. Overview: 2

Ex: Write a piece of code that transfers a block of 256 bytes stored at locations starting at 34000H to locations starting at 36000H. Ans.

X86 Addressing Modes Chapter 3" Review: Instructions to Recognize"

Experiment 8 8 Subroutine Handling Instructions and Macros

Conditional Processing

mith College Computer Science CSC231 Assembly Week #9 Spring 2017 Dominique Thiébaut

CSCI516: Program 1 - October 11, 2010 The Program is due: October 25, 2010 in the beginning of the class

.code. lea dx,msg2. Page 1/8. Problem 1: Programming in Assembly [25 Points]

Assembly Language Programming

Module 3 Instruction Set Architecture (ISA)

Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 5: Procedures

Islamic University Gaza Engineering Faculty Department of Computer Engineering ECOM 2125: Assembly Language LAB

Lab 2: Introduction to Assembly Language Programming

UNIT 4. Modular Programming

EXPERIMENT WRITE UP. LEARNING OBJECTIVES: 1. Get hands on experience with Assembly Language Programming 2. Write and debug programs in TASM/MASM

mith College Computer Science CSC231 Assembly Week #10 Fall 2017 Dominique Thiébaut

Microprocessors ( ) Fall 2010/2011 Lecture Notes # 15. Stack Operations. 10 top

Programs for Assembly Language Programming

Lecture (08) x86 programming 7

COE 205 Lab Manual Experiment N o 12. Experiment N o Using the Mouse

Strings and Arrays. Overview. String primitive instructions MOVSB, MOVSW, MOVSD

EECE.3170: Microprocessor Systems Design I Summer 2017 Homework 4 Solution

Lecture 15 Intel Manual, Vol. 1, Chapter 3. Fri, Mar 6, Hampden-Sydney College. The x86 Architecture. Robb T. Koether. Overview of the x86

Assembler Programming. Lecture 8

Q1: Multiple choice / 20 Q2: Data transfers and memory addressing

CSC 2400: Computer Systems. Towards the Hardware: Machine-Level Representation of Programs

Experiment #5. Using BIOS Services and DOS functions Part 1: Text-based Graphics

Jump instructions. Unconditional jumps Direct jump. do not change flags. jmp label

PESIT Bangalore South Campus

A4 Sample Solution Ch3

Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 6: Conditional Processing. Chapter Overview. Boolean and Comparison Instructions

Libraries and Procedures

Islamic University Gaza Engineering Faculty Department of Computer Engineering ECOM 2125: Assembly Language LAB. Lab # 10. Advanced Procedures

AM2: Programming with Contemporary Instruction Set

Marking Scheme. Examination Paper. Module: Microprocessors (630313)

COMP211 ASSEMBLY PROGRAMMING

Islamic University Gaza Engineering Faculty Department of Computer Engineering ECOM 2125: Assembly Language LAB. Lab # 8. Conditional Processing

The x86 Architecture

16.317: Microprocessor Systems Design I Fall 2014

The registers(di,si) are automatically incremented or decremented depending on the value of the direction flag:

Assembly Language. Lecture 5 Procedures

Lecture 16: Passing Parameters on the Stack. Push Examples. Pop Examples. CALL and RET

In order to run the program, go to the folder Release and run project.exe.

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY

Data Transfers, Addressing, and Arithmetic. Part 2

CSC 8400: Computer Systems. Machine-Level Representation of Programs

16.317: Microprocessor Systems Design I Spring 2015

Basic Assembly Instructions

Assembly Language for Intel-Based Computers, 5 th Edition. Kip R. Irvine. Chapter 6: Conditional Processing

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY

It is possible to define a number using a character or multiple numbers (see instruction DB) by using a string.

ADVANCE MICROPROCESSOR & INTERFACING

Lab 4: Basic Instructions and Addressing Modes

AM2: Protected-Mode Programming

FACULTY OF ENGINEERING LAB SHEET

SOEN228, Winter Revision 1.2 Date: October 25,

Libraries and Procedures

CS-202 Microprocessor and Assembly Language

Conditional Processing

Assembly Language. Lecture 5 Procedures

8086 INSTRUCTION SET

Week /8086 Microprocessor Programming

8086 programming Control Flow Instructions and Program Structures

Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 6: Conditional Processing

SHEET-2 ANSWERS. [1] Rewrite Program 2-3 to transfer one word at a time instead of one byte.

Chapter 3: Addressing Modes

LABORATORY WORK NO. 7 FLOW CONTROL INSTRUCTIONS

Marking Scheme. Examination Paper Department of CE. Module: Microprocessors (630313)

Assembly Language for Intel-Based Computers, 4 th Edition

Experiment N o 8. String Handling Instructions

Q1: Define a character string named CO_NAME containing "Internet Services" as a constant?

Assembly Language LAB

Assembly Language for Intel-Based Computers, 4 th Edition

ELEC 242 Time Delay Procedure

COE 205. Computer Organization and Assembly Language Dr. Aiman El-Maleh

16.317: Microprocessor Systems Design I Fall 2015

Rev101. spritzers - CTF team. spritz.math.unipd.it/spritzers.html

Experiment 3 3 Basic Input Output

CSE351 Spring 2018, Midterm Exam April 27, 2018

mith College Computer Science CSC231 - Assembly Week #4 Dominique Thiébaut

Lab 3: Defining Data and Symbolic Constants

MODE (mod) FIELD CODES. mod MEMORY MODE: 8-BIT DISPLACEMENT MEMORY MODE: 16- OR 32- BIT DISPLACEMENT REGISTER MODE

EEM336 Microprocessors I. Addressing Modes

mith College Computer Science CSC231 Assembly Week #11 Fall 2017 Dominique Thiébaut

Assembly Language: g Part III. First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University

Kingdom of Saudi Arabia Ministry of Higher Education. Taif University. Faculty of Computers & Information Systems

INSTRUCTOR: ABDULMUTTALIB A. H. ALDOURI

ECOM Computer Organization and Assembly Language. Computer Engineering Department CHAPTER 7. Integer Arithmetic

Transcription:

TITLE MASM Template (main.asm) ; Description: This was my final project for my Assembly Language Course. It is a Zombie Video game. You as the player move around with your arrow keys and try to avoid getting ;eaten by the zombie or falling into the pits! You can use the arrow keys or i,j,k,l keys. The more you play the harder it gets. It will keep track of the previous pit that was ;filled by a zombie, if you make it that far. Green is the zombie, Red is the pit and gray is the human ; ;BY JOSH RICKARD ; Revision date: 10-10-2011 INCLUDE Irvine32.inc ;---- ;Macro to set color to whatever color, example color red ;---- color MACRO color mov eax, color ENDM ;----.data ;data section of the project ;---- manpos WORD? zompos WORD 50 DUP (?) pitpos WORD? delval WORD 3000 delcnt WORD? level BYTE 0 xycord BYTE 5 fillpitpos WORD 0 ;this variable is used to keep the mans position ;this variable is used to keep the zombies position ;this variable is used to keep the pits position ;this is used to keep the count going, time ;used to keep track of the time ;this keeps track of the different levels in the game ;this keeps positions for print screens and other gotoxy events ;this keeps ths position of the the filled pit position after a zombie falls in skiplinechar BYTE " ",0 manchar = 02h zomchar = 0CBh pitcharempty = 0B2h pitcharfull = 0BDh wallchar= 07Ch nochar = 20h doneflag BYTE 0 answer BYTE? ;I used this within my skipline procedure ;this is the character used for the man, its gray ;this is the character used for the zombie, its green ;this fills in the zombie character when it mpves ;this fills the pit when a zombie has fallen, its cyan ;this is representing the wall character, you can't see it ;this clears out the man when he moves ;this variable is set when you are done playing or died ;this variable holds the answers to any questions asked gamegrid BYTE 25*80 dup(020h) ;this varialbe is used to keep the game grid initgrid BYTE 10*80 dup(nochar),39 dup(nochar),39 dup (nochar), ;this is used to keep the position of the map relevant to the players, ie zombie, man etc. 20 dup (nochar), 20 dup (nochar), 13*80 dup (nochar) theendmsg BYTE "THE END!",0 ;use this to print out when you have reached the end firstmsg BYTE "Do you need instructions (Y/N)? ",0 ;basic instruction text that is printed out. SplashMsg1 BYTE "---------------------------", 0ah, ;main splash screen, not centered, it is meant to be that way "... ", 0ah,

" C C / ", 0ah, " /< / ", 0ah,0 SplashMsg2 BYTE " /_# =o ", 0ah, "/(- /(\_\ \ ", 0ah, "\ ) \ )_ \o \ ", 0ah,0 SplashMsg3 BYTE "/ \ / \ ", 0ah, " _ ", 0ah, " /o \ ", 0ah, " / ' ", 0ah, " / / ", 0ah, " /_/\ ", 0ah, " ( _( < ", 0ah,0 SplashMsg4 BYTE " \ \ \ ", 0ah, " \ \ ", 0ah, " \ \ \ ", 0ah, " \_\ \_\ ", 0ah, "---------------------------", 0ah,0 SplashMsg5 BYTE "11111111111 11111 11 11 111111 1111111111 11111111 11111111 ",0ah, ;second splash screen, there is a delay, no need to press any buttons " 1 1 1 1 1 1 1 1 1 11 1 1 ",0ah, " 1 1 1 1 1 1 1 1 1 11 1 1 ",0ah, " 1 1 1 1 1 1 1 1 1 11 1 1 ",0ah,0 SplashMsg6 BYTE" 1 1 1 1 1 1 1 1 1 11 1 1 ",0ah, " 1 1 1 1 1 1 1 1 11 11111111 11111111 ",0ah,0 SplashMsg7 BYTE" 1 1 1 1 1 111111 11 1 1 ",0ah, " 1 1 1 1 1 1 1 11 1 1 ",0ah, " 1 1 1 1 1 1 1 11 1 1 ",0ah,0 SplashMsg8 BYTE" 1 1 1 1 1 1 1 11 1 1 ",0ah, " 1 1 1 1 1 1 1 11 1 1 ",0ah, "1111111111 11111 1 1 111111 1111111111 11111111 11111111 ",0ah,0 createdby BYTE "Created By Josh Rickard, Master of the Universe!",0 ;used with the second splash screen above playagain BYTE "Would you like to play again? (Y or N): ",0ah, 0 ;if you lose this will ask you to play again InstMsg1 BYTE "Welcome To Zombies!",0 ;instructions menu, print screen, must select yes to see it InstMsg2 BYTE "If you want to try and win follow these simple isntructions, ",0 InstMsg3 BYTE "but beware, you will die!!!!",0 InstMsg4 BYTE "1. Use your up, down, left, right or I, K, J, L keys on ",0 InstMsg5 BYTE "your keyboard",0 InstMsg6 BYTE "2. Avoid the Zombies!",0 InstMsg7 BYTE "3. Avoide the Pits!",0 InstMsg8 BYTE "4. Watch out, the more you win the harder it gets!",0 InstMsg9 BYTE "Good Luck! HAHAHAHAHAHA!!!!",0 levelmsg BYTE "Level ",0 diedmsg BYTE "You died of desentary! and falling into the pit!",0dh,0ah,0 ;if you fall into the pit, you have died message congratsmsg BYTE "Congrats! You Have Won!!!",0dh,0ah,0 ;if you win the entire game, you get this message, but you probably won't manwonmsg1 BYTE " ", 0ah, ;if you killed the zombie, you get this message " ", 0ah, " ", 0ah, " ", 0ah, " ", 0ah, " ", 0ah, " ", 0ah, " ", 0ah,0 manwonmsg2 BYTE " ", 0ah, " ", 0ah, " ", 0ah, " ", 0ah, " ", 0ah, " ", 0ah, " ", 0ah, " ", 0ah, " ", 0ah, " GOOD JOB! YOU WON!!!!! ",0ah,0 zomwonmsg1 BYTE " (()))",0ah, ;if the zombie kills you, you get this message. displays blood in red " / x x ",0ah, " /\( - )",0ah, ".-._/\/ ",0ah,0 zomwonmsg2 BYTE " /=`_'-'-'/ ",0 blooddrops1 BYTE "!! ",0ah,0 zomwonmsg3 BYTE " -{-_-_-} ",0 blooddrops2 BYTE"! ",0ah,0 zomwonmsg4 BYTE " (-{-_-_-} ",0 blooddrops3 BYTE"! ",0ah,0 zomwonmsg5 BYTE " \{_-_-_} ",0

blooddrops4 BYTE"! ",0ah,0 zomwonmsg6 BYTE " }-_-_-} ",0ah, " {-_ -_} ",0ah, " {-_ _-} ",0ah, " {_- -_} ",0ah, " {_- -_} ",0ah, " %%@ @%% ",0ah, " ",0ah, "Zombie ate man - NOM NOM NOM NOM!!!!",0ah,0 ;----.code ;this is the code section/main section of the program, it calls other procedures within ;---- main PROC call Splashy ;display a splash screen ;clears the screen for next splash screen color red ;using color macro from the top newgame: gameloop: mov dh, 10 mov dl, 25 mov edx, OFFSET firstmsg call ReadChar and al,11011111b cmp al,"y" jne newgame call InstructMe ;mov xycord, 5 cmp delval, 0 jbe youwin sub delval, 100 inc level color green mov dh, 10 mov dl, 35 mov edx,offset levelmsg movzx eax, level call WriteDec mov doneflag,0 call setupboard ;setting the height to print ;setting the width to print ;going to that spot/cursor position ;Do you need instructions ;printing do you need isntructions ;reading y or n or Y or N ;making it capital Y ;if yes then ;if not then go to newgame ;display instructions by calling procedure ;placing cursor position to print level ;NEW GAME LOOP, used to display a new game when you win or lose ;compare count to 0, if it is then you have won ;jump if count is zero, count is speed ;subtracting 100 from the time of 3000 ;incrementing the level, originally set to 0 ;clearing screen ;setting color to green ;printing level message ;printing the level number ;setting a delay of 3 seconds ;clear screen ;doneflag is used to check if messages are set or not ;set up game board, procedure ;start game loop

dozombie: gameover: call readkey jz dozombie call moveman cmp doneflag,0 je gameloop jne gameover dec delcnt jnz gameloop mov ax,delval mov delcnt,ax call movezom cmp doneflag,5 je newgame cmp doneflag,0 jne gameover je gameloop cmp doneflag, 40 je theend cmp doneflag, 41 je theend cmp doneflag, 50 je newgame cmp doneflag, 51 je theend youwin: theend: mov dh, 10 mov dl, 20 mov edx, OFFSET congratsmsg jmp askplayagain mov dh, 0 mov dl, 35 mov ebx, edx mov edx, OFFSET theendmsg theendloopscreen: mov eax, 300 mov edx, ebx cmp dh, 24 je askplayagain inc dh ;mov dl, 35 mov ebx, edx color red mov edx, OFFSET theendmsg ;see if man needs to move ;if not then jump to the zombie and let him move ;if yes then move the man ;check and see if the doneflag is set or not ;if it still equals 0, go back to gameloop ;if not then game over ;zombie is moving ;decrement the count ;if it is not zero then go to game loop and start over ;moving the delay value into ax ;moving ax, into delay count ;finally moving zombie ;if the doneflag is set to 5, start a new game ;jump to the top, means you won, the level ;if it is set to 0 ;if it is not set to 0 then gameover ;jump to the game loop ;gameover loop ;see what doneflag was set and jump to the appropriate loop ;you win loop ;printing out that you have won ;play again? ;the end loop to print The End! over and over

loop theendloopscreen askplayagain: mov dh, 10 mov dl, 20 mov edx, OFFSET playagain mov dh, 10 mov dl, 60 call ReadChar and al,11011111b cmp al,"y" mov delval, 2000 mov level, 0 je newgame and al, 11011111b cmp al, "N" jne askplayagain ;this is used to ask the player if they want to play again mov dh, 20 mov dl, 25 exit main ENDP ;the end of main ;---- ;Splashy Procedure to print out the splash screen ;---- splashy PROC ;printing splash screen mov edx, OFFSET SplashMsg1 mov edx, OFFSET SplashMsg2 mov edx, OFFSET SplashMsg3 mov edx, OFFSET SplashMsg4 call waitmsg mov eax, green + (black * 16) mov edx, OFFSET SplashMsg5 mov eax, green + (black * 16) mov edx, OFFSET SplashMsg6 mov eax, green + (black * 16) mov edx, OFFSET SplashMsg7 mov eax, green + (black * 16) mov edx, OFFSET SplashMsg8

mov dh, 15 mov dl, 15 mov edx, OFFSET createdby mov eax, green + (black * 16) splashy ENDP ;end of splashy procedure ;---- ;Instruct me to print out instructions ;---- instructme PROC call ScreenPos mov edx, OFFSET InstMsg1 mov edx, OFFSET InstMsg2 mov edx, OFFSET InstMsg3 mov edx, OFFSET InstMsg4 mov edx, OFFSET InstMsg5 mov edx, OFFSET InstMsg6 mov edx, OFFSET InstMsg7 mov edx, OFFSET InstMsg8 mov edx, OFFSET InstMsg9 call waitmsg instructme ENDP ;end of isntruct me menu ;---- ;Skipline Procedure skips lines when needed ;---- SkipLine PROC mov edx, OFFSET skiplinechar call ScreenPos SkipLine ENDP ;end of skip line procedure ;---- ;Screen Position Procedure is used to set the screen position, when needed

;---- ScreenPos PROC ;beginning of screen position function mov dh, xycord ;setting xycord to dh position mov dl, 10 ;setting 25 to dl position call Gotoxy ;calling Gotoxy to set the position inc xycord ;incrementing xycord position ;urning to main ScreenPos ENDP ;end of screen Position funciton ;---- ;SetupBoard is used within the main, from new game. THis procedure places the PitCharFull variable onto the positon of the last pit that a zombie has fell in. It also prints out the characters ;of the zombies, the man, and the original pit. All of this within the gamegrid. It is index with esi and produces accurate results ;---- setupboard PROC cld mov ecx,lengthof gamegrid mov esi,offset initgrid mov edi,offset gamegrid rep movsb mov dx, pitpos color cyan mov al, pitcharfull call WriteChar mov gamegrid[esi], pitcharfull call randomposition mov manpos,dx color gray mov al,manchar mov gamegrid[esi],manchar randomzomagain: call randomposition mov zompos, dx cmp dx, manpos je randomzomagain color green mov al,zomchar mov gamegrid[esi],zomchar randompitagain: call randomposition mov pitpos, dx cmp dx, manpos je randompitagain cmp dx, zompos je randompitagain color red mov al,pitcharempty mov gamegrid[esi],pitcharempty color white mov ax,delval mov delcnt,ax

setupboard ENDP ;---- ;moveman procedure is used to check key values and see if the man is moving or not. It will aslo make sure that the man does not move above the game grid or move down the game grid ;this procedure also sets doneflags that are used in main to see what the next step is. It also prints msgs based on if the zombie won or the man one. ;---- moveman PROC mov dx,manpos and al,11011111b ;Uppercase it jz Arrowcheck cmp al,"x" jne checkletters mov doneflag,47 jmp godone checkletters: cmp al,"i" je goup cmp al,"k" je godown cmp al,"j" je goleft cmp al,"l" je goright cmp al,"w" je goup cmp al,"s" je godown cmp al,"a" je goleft cmp al,"d" je goright Arrowcheck: cmp ah,48h je goup cmp ah,50h je godown cmp ah,4bh je goleft cmp ah,4dh je goright jmp godone goup: cmp dh,0 je godone dec dh jmp gomove godown: cmp dh,24 je godone inc dh jmp gomove goleft: cmp dl,0 je leftwrap dec dl jmp gomove leftwrap: mov dl,79 jmp gomove goright: cmp dl,79 je rightwrap inc dl jmp gomove rightwrap: mov dl,0 ;jmp gomove gomove: cmp gamegrid[esi],nochar jne mannogo mov gamegrid[esi],manchar push edx

mov dx,manpos mov gamegrid[esi],nochar mov al,nochar pop edx mov manpos,dx color gray mov al,manchar jmp godone mannogo: cmp gamegrid[esi], pitcharfull je godone cmp gamegrid[esi],wallchar je godone cmp gamegrid[esi],zomchar je maneaten cmp gamegrid[esi],pitcharempty je mandied jmp godone maneaten: mov edx,offset zomwonmsg mov doneflag,40 jmp godone mandied: mov edx,offset diedmsg mov doneflag,41 godone: color white moveman ENDP ;---- ;Movezom procedure is used to move the zombie around based on where the man has moved. It can move left, right, up, down, and diagonally. It cannot move up or down off of the screen ;It will aslo print messages if the man has died or the zombie has died, by the pit, or if the zombie ate the man. It also sets the currentpitpos so it can be reused to print the ;pitcharfull within the setupboard function ;---- movezom PROC mov ebx, esi mov dx,zompos mov esi, ebx ;blank out where he used to be mov al," " mov gamegrid[esi],nochar mov bx,manpos cmp dl,bl ja zomleft jb zomright jmp checkupdown zomleft: dec dl jmp checkupdown zomright: inc dl ;jmp movhim checkupdown:

cmp dh,bh ja zomup jb zomdown jmp movhim zomup: dec dh jmp movhim zomdown: inc dh jmp movhim movhim: cmp gamegrid[esi],nochar jne whynot mov ebx, esi mov zompos,dx mov esi, ebx stayput: mov gamegrid[esi],zomchar color green mov al,0cbh jmp zommoved whynot: cmp gamegrid[esi], pitcharfull je keeppitcharspot cmp gamegrid[esi],wallchar jne zompit mov dx,zompos jmp stayput zompit: cmp gamegrid[esi],pitcharempty jne zomman mov edx, OFFSET manwonmsg1 mov edx, OFFSET manwonmsg2 mov dx, fillpitpos mov doneflag,50 jmp zommoved zomman: call zomwonmsg mov doneflag,51 jmp zommoved keeppitcharspot: mov dx, fillpitpos mov doneflag,5 color red zommoved: movezom ENDP zomwonmsg PROC color green + (black * 16) mov edx,offset zomwonmsg1 mov edx, OFFSET zomwonmsg2 color red + (black * 16) mov edx, OFFSET blooddrops1 color green + (black * 16) mov edx, OFFSET zomwonmsg3 color red + (black * 16) mov edx, OFFSET blooddrops2 color green + (black * 16)

mov edx, OFFSET zomwonmsg4 color red + (black * 16) mov edx, OFFSET blooddrops3 color green + (black * 16) mov edx, OFFSET zomwonmsg5 color red + (black * 16) mov edx, OFFSET blooddrops4 color green + (black * 16) mov edx, OFFSET zomwonmsg6 zomwonmsg ENDP ;---- ;Ramdomposition procedure is setting random places for the man, zombie, and pit within the setupboard procedure. This will always randomize the placement of these characters ;---- randomposition PROC mov edx, 0 mov eax, 78 call randomrange mov dl, al mov eax, 23 call randomrange mov dh, al randomposition ENDP ;---- ;Getindex procedure is setting esi so that gamegrid knows where to look. this is crucial for the entire program, complicated ;---- getindex PROC ;*** urn index in esi push edx mov ax,80 mov bx,0 mov bl,dh mul bx pop edx mov ebx,0 mov bl,dl add eax,ebx mov esi,eax ;call dumpregs ;call waitmsg getindex ENDP ;80 columns in the grid ;clear the upper byte END main ;---- ;END OF THE PROGRAM ;*****Sorry for the lack of comments, I was finishing up the program instead of commenting. ;*****I know you don't like that but I do know what is happening in this program and wanted a good grade, but i guess I wont. ;----