+ All Categories
Home > Engineering > Math Puzzle Game By Assembly Language

Math Puzzle Game By Assembly Language

Date post: 18-Jan-2017
Category:
Upload: sanzid-kawsar
View: 59 times
Download: 4 times
Share this document with a friend
23
Tricky Math Puzzle Team #NoFrazzle 1.Md Sanzidul Islam 151-15- 5223 2.Farhan Tawsif Chowdhury 151-15-4705 3.Nazmul Ahsan 151-15- 4668 4.Md. Mahbubur Rahman 151- 15-4761 5.Sadia Sultana Sharmin Mousumi 151-15-5191
Transcript
Page 1: Math Puzzle Game By Assembly Language

Tricky Math Puzzle

Team #NoFrazzle

1. Md Sanzidul Islam151-15-5223

2. Farhan Tawsif Chowdhury151-15-4705

3. Nazmul Ahsan151-15-4668

4. Md. Mahbubur Rahman151-15-4761

5. Sadia Sultana Sharmin Mousumi151-15-5191

Page 2: Math Puzzle Game By Assembly Language

-What is assembly language ?• A low level programming language• Can easily tell the computer what to do• Have to convert into machine language• Have to convert word into numbers• An assembler execute the program• Made of instructions

Introduction

Page 3: Math Puzzle Game By Assembly Language

-Strength :• easier to understand • saves a lot of time

and effort of the programmer.• easier to correct

errors and modify program instructions.• has the same

efficiency of execution as the machine level language.

Page 4: Math Puzzle Game By Assembly Language

-Disadvantages• Assembly language is

machine dependent. A program written for one computer might not run in other computers with different hardware configuration.

-Project Hints

1. Math Teaser2. Sequences3. Test

Assumption Skill

Page 5: Math Puzzle Game By Assembly Language

Project Details

Page 6: Math Puzzle Game By Assembly Language

-Segment

Page 7: Math Puzzle Game By Assembly Language

-Math Teaser

Page 8: Math Puzzle Game By Assembly Language

-Sequence & Assumption

Page 9: Math Puzzle Game By Assembly Language

Flow Chart

Page 10: Math Puzzle Game By Assembly Language

Start

Read Choice

Choice= 1?

Choice= 2?

Choice= 3?

Choice= 4?

Choice= 5?

Math Teaser Sequences Assumption Skill Help Exit

YesYes Yes Yes Yes

No No No No

Page 11: Math Puzzle Game By Assembly Language

Math Teaser Q1Print

Math Teaser Q3Print

Ans = C.A? Point = Point + 1

Math Teaser Q2Print

Ans = C.A? Point = Point + 1

Ans = C.A? Point = Point + 1

Answer input

Answer input

Answer input

Yes

No

Yes

No

Yes

No

Page 12: Math Puzzle Game By Assembly Language

Sequences Q1Print

Sequences Q2Print

Ans = C.A? Point = Point + 1

Sequences Q2Print

Ans = C.A? Point = Point + 1

Ans = C.A? Point = Point + 1

Answer input

Answer input

Answer input

Yes

No

Yes

No

Yes

No

Page 13: Math Puzzle Game By Assembly Language

Random NumberGenerate

Generate 1st Random Number

Generate 2nd Random Number

Generate 3rd Random Number

N = 1st RN ?

Input a Number

N = 1st RN ?

N = 1st RN ?

Price = Price + 1;

Yes

No No No

Yes Yes

Page 14: Math Puzzle Game By Assembly Language

Background

Page 15: Math Puzzle Game By Assembly Language

MOV AH,1 ; MENU CHOICE INT 21H MOV CHOOSE,AL CMP AL,'1' JE MATH_TEASER CMP AL,'2' JE SEQUENCES CMP AL,'3' JE ASSUME_SKILL CMP AL,'4' JE HELP CMP AL,'5' JE EXIT

- Use of JMP instruction

Page 16: Math Puzzle Game By Assembly Language

MOV CX,3 MOV BL,'0‘

AGAIN: MOV AH,1 INT 21H CMP AL,RANDOMNUM1 JE MATCH CMP AL, RANDOMNUM2 JE MATCH

- Use of LOOP instruction

CMP AL, RANDOMNUM3 JE MATCH LOOP AGAIN JMP RESULT

MATCH: INC BL LOOP AGAIN

RESULT:

Page 17: Math Puzzle Game By Assembly Language

NEW_LINE PROC ; NEW LINE PRINT PROCEDURE MOV AH,2 MOV DL,0AH INT 21H MOV DL,0DH INT 21H RET………………………………………….CALL NEW_LINE

- Use of CALL PROC

Page 18: Math Puzzle Game By Assembly Language

CLRSCR PROC ; CLEAR SCREEN PROCEDURE MOV AX,0600H ;06 TO SCROLL & 00 FOR FULL CLEAR SCREEN MOV BH,07H ;ATTRIBUTE 0 FOR BACKGROUND AND 7 FOR FOREGROUND MOV CX,0000H ;STARTING COORDINATES MOV DX,184FH ;ENDING COORDINATES INT 10H ;FOR VIDEO DISPLAYRET

- Clear screen procedure

Page 19: Math Puzzle Game By Assembly Language

RANDOM PROC ; GENERATE A RANDOM NO USING THE SYSTEM TIME MOV AH, 00h ; INTERRRUPTS TO GET SYSTEM TIME INT 1AH ; CX:DX NOW HOLD NUMBER OF CLOCK TICKS SINCE MIDNIGHT MOV AX, DX XOR DX, DX MOV CX, 10 DIV CX ; HERE DX CONTAINS THE REMINDER OF THE DIVISION FROM 0 TO 9 ADD DL,'0' ; TO ASCII FROM '0' TO '9' MOV BL,DLRET

- Random no generate procedure

Page 20: Math Puzzle Game By Assembly Language

Project showing & Conclusion

Page 21: Math Puzzle Game By Assembly Language

Lets see..!Who Is The Best Teaser Of This Day?

Page 22: Math Puzzle Game By Assembly Language

Conclusion Why We Are different?•Easy interface•Speedy•Simple But No Bug• Interesting•Logical

What's in Future?• Graphical Interface• Adding AI Features • Adding New Events• New Stages Of

Game

Page 23: Math Puzzle Game By Assembly Language

Thanks Everyone!With Many Many Wishes

For Victory Day…


Recommended