TITLE PROMPT: EXTRN COURT_TYPE:BYTE, WHICH_COUNTRY:BYTE, WHICH_COUNTRY2:BYTE, VEL_X:WORD EXTRN VEL_X2:WORD PUBLIC QUESTIONS .MODEL SMALL .DATA LINE EQU 0AH CR EQU 0DH MSG DB CR,LINE,CR,LINE,CR,LINE MSG1 DB ' W E L C O M E T O E x T r E m E V O L L E Y B A L L' MSG2 DB CR,LINE,CR,LINE,CR,LINE MSG3 DB ' NO WHINERS OR THOSE FAINT OF HEART ALLOWED' PATENT DB CR,LINE,CR,LINE,CR,LINE,CR,LINE,CR,LINE,CR,LINE,CR,LINE,CR,LINE,CR,LINE,CR,LINE PATENT1 DB ' PATENT PENDING: NOT THAT YOU' PATENT2 DB CR,LINE PATENT3 DB ' WOULD WANT TO STEAL THIS PIECE OF SHIT!!!' SPACE DB CR,LINE,CR,LINE,'$' KEY_INPUT DB CR, LINE, 'press RETURN to continue.$' EXPL1 DB CR,LINE,CR,LINE, CR,LINE, ' This is a two player game, where the object' EXPL2 DB CR,LINE,CR,LINE,' is to prevent the ball from hitting your wall.' EXPL3a DB CR,LINE,CR,LINE,' If the ball hits the net (due to chance), the ball will' EXPL3 DB CR,LINE,CR,LINE,' bounce back. The top and bottom walls' EXPL4 DB CR,LINE,CR,LINE,' are fair game. The ball will bounce off the wall' EXPL5 DB CR,LINE,CR,LINE,' and still be in play. First person to reach 15' EXPL6 DB CR,LINE,CR,LINE,' wins.$' EXPL7 DB CR,LINE, CR, LINE,'Controls:' EXPL8 DB CR,LINE,CR,LINE,'UP ARROW: Move right player hand upward' EXPL9 DB CR,LINE,'DOWN ARROW: Move right player hand downward' EXPL10 DB CR,LINE,'TAB: Move left player hand upward' EXPL11 DB CR,LINE,'SHIFT: Move left player hand downward' EXPL12 DB CR,LINE,'ESC KEY: To exit the game$' QUES DB CR,LINE,CR,LINE,'What type of court do you want to play on:' QUES2 DB CR,LINE,'FIRE(1), WATER(2), NYC STREET(3), BEACH(4), OR GRASS(5)?$' QUES4a DB CR,LINE,CR,LINE,'Player One, what Country do you represent?$' QUES4b DB CR,LINE,CR,LINE,'Player Two, what Country do you represent?$' QUES5 DB CR,LINE,'USA(1), RUSSIA(2), CHINA(3), KUWAIT(4)$' QUES6 DB CR,LINE,'What level do both of you want to play at?' QUES7 DB CR,LINE,'(1), (2),(3), IMPOSSIBLE(4)$' ASSHOLE DB CR,LINE,'YOU STUPID ASSHOLE, READ THE FUCKING QUESTION!$' BIGGER_ASSHOLE DB CR,LINE,'BECAUSE YOU ARE SUCH AN IDIOT, YOU ARE' BIGGER_ASSHOLE2 DB CR,LINE,'AUTOMATICALLY KUWAIT!$' SPEED_ASS DB CR,LINE,'ALRIGHT SMART ASS, TRY CATCHING THE BALL' SPEED_ASS2 DB CR,LINE,'AT THIS SPEED!$' CL_SCRN DW CR,LINE,'$' .CODE QUESTIONS PROC ;Method: explains game to user, inaddition to prompting them for certain information ;input : COURT_TYPE, WHICH_COUNTRY, WHICH_COUNTRY2, VEL_X, VEL_X2 ;all the undecleared variables from main program ;output: COURT_TYPE, WHICH_COUNTRY, WHICH_COUNTRY2, VEL_X, VEL_X2 are all given ;values. LEA DX, MSG ;set dx to msg MOV AH, 9 ;display string function INT 21H ;display string LEA DX, KEY_INPUT ;set key_input to dx MOV AH,9 INT 21H ;display string MOV AH, 1 ;read key function INT 21H ;read key ;CLEARS SCREEN PUSH CX ;save cx MOV CX,13 ;repeat 13 times MOV AH,9 ;display string function LEA DX,CL_SCRN ;set dx to cl_scrn CLEAR1: INT 21H ;clear screen LOOP CLEAR1 ;repeat till 13 times POP CX ;restore cx ;END OF CLEARING SCREEN LEA DX, EXPL1 ;set dx to expl1 MOV AH,9 INT 21H ;display expl1 LEA DX, KEY_INPUT ;set dx to key_input MOV AH,9 INT 21H MOV AH, 1 INT 21H ;wait for key (see above) ;CLEARS SCREEN ;see above PUSH CX MOV CX,25 ;repeat 25 times MOV AH,9 LEA DX,CL_SCRN CLEAR2: INT 21H LOOP CLEAR2 POP CX ;END OF CLEARING SCREEN LEA DX, EXPL7 ;display expl7 (see above) MOV AH,9 INT 21H LEA DX, KEY_INPUT MOV AH,9 INT 21H MOV AH, 1 INT 21H ;wait for key (see above) ;CLEARS SCREEN ;see above PUSH CX MOV CX,25 CLEAR3: LEA DX,CL_SCRN MOV AH,9 INT 21H LOOP CLEAR3 POP CX ;END OF CLEARING SCREEN COURT: ;select court LEA DX, QUES ;set dx to ques MOV AH, 9 ;display string function INT 21H ;display string MOV AH, 1 INT 21H ;wait for key CMP AL, 49 JL TEMP_COURT ;did user press wrong key CMP AL, 53 JG TEMP_COURT SUB AL, 30H ;make ascii code into read number MOV COURT_TYPE, AL ;move number into court_type JMP COUNTRY ;next question TEMP_COURT: ;wrong key LEA DX, ASSHOLE ;prompt for court again MOV AH, 9 INT 21H JMP COURT COUNTRY: ;which country do you want to be? ;CLEARS SCREEN ;see above PUSH CX MOV CX,25 CLEAR4: LEA DX,CL_SCRN MOV AH,9 INT 21H LOOP CLEAR4 POP CX ;END OF CLEARING SCREEN LEA DX, QUES4A ;set dx equal to ques4a MOV AH, 9 INT 21H ;display ques4a LEA DX, QUES5 MOV AH, 9 INT 21H ;display ques5 MOV AH, 1 INT 21H CMP AL, 49 ;did user press wrong key JL TEMP_COUNTRY CMP AL, 52 JG TEMP_COUNTRY SUB AL, 30H ;convert to real number MOV WHICH_COUNTRY, AL ;move into which_country JMP COUNTRY2 ;next player TEMP_COUNTRY: ;wrong key pressed, make kuwait LEA DX, BIGGER_ASSHOLE MOV AH, 9 INT 21H MOV WHICH_COUNTRY, 4 COUNTRY2: ;select country for player two, ;see above for comments ;CLEARS SCREEN PUSH CX MOV CX,25 CLEAR5: LEA DX,CL_SCRN MOV AH,9 INT 21H LOOP CLEAR5 POP CX ;END OF CLEARING SCREEN LEA DX, QUES4B MOV AH, 9 INT 21H LEA DX, QUES5 MOV AH, 9 INT 21H MOV AH, 1 INT 21H CMP AL, 49 JL TEMP_COUNTRY2 CMP AL, 52 JG TEMP_COUNTRY2 SUB AL, 30H MOV WHICH_COUNTRY2, AL JMP SPEED TEMP_COUNTRY2: LEA DX, BIGGER_ASSHOLE MOV AH, 9 INT 21H MOV WHICH_COUNTRY2, 4 SPEED: ;select speed of ball (difficulty) ;CLEARS SCREEN ;clear screen (see above) PUSH CX MOV CX,25 CLEAR6: LEA DX,CL_SCRN MOV AH,9 INT 21H LOOP CLEAR6 POP CX ;END OF CLEARING SCREEN LEA DX, QUES6 ;set dx to ques6 MOV AH, 9 INT 21H ;display ques6 MOV AH, 1 INT 21H ;read key CMP AL, 49 ;press wrong key? JL TEMP_SPEED CMP AL, 52 JG TEMP_SPEED SUB AL, 30H CMP AL, 1 ;if 1 pressed, jump to speed1 JE SPEED1 CMP AL, 2 JE SPEED2 ;if 2 pressed, jump to speed2 CMP AL, 3 JE SPEED3 ;if 3 pressed, jump to speed3 CMP AL, 4 JE SPEED4 ;if 4 pressed, jump to speed4 TEMP_SPEED: ;wrong key LEA DX, SPEED_ASS MOV AH, 9 INT 21H MOV VEL_X, -25 ;automatically make speed -25 JMP SET_CHECK SPEED1: ;set speed to -5 MOV VEL_X, -5 JMP SET_CHECK SPEED2: ;set speed to -10 MOV VEL_X, -10 JMP SET_CHECK SPEED3: ;set speed to -15 MOV VEL_X, -15 JMP SET_CHECK SPEED4: ;set speed to -20 MOV VEL_X, -20 SET_CHECK: VELOCITY2: ;create vel_2 so can vel_x can be PUSH BX ;reset at each round MOV BX, VEL_X MOV VEL_X2, BX POP BX ;CLEARS SCREEN ;clear screen, see above PUSH CX MOV CX,25 CLEAR7: LEA DX,CL_SCRN MOV AH,9 INT 21H LOOP CLEAR7 POP CX ;END OF CLEARING SCREEN RET QUESTIONS ENDP ;end of questions procedure END