SlideShare a Scribd company logo
SUBMITTED BY-
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
SUBMITTED TO-
Ms. Bashira Akter
Anima
Lecturer, Dep. Of CSE,
Daffodil International
UniversityDate of Submission: 18th
December, 2016
PROJECT REPORT ON “TRICKY MATH PUZZLE”
COURSE: MICROPROCESSOR &ASSEMBLY
LANGUAGE
COURSE CODE: CSE 231
Abstract & Hints:
The purposeof this projectis to design and build a math puzzlegame that will
give user the experience of solving various tricky math puzzlethrough gaming.
This was achieved through severalsteps. In background, weused programming
language Assembly. Instructions likeconditions, loops, call procedure& various
types of registers and their uses, whatwe learned throughoutour courses.
What is assembly language?
An assembly languageis a programming language that can be used to directly tell
the computer what to do. An assembly language is almostexactly like
the machine language that a computer can understand, except that it uses words
in place of numbers. A computer cannot really understand an assembly program
directly. However, it can easily change the programinto machine code by
replacing the words of the programwith the numbers that they stand for. A
programthat does that is called an assembler. Programs written in assembly
language are usually made of instructions, which are small tasks that the
computer performs when it is running the program. They are called instructions
because the programmer uses them to instruct the computer whatto do. The part
of the computer that follows the instructions is the processor. Theassembly
language of a computer is a low-level language, which means that it can only be
used to do the simple tasks that a computer can understand directly. In order to
performmore complex tasks, onemust tell the computer each of the simple tasks
that are part of the complex task. For example, a computer does not understand
how to printa sentence on its screen. Instead, a programwritten in assembly
must tell it how to do all of the small steps that are involved in printing the
sentence.
Strengthof assembly language:
1. The symbolic programming of Assembly Languageis easier to understand
and saves a lot of time and effortof the programmer.
2. Itis easier to correct errors and modify programinstructions.
3. Assembly Languagehas the sameefficiency of execution as the machine
level language. Because this is one-to-onetranslator between assembly
language programand its corresponding machinelanguage program.
Disadvantages of assembly language:
1. One of the major disadvantages is that assembly language is machine
dependent. A programwritten for one computer might not run in other
computers with different hardwareconfiguration.
Project Description&Demo:
When we startthe game “Tricky Math Puzzle” we will have a POP-Up window
showing this menu.
The firstthree options in this menu is our game segments.
If you chooseoption 1. you will get enter into math teaser game segment. In math
teaser segment we put somediscretional tricky mathematical question as like
puzzle.
Something like this,
Here we have multiple choice option. Herethe correctanswer is number two (2).
So you have to input number two (2) fromyour key board. Thus you will get your
correctanswer and your point one (1) which we will be regarded for each correct
answer.
Whether you give the right or the wrong answer you will automatically have the
next puzzleafter answering previous one. Becauseof we are in the developing
state of our game so we justput five puzzles into firsttwo segments. Farther
puzzlewill be coming soon. When you will be able to answer all this five question
you will get all the points and encouraged to go into our next segment which is
sequence and assumption.
This is the choice number two on the game menu. In this segment the gamer will
have to face some sortof sequentially math puzzle.
So here this is the sample of a question. You have to give your assumption to
complete the sequence. So we can see this is a Fibonacci series and complete the
sequence the answer will be number three (3) and you will have your point.
The third or final segment of our game is the mostinteresting one. Here we test
our player assumption skill.
You will be asked to guess and input 3 digits. In programlogic unit it automatically
generate 3 randomdigits and compare/match with your imputed digits. If 1 digit
will match, you will get 100$.If 2 digitwill match, you will get 1000$. If 3 digit will
match, you will get 10000$.Herewecan see 1 digit will match and he/she get
100$. If anyonecan play again you press 1.
If the gamer need any help he justhaveto get into choice 4 for help like how to
operate this game, how to operate this menu and how to play this game whatI
justmention above. If you wantto exit you justpress 5.
The Work Flow:
Background of Project:
Conditional execution in assembly language is accomplished by severallooping
and branching instructions. Theseinstructions can change the flow of control in a
program. Conditionalexecution is observed in two scenarios −
SN Conditional Instructions
1 Unconditional jump
This is performed by the JMP instruction. Conditional execution often
involves a transfer of control to the address of an instruction that does
not follow the currently executing instruction. Transfer of control may
be forward, to execute a new set of instructions or backward, to re-
execute the samesteps.
2 Conditional jump
This is performed by a set of jump instructions j<condition> (i.e. JNZ, JE,
JG etc.) depending upon the condition. The conditional instructions
transfer the control by breaking the sequential flow and they do it by
changing the offsetvalue in IP.
Let us discuss theCMP instruction beforediscussing the conditional instructions.
CMP Instruction:
The CMP instruction compares two operands. Itis generally used in conditional
execution. This instruction basically subtracts oneoperand fromthe other for
comparing whether the operands are equal or not. Itdoes not disturb the
destination or sourceoperands. Itis used along with the conditional jump
instruction for decision making.
Syntax
CMP destination, source
CMP compares two numeric data fields. The destination operand could be either
in register or in memory. The sourceoperand could be a constant (immediate)
data, register or memory.
JMP Instructions:
The JMP (Jump)instruction causes an unconditional transfer of control
(unconditional jump). Such an instruction transfers the flow of execution by
changing the instruction pointer register. There are several different opcodes that
performa jump; depending on whether the processor is in real mode or
protected mode, and an overrideinstruction is used, the instructions may take 16-
bit, 32-bit, or segment: offsetpointers.
The syntax is,
JMP destination
Where destination is usually a label in the samesegment as the JMP itself. JMP
can be used to get around the range restriction of a conditional jump.
Conditional Jump:
If somespecified condition is satisfied in conditional jump, the controlflow is
transferred to a target instruction. There are numerous conditional jump
instructions depending upon the condition and data.
For an example,
CMP AL, BL
JE EQUAL
CMP AL, BH
JE EQUAL
CMP AL, CL
JE EQUAL
NON_EQUAL: ...
EQUAL:...
Use of CMP and JMP instruction in our project:
MOV AH,1 ; MENU CHOICE
INT21H
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
Loop Instructions:
A loop is a sequence of instructions that is repeated. The number of times to
repeat may be known in advance, or it may depend on conditions.
FORLOOP:
This is a loop structurein which the loop statements are repeated a known
number of times (a count-controlled loop). In pseudocodes,
FORloop_ counttimes DO
Statements
END_FOR
The LOOP instruction can be used to implement a FOR loop. Ithas
the form,
LOOP destination_ label
WHILELOOP:
This loop depends on a condition. In pseudocode,
WHILEcondition DO
Statements
END WHILE
REPEAT LOOP:
Another conditional loop is the REPEAT LOOP. In pseudocode,
REPEAT
Statements
UNTIL condition
Use of Loop instructions in our project:
MOV CX,3
MOV BL,'0‘
AGAIN:
MOV AH,1
INT21H
CMP AL,RANDOMNUM1
JE MATCH
CMP AL, RANDOMNUM2
JE MATCH
CMP AL, RANDOMNUM3
JE MATCH
LOOP AGAIN
JMP RESULT
MATCH:
INC BL
LOOP AGAIN
RESULT:
Procedures:
Procedures or subroutines are very important in assembly language, as the
assembly language programs tend to be large in size. Procedures are identified
by a name. Following this name, the body of the procedure is described which
performs a well-defined job. End of the procedure is indicated by a return
statement.
Following is the syntax to define a procedure −
proc_name:
procedurebody
...
ret
The procedureis called fromanother function by using the CALL instruction. The
CALL instruction should havethe name of the called procedureas an argument as
shown below −
CALL proc_name
The called procedurereturns the controlto the calling procedureby using the RET
instruction.
Use of CALL PROC in our project:
NEW_LINEPROC ; NEW LINEPRINTPROCEDURE
MOV AH,2
MOV DL,0AH
INT21H
MOV DL,0DH
INT21H
RET
………………………………………….
CALL NEW_LINE
INT10h:
INT10h, INT10H or INT16 is shorthand for BIOS interruptcall 10hex, the 17th
interrupt vector in an x86-based computer system. TheBIOS typically sets up a
real mode interrupt handler at this vector that provides video services. Such
services include setting the video mode, character and string output, and graphics
primitives (reading and writing pixels in graphics mode).
To use this call, load AH with the number of the desired sub function, load other
required parameters in other registers, and make the call. INT10h is slow, so
many programs bypass this BIOS routineand access the display hardwaredirectly.
Setting the video mode, which is done infrequently, can be accomplished by using
the BIOS, whiledrawing graphics on the screen in a game needs to be done
quickly, so direct access to video RAM is moreappropriate than making a BIOS call
for every pixel.
Function:
Scroll up window AH=06h AL = lines to scroll(0 = clear, CH, CL, DH, DL are
used),
BH = Background Color and Foreground color. BH = 43h, means that background
color is red and foreground color is cyan. Refer the BIOS color attributes
CH = Upper row number, CL = Left column number, DH = Lower row number, DL =
Right column number.
Clear screen procedure:
CLRSCR PROC ; CLEAR SCREEN PROCEDURE
MOV AX,0600H ;06 TO SCROLL & 00 FORFULL CLEAR SCREEN
MOV BH,07H ;ATTRIBUTE0 FORBACKGROUND AND 7 FOR FOREGROUND
MOV CX,0000H ;STARTING COORDINATES
MOV DX,184FH ;ENDING COORDINATES
INT10H ;FOR VIDEO DISPLAY
RET
Function of INT1Ah:
1Ah Real Time Clock Services
AH Description
00h Read RTC
01h Set RTC
02h Read RTC Time
03h Set RTC Time
04h Read RTC Date
05h Set RTC Date
06h Set RTC Alarm
07h Reset RTC Alarm
Random no generate procedureusing 00h:
RANDOMPROC ; GENERATE A RANDOMNO USING THE SYSTEMTIME
MOV AH, 00h ; INTERRRUPTS TO GET SYSTEM TIME
INT1AH ; CX:DX NOW HOLD NUMBER OF CLOCK TICKS SINCE
MIDNIGHT
MOV AX, DX
XOR DX, DX
MOV CX, 10
DIV CX ; HERE DX CONTAINS THEREMINDEROF THE DIVISIONFROM
0 TO 9
ADD DL,'0' ; TO ASCII FROM'0'TO '9'
MOV BL,DL
RET
Project showing/ Interface:
Tricky math puzzleis a game made by assembly language. We made it with a
lucrative interface as wecould. Actually, assembly language doesn’t give as
opportunities as any other high level languages. After all, our game had very user
friendly interface wethink. In addition-
 For being in assembly languageits procedureis so speedy.
 Though it is a small project, but we tried to make it bug free. And we also
confidently say that is has no bug in our game!
 It’s an interesting game, no doubt! Is has three segments full of
enjoyment.
 Itcan be said a brain game. We tried to make it logical so that one can
stormhis/ her brain through our game.
Future Planning:
Actually, wemade it in very shorttime. Though we full filled all of our
expectations, we have somefuture plan about our game. We may develop it by
any other high level language like C++/Java or with Unity. The features may have
in our next version like bellow-
 A significant partof gaming is its graphics quality. So, we musthave a
lucrative graphicalinterface.
 Now artificial interface is a hot cake in gaming world. We will try to add AI
features in our next version.
 We may add many more segments and events in our game.
 We may develop morestages and will update everything day by day.
------- Thank you! -------

More Related Content

What's hot

Introduction to Programming and QBasic Tutorial
Introduction to Programming and QBasic TutorialIntroduction to Programming and QBasic Tutorial
Introduction to Programming and QBasic Tutorial
nhomz
 
Introduction to QBASIC programming and basics
Introduction to QBASIC programming  and basicsIntroduction to QBASIC programming  and basics
Introduction to QBASIC programming and basics
Arunima Education Foundation
 
Introduction to qbasic
Introduction to qbasicIntroduction to qbasic
Introduction to qbasic
Richa Karthikeyan
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
Aiman Hud
 
Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
Trivuz ত্রিভুজ
 
Program concep sequential statements
Program concep sequential statementsProgram concep sequential statements
Program concep sequential statements
ankurkhanna
 
Programming in c
Programming in cProgramming in c
Programming in c
vishnu973656
 
Qbasic tutorial
Qbasic tutorialQbasic tutorial
Qbasic tutorial
jovelleluzon
 
Problem solving using Computer
Problem solving using ComputerProblem solving using Computer
Problem solving using Computer
David Livingston J
 
Introduction to problem solving in c++
Introduction to problem solving in c++Introduction to problem solving in c++
Introduction to problem solving in c++
Online
 
Program design and problem solving techniques
Program design and problem solving techniquesProgram design and problem solving techniques
Program design and problem solving techniques
Dokka Srinivasu
 
Problem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to CProblem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to C
Prabu U
 
Fundamental Programming Lect 1
Fundamental Programming Lect 1Fundamental Programming Lect 1
Fundamental Programming Lect 1
Namrah Erum
 
Mcs lec2
Mcs lec2Mcs lec2
Mcs lec2
Faiza Gull
 
QBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern ProgrammingQBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern Programming
Gifty Belle Manaois
 
The Knowledge of QBasic
The Knowledge of QBasicThe Knowledge of QBasic
The Knowledge of QBasic
Enelrah Vanna Dela Cruz
 
Fundamentals of Programming Chapter 2
Fundamentals of Programming Chapter 2Fundamentals of Programming Chapter 2
Fundamentals of Programming Chapter 2
Mohd Harris Ahmad Jaal
 
10th class computer science notes in english by cstechz
10th class computer science notes in english by cstechz10th class computer science notes in english by cstechz
10th class computer science notes in english by cstechz
Shahbaz Ahmad
 
Cp 111 lecture 2
Cp 111 lecture 2Cp 111 lecture 2
Cp 111 lecture 2
HafidhyMasoud
 
Computer programing 111 lecture 2
Computer programing 111 lecture 2Computer programing 111 lecture 2
Computer programing 111 lecture 2
ITNet
 

What's hot (20)

Introduction to Programming and QBasic Tutorial
Introduction to Programming and QBasic TutorialIntroduction to Programming and QBasic Tutorial
Introduction to Programming and QBasic Tutorial
 
Introduction to QBASIC programming and basics
Introduction to QBASIC programming  and basicsIntroduction to QBASIC programming  and basics
Introduction to QBASIC programming and basics
 
Introduction to qbasic
Introduction to qbasicIntroduction to qbasic
Introduction to qbasic
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
 
Program concep sequential statements
Program concep sequential statementsProgram concep sequential statements
Program concep sequential statements
 
Programming in c
Programming in cProgramming in c
Programming in c
 
Qbasic tutorial
Qbasic tutorialQbasic tutorial
Qbasic tutorial
 
Problem solving using Computer
Problem solving using ComputerProblem solving using Computer
Problem solving using Computer
 
Introduction to problem solving in c++
Introduction to problem solving in c++Introduction to problem solving in c++
Introduction to problem solving in c++
 
Program design and problem solving techniques
Program design and problem solving techniquesProgram design and problem solving techniques
Program design and problem solving techniques
 
Problem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to CProblem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to C
 
Fundamental Programming Lect 1
Fundamental Programming Lect 1Fundamental Programming Lect 1
Fundamental Programming Lect 1
 
Mcs lec2
Mcs lec2Mcs lec2
Mcs lec2
 
QBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern ProgrammingQBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern Programming
 
The Knowledge of QBasic
The Knowledge of QBasicThe Knowledge of QBasic
The Knowledge of QBasic
 
Fundamentals of Programming Chapter 2
Fundamentals of Programming Chapter 2Fundamentals of Programming Chapter 2
Fundamentals of Programming Chapter 2
 
10th class computer science notes in english by cstechz
10th class computer science notes in english by cstechz10th class computer science notes in english by cstechz
10th class computer science notes in english by cstechz
 
Cp 111 lecture 2
Cp 111 lecture 2Cp 111 lecture 2
Cp 111 lecture 2
 
Computer programing 111 lecture 2
Computer programing 111 lecture 2Computer programing 111 lecture 2
Computer programing 111 lecture 2
 

Viewers also liked

Maths puzzle
Maths puzzleMaths puzzle
Maths puzzle
Madhavi Mahajan
 
Ganit Week by Warda Grade X
Ganit Week by Warda Grade XGanit Week by Warda Grade X
Ganit Week by Warda Grade X
Mount Guide International
 
Muscular system
Muscular systemMuscular system
Muscular system
Srinivasreddy Patil
 
Math tricks
Math tricksMath tricks
Math tricks
Mohit Singla
 
Tricky math shortcut
Tricky math shortcutTricky math shortcut
Tricky math shortcut
Abhi world
 
DNA Function and Structure Notes
DNA Function and Structure NotesDNA Function and Structure Notes
DNA Function and Structure Notes
ericchapman81
 
MATH MAGIC
MATH MAGICMATH MAGIC
MATH MAGIC
LadyLou de Guzman
 
Introduction to Python Language and Data Types
Introduction to Python Language and Data TypesIntroduction to Python Language and Data Types
Introduction to Python Language and Data Types
Ravi Shankar
 
Coaxial cable
Coaxial cableCoaxial cable
Coaxial cable
Sanzid Kawsar
 
Sinusoidal oscillators
Sinusoidal oscillatorsSinusoidal oscillators
Sinusoidal oscillators
Touqeer Jumani
 
Protein Synthesis Notes
Protein Synthesis NotesProtein Synthesis Notes
Protein Synthesis Notes
ericchapman81
 
Vedic math
Vedic mathVedic math
Vedic math
Career_Clicks
 
Math magic, tricky math
Math magic, tricky mathMath magic, tricky math
Math magic, tricky math
Abhi world
 
Biology Form 5 Chapter 2 - Locomotion & support : 2.1 Part 2
Biology Form 5 Chapter 2 - Locomotion & support : 2.1 Part 2Biology Form 5 Chapter 2 - Locomotion & support : 2.1 Part 2
Biology Form 5 Chapter 2 - Locomotion & support : 2.1 Part 2
Nirmala Josephine
 
RHEUMATOID ARTHRITIS BY DR BASHIR AHMED DAR ASSOCIATE PROFESSOR MEDICINE SOPO...
RHEUMATOID ARTHRITIS BY DR BASHIR AHMED DAR ASSOCIATE PROFESSOR MEDICINE SOPO...RHEUMATOID ARTHRITIS BY DR BASHIR AHMED DAR ASSOCIATE PROFESSOR MEDICINE SOPO...
RHEUMATOID ARTHRITIS BY DR BASHIR AHMED DAR ASSOCIATE PROFESSOR MEDICINE SOPO...
Prof Dr Bashir Ahmed Dar
 
Rheumatoid Arthritis Power Point
Rheumatoid Arthritis Power PointRheumatoid Arthritis Power Point
Rheumatoid Arthritis Power Point
steverluce
 
Human Skeletal System
Human Skeletal SystemHuman Skeletal System
Human Skeletal System
guest94b8a5
 
Rheumatoid arthritis
Rheumatoid arthritisRheumatoid arthritis
Rheumatoid arthritis
Vignesvararajah Lokeesan
 
Psychometric Assessment
Psychometric Assessment Psychometric Assessment
Psychometric Assessment
Mental Health Center
 
Human skeletal system - Movement and Locomotion
Human skeletal system - Movement and LocomotionHuman skeletal system - Movement and Locomotion
Human skeletal system - Movement and Locomotion
rajkamble
 

Viewers also liked (20)

Maths puzzle
Maths puzzleMaths puzzle
Maths puzzle
 
Ganit Week by Warda Grade X
Ganit Week by Warda Grade XGanit Week by Warda Grade X
Ganit Week by Warda Grade X
 
Muscular system
Muscular systemMuscular system
Muscular system
 
Math tricks
Math tricksMath tricks
Math tricks
 
Tricky math shortcut
Tricky math shortcutTricky math shortcut
Tricky math shortcut
 
DNA Function and Structure Notes
DNA Function and Structure NotesDNA Function and Structure Notes
DNA Function and Structure Notes
 
MATH MAGIC
MATH MAGICMATH MAGIC
MATH MAGIC
 
Introduction to Python Language and Data Types
Introduction to Python Language and Data TypesIntroduction to Python Language and Data Types
Introduction to Python Language and Data Types
 
Coaxial cable
Coaxial cableCoaxial cable
Coaxial cable
 
Sinusoidal oscillators
Sinusoidal oscillatorsSinusoidal oscillators
Sinusoidal oscillators
 
Protein Synthesis Notes
Protein Synthesis NotesProtein Synthesis Notes
Protein Synthesis Notes
 
Vedic math
Vedic mathVedic math
Vedic math
 
Math magic, tricky math
Math magic, tricky mathMath magic, tricky math
Math magic, tricky math
 
Biology Form 5 Chapter 2 - Locomotion & support : 2.1 Part 2
Biology Form 5 Chapter 2 - Locomotion & support : 2.1 Part 2Biology Form 5 Chapter 2 - Locomotion & support : 2.1 Part 2
Biology Form 5 Chapter 2 - Locomotion & support : 2.1 Part 2
 
RHEUMATOID ARTHRITIS BY DR BASHIR AHMED DAR ASSOCIATE PROFESSOR MEDICINE SOPO...
RHEUMATOID ARTHRITIS BY DR BASHIR AHMED DAR ASSOCIATE PROFESSOR MEDICINE SOPO...RHEUMATOID ARTHRITIS BY DR BASHIR AHMED DAR ASSOCIATE PROFESSOR MEDICINE SOPO...
RHEUMATOID ARTHRITIS BY DR BASHIR AHMED DAR ASSOCIATE PROFESSOR MEDICINE SOPO...
 
Rheumatoid Arthritis Power Point
Rheumatoid Arthritis Power PointRheumatoid Arthritis Power Point
Rheumatoid Arthritis Power Point
 
Human Skeletal System
Human Skeletal SystemHuman Skeletal System
Human Skeletal System
 
Rheumatoid arthritis
Rheumatoid arthritisRheumatoid arthritis
Rheumatoid arthritis
 
Psychometric Assessment
Psychometric Assessment Psychometric Assessment
Psychometric Assessment
 
Human skeletal system - Movement and Locomotion
Human skeletal system - Movement and LocomotionHuman skeletal system - Movement and Locomotion
Human skeletal system - Movement and Locomotion
 

Similar to Tricky math puzzle project report

265 ge8151 problem solving and python programming - 2 marks with answers
265   ge8151 problem solving and python programming - 2 marks with answers265   ge8151 problem solving and python programming - 2 marks with answers
265 ge8151 problem solving and python programming - 2 marks with answers
vithyanila
 
4 coding from algorithms
4 coding from algorithms4 coding from algorithms
4 coding from algorithms
hccit
 
Beekman5 std ppt_13
Beekman5 std ppt_13Beekman5 std ppt_13
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
MMRF2
 
program-control-instruction.pdf
program-control-instruction.pdfprogram-control-instruction.pdf
program-control-instruction.pdf
BapanKar2
 
Introduction to computer science ch3 programming
Introduction to computer science ch3 programmingIntroduction to computer science ch3 programming
Introduction to computer science ch3 programming
Mohamed Essam
 
Problem Solving Techniques
Problem Solving TechniquesProblem Solving Techniques
Problem Solving Techniques
Ashesh R
 
ES-CH5.ppt
ES-CH5.pptES-CH5.ppt
ES-CH5.ppt
alaakaraja1
 
What is algorithm
What is algorithmWhat is algorithm
What is algorithm
mshoaib15
 
Fundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptxFundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptx
Eyasu46
 
Fundamental of Information Technology - UNIT 6
Fundamental of Information Technology - UNIT 6Fundamental of Information Technology - UNIT 6
Fundamental of Information Technology - UNIT 6
Shipra Swati
 
Assembly Language Programming
Assembly Language ProgrammingAssembly Language Programming
Assembly Language Programming
Niropam Das
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
Elizabeth de Leon Aler
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
Prof. Erwin Globio
 
NIE2206 Electronic LogbookNamexxxStudent IDUxxxTe.docx
NIE2206 Electronic LogbookNamexxxStudent IDUxxxTe.docxNIE2206 Electronic LogbookNamexxxStudent IDUxxxTe.docx
NIE2206 Electronic LogbookNamexxxStudent IDUxxxTe.docx
curwenmichaela
 
Lect 3-4 Zaheer Abbas
Lect 3-4 Zaheer AbbasLect 3-4 Zaheer Abbas
Lect 3-4 Zaheer Abbas
Information Technology Center
 
Ch1 principles of software development
Ch1 principles of software developmentCh1 principles of software development
Ch1 principles of software development
Hattori Sidek
 
LESSON__1-15 C-PROGRAMMING.p algorithm df
LESSON__1-15 C-PROGRAMMING.p algorithm dfLESSON__1-15 C-PROGRAMMING.p algorithm df
LESSON__1-15 C-PROGRAMMING.p algorithm df
AparnaPriyadarsiniMe
 
APP_Unit 1_updated.pptx
APP_Unit 1_updated.pptxAPP_Unit 1_updated.pptx
APP_Unit 1_updated.pptx
gogulram2
 
Lesson 1 - Introduction to Computer Programming.pptx
Lesson 1 - Introduction to Computer Programming.pptxLesson 1 - Introduction to Computer Programming.pptx
Lesson 1 - Introduction to Computer Programming.pptx
Neil Mutia
 

Similar to Tricky math puzzle project report (20)

265 ge8151 problem solving and python programming - 2 marks with answers
265   ge8151 problem solving and python programming - 2 marks with answers265   ge8151 problem solving and python programming - 2 marks with answers
265 ge8151 problem solving and python programming - 2 marks with answers
 
4 coding from algorithms
4 coding from algorithms4 coding from algorithms
4 coding from algorithms
 
Beekman5 std ppt_13
Beekman5 std ppt_13Beekman5 std ppt_13
Beekman5 std ppt_13
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
 
program-control-instruction.pdf
program-control-instruction.pdfprogram-control-instruction.pdf
program-control-instruction.pdf
 
Introduction to computer science ch3 programming
Introduction to computer science ch3 programmingIntroduction to computer science ch3 programming
Introduction to computer science ch3 programming
 
Problem Solving Techniques
Problem Solving TechniquesProblem Solving Techniques
Problem Solving Techniques
 
ES-CH5.ppt
ES-CH5.pptES-CH5.ppt
ES-CH5.ppt
 
What is algorithm
What is algorithmWhat is algorithm
What is algorithm
 
Fundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptxFundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptx
 
Fundamental of Information Technology - UNIT 6
Fundamental of Information Technology - UNIT 6Fundamental of Information Technology - UNIT 6
Fundamental of Information Technology - UNIT 6
 
Assembly Language Programming
Assembly Language ProgrammingAssembly Language Programming
Assembly Language Programming
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
 
NIE2206 Electronic LogbookNamexxxStudent IDUxxxTe.docx
NIE2206 Electronic LogbookNamexxxStudent IDUxxxTe.docxNIE2206 Electronic LogbookNamexxxStudent IDUxxxTe.docx
NIE2206 Electronic LogbookNamexxxStudent IDUxxxTe.docx
 
Lect 3-4 Zaheer Abbas
Lect 3-4 Zaheer AbbasLect 3-4 Zaheer Abbas
Lect 3-4 Zaheer Abbas
 
Ch1 principles of software development
Ch1 principles of software developmentCh1 principles of software development
Ch1 principles of software development
 
LESSON__1-15 C-PROGRAMMING.p algorithm df
LESSON__1-15 C-PROGRAMMING.p algorithm dfLESSON__1-15 C-PROGRAMMING.p algorithm df
LESSON__1-15 C-PROGRAMMING.p algorithm df
 
APP_Unit 1_updated.pptx
APP_Unit 1_updated.pptxAPP_Unit 1_updated.pptx
APP_Unit 1_updated.pptx
 
Lesson 1 - Introduction to Computer Programming.pptx
Lesson 1 - Introduction to Computer Programming.pptxLesson 1 - Introduction to Computer Programming.pptx
Lesson 1 - Introduction to Computer Programming.pptx
 

More from Sanzid Kawsar

Introduction to Research
Introduction to Research Introduction to Research
Introduction to Research
Sanzid Kawsar
 
Data Mining Techniques
Data Mining TechniquesData Mining Techniques
Data Mining Techniques
Sanzid Kawsar
 
A* (aster) Search Algorithm
A* (aster) Search AlgorithmA* (aster) Search Algorithm
A* (aster) Search Algorithm
Sanzid Kawsar
 
Research on an Open-Source Software Platform for Autonomous Driving Systems
Research on an Open-Source Software Platform for Autonomous Driving SystemsResearch on an Open-Source Software Platform for Autonomous Driving Systems
Research on an Open-Source Software Platform for Autonomous Driving Systems
Sanzid Kawsar
 
Natural Language processing
Natural Language processingNatural Language processing
Natural Language processing
Sanzid Kawsar
 
Report on Phylogenetic tree
Report on Phylogenetic treeReport on Phylogenetic tree
Report on Phylogenetic tree
Sanzid Kawsar
 
Phylogenetic tree
Phylogenetic treePhylogenetic tree
Phylogenetic tree
Sanzid Kawsar
 

More from Sanzid Kawsar (7)

Introduction to Research
Introduction to Research Introduction to Research
Introduction to Research
 
Data Mining Techniques
Data Mining TechniquesData Mining Techniques
Data Mining Techniques
 
A* (aster) Search Algorithm
A* (aster) Search AlgorithmA* (aster) Search Algorithm
A* (aster) Search Algorithm
 
Research on an Open-Source Software Platform for Autonomous Driving Systems
Research on an Open-Source Software Platform for Autonomous Driving SystemsResearch on an Open-Source Software Platform for Autonomous Driving Systems
Research on an Open-Source Software Platform for Autonomous Driving Systems
 
Natural Language processing
Natural Language processingNatural Language processing
Natural Language processing
 
Report on Phylogenetic tree
Report on Phylogenetic treeReport on Phylogenetic tree
Report on Phylogenetic tree
 
Phylogenetic tree
Phylogenetic treePhylogenetic tree
Phylogenetic tree
 

Recently uploaded

DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
rpskprasana
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
Mukeshwaran Balu
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
nooriasukmaningtyas
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
sieving analysis and results interpretation
sieving analysis and results interpretationsieving analysis and results interpretation
sieving analysis and results interpretation
ssuser36d3051
 

Recently uploaded (20)

DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
sieving analysis and results interpretation
sieving analysis and results interpretationsieving analysis and results interpretation
sieving analysis and results interpretation
 

Tricky math puzzle project report

  • 1. SUBMITTED BY- 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 SUBMITTED TO- Ms. Bashira Akter Anima Lecturer, Dep. Of CSE, Daffodil International UniversityDate of Submission: 18th December, 2016 PROJECT REPORT ON “TRICKY MATH PUZZLE” COURSE: MICROPROCESSOR &ASSEMBLY LANGUAGE COURSE CODE: CSE 231
  • 2. Abstract & Hints: The purposeof this projectis to design and build a math puzzlegame that will give user the experience of solving various tricky math puzzlethrough gaming. This was achieved through severalsteps. In background, weused programming language Assembly. Instructions likeconditions, loops, call procedure& various types of registers and their uses, whatwe learned throughoutour courses. What is assembly language? An assembly languageis a programming language that can be used to directly tell the computer what to do. An assembly language is almostexactly like the machine language that a computer can understand, except that it uses words in place of numbers. A computer cannot really understand an assembly program directly. However, it can easily change the programinto machine code by replacing the words of the programwith the numbers that they stand for. A programthat does that is called an assembler. Programs written in assembly language are usually made of instructions, which are small tasks that the computer performs when it is running the program. They are called instructions because the programmer uses them to instruct the computer whatto do. The part of the computer that follows the instructions is the processor. Theassembly language of a computer is a low-level language, which means that it can only be used to do the simple tasks that a computer can understand directly. In order to performmore complex tasks, onemust tell the computer each of the simple tasks that are part of the complex task. For example, a computer does not understand how to printa sentence on its screen. Instead, a programwritten in assembly must tell it how to do all of the small steps that are involved in printing the sentence. Strengthof assembly language:
  • 3. 1. The symbolic programming of Assembly Languageis easier to understand and saves a lot of time and effortof the programmer. 2. Itis easier to correct errors and modify programinstructions. 3. Assembly Languagehas the sameefficiency of execution as the machine level language. Because this is one-to-onetranslator between assembly language programand its corresponding machinelanguage program. Disadvantages of assembly language: 1. One of the major disadvantages is that assembly language is machine dependent. A programwritten for one computer might not run in other computers with different hardwareconfiguration. Project Description&Demo: When we startthe game “Tricky Math Puzzle” we will have a POP-Up window showing this menu. The firstthree options in this menu is our game segments.
  • 4. If you chooseoption 1. you will get enter into math teaser game segment. In math teaser segment we put somediscretional tricky mathematical question as like puzzle. Something like this, Here we have multiple choice option. Herethe correctanswer is number two (2). So you have to input number two (2) fromyour key board. Thus you will get your correctanswer and your point one (1) which we will be regarded for each correct answer. Whether you give the right or the wrong answer you will automatically have the next puzzleafter answering previous one. Becauseof we are in the developing state of our game so we justput five puzzles into firsttwo segments. Farther puzzlewill be coming soon. When you will be able to answer all this five question you will get all the points and encouraged to go into our next segment which is sequence and assumption. This is the choice number two on the game menu. In this segment the gamer will have to face some sortof sequentially math puzzle.
  • 5. So here this is the sample of a question. You have to give your assumption to complete the sequence. So we can see this is a Fibonacci series and complete the sequence the answer will be number three (3) and you will have your point. The third or final segment of our game is the mostinteresting one. Here we test our player assumption skill. You will be asked to guess and input 3 digits. In programlogic unit it automatically generate 3 randomdigits and compare/match with your imputed digits. If 1 digit will match, you will get 100$.If 2 digitwill match, you will get 1000$. If 3 digit will match, you will get 10000$.Herewecan see 1 digit will match and he/she get 100$. If anyonecan play again you press 1. If the gamer need any help he justhaveto get into choice 4 for help like how to operate this game, how to operate this menu and how to play this game whatI justmention above. If you wantto exit you justpress 5.
  • 7.
  • 8. Background of Project: Conditional execution in assembly language is accomplished by severallooping and branching instructions. Theseinstructions can change the flow of control in a program. Conditionalexecution is observed in two scenarios − SN Conditional Instructions 1 Unconditional jump This is performed by the JMP instruction. Conditional execution often involves a transfer of control to the address of an instruction that does not follow the currently executing instruction. Transfer of control may be forward, to execute a new set of instructions or backward, to re- execute the samesteps.
  • 9. 2 Conditional jump This is performed by a set of jump instructions j<condition> (i.e. JNZ, JE, JG etc.) depending upon the condition. The conditional instructions transfer the control by breaking the sequential flow and they do it by changing the offsetvalue in IP. Let us discuss theCMP instruction beforediscussing the conditional instructions. CMP Instruction: The CMP instruction compares two operands. Itis generally used in conditional execution. This instruction basically subtracts oneoperand fromthe other for comparing whether the operands are equal or not. Itdoes not disturb the destination or sourceoperands. Itis used along with the conditional jump instruction for decision making. Syntax CMP destination, source CMP compares two numeric data fields. The destination operand could be either in register or in memory. The sourceoperand could be a constant (immediate) data, register or memory. JMP Instructions: The JMP (Jump)instruction causes an unconditional transfer of control (unconditional jump). Such an instruction transfers the flow of execution by changing the instruction pointer register. There are several different opcodes that performa jump; depending on whether the processor is in real mode or protected mode, and an overrideinstruction is used, the instructions may take 16- bit, 32-bit, or segment: offsetpointers. The syntax is,
  • 10. JMP destination Where destination is usually a label in the samesegment as the JMP itself. JMP can be used to get around the range restriction of a conditional jump. Conditional Jump: If somespecified condition is satisfied in conditional jump, the controlflow is transferred to a target instruction. There are numerous conditional jump instructions depending upon the condition and data. For an example, CMP AL, BL JE EQUAL CMP AL, BH JE EQUAL CMP AL, CL JE EQUAL NON_EQUAL: ... EQUAL:... Use of CMP and JMP instruction in our project: MOV AH,1 ; MENU CHOICE INT21H MOV CHOOSE,AL CMP AL,'1' JE MATH_TEASER
  • 11. CMP AL,'2' JE SEQUENCES CMP AL,'3' JE ASSUME_SKILL CMP AL,'4' JE HELP CMP AL,'5' JE EXIT Loop Instructions: A loop is a sequence of instructions that is repeated. The number of times to repeat may be known in advance, or it may depend on conditions. FORLOOP: This is a loop structurein which the loop statements are repeated a known number of times (a count-controlled loop). In pseudocodes, FORloop_ counttimes DO Statements END_FOR The LOOP instruction can be used to implement a FOR loop. Ithas the form, LOOP destination_ label WHILELOOP: This loop depends on a condition. In pseudocode, WHILEcondition DO
  • 12. Statements END WHILE REPEAT LOOP: Another conditional loop is the REPEAT LOOP. In pseudocode, REPEAT Statements UNTIL condition Use of Loop instructions in our project: MOV CX,3 MOV BL,'0‘ AGAIN: MOV AH,1 INT21H CMP AL,RANDOMNUM1 JE MATCH CMP AL, RANDOMNUM2 JE MATCH CMP AL, RANDOMNUM3 JE MATCH LOOP AGAIN JMP RESULT MATCH: INC BL
  • 13. LOOP AGAIN RESULT: Procedures: Procedures or subroutines are very important in assembly language, as the assembly language programs tend to be large in size. Procedures are identified by a name. Following this name, the body of the procedure is described which performs a well-defined job. End of the procedure is indicated by a return statement. Following is the syntax to define a procedure − proc_name: procedurebody ... ret The procedureis called fromanother function by using the CALL instruction. The CALL instruction should havethe name of the called procedureas an argument as shown below − CALL proc_name The called procedurereturns the controlto the calling procedureby using the RET instruction. Use of CALL PROC in our project: NEW_LINEPROC ; NEW LINEPRINTPROCEDURE MOV AH,2 MOV DL,0AH
  • 14. INT21H MOV DL,0DH INT21H RET …………………………………………. CALL NEW_LINE INT10h: INT10h, INT10H or INT16 is shorthand for BIOS interruptcall 10hex, the 17th interrupt vector in an x86-based computer system. TheBIOS typically sets up a real mode interrupt handler at this vector that provides video services. Such services include setting the video mode, character and string output, and graphics primitives (reading and writing pixels in graphics mode). To use this call, load AH with the number of the desired sub function, load other required parameters in other registers, and make the call. INT10h is slow, so many programs bypass this BIOS routineand access the display hardwaredirectly. Setting the video mode, which is done infrequently, can be accomplished by using the BIOS, whiledrawing graphics on the screen in a game needs to be done quickly, so direct access to video RAM is moreappropriate than making a BIOS call for every pixel. Function: Scroll up window AH=06h AL = lines to scroll(0 = clear, CH, CL, DH, DL are used), BH = Background Color and Foreground color. BH = 43h, means that background color is red and foreground color is cyan. Refer the BIOS color attributes
  • 15. CH = Upper row number, CL = Left column number, DH = Lower row number, DL = Right column number. Clear screen procedure: CLRSCR PROC ; CLEAR SCREEN PROCEDURE MOV AX,0600H ;06 TO SCROLL & 00 FORFULL CLEAR SCREEN MOV BH,07H ;ATTRIBUTE0 FORBACKGROUND AND 7 FOR FOREGROUND MOV CX,0000H ;STARTING COORDINATES MOV DX,184FH ;ENDING COORDINATES INT10H ;FOR VIDEO DISPLAY RET Function of INT1Ah: 1Ah Real Time Clock Services AH Description 00h Read RTC 01h Set RTC 02h Read RTC Time 03h Set RTC Time 04h Read RTC Date 05h Set RTC Date 06h Set RTC Alarm 07h Reset RTC Alarm
  • 16. Random no generate procedureusing 00h: RANDOMPROC ; GENERATE A RANDOMNO USING THE SYSTEMTIME MOV AH, 00h ; INTERRRUPTS TO GET SYSTEM TIME INT1AH ; CX:DX NOW HOLD NUMBER OF CLOCK TICKS SINCE MIDNIGHT MOV AX, DX XOR DX, DX MOV CX, 10 DIV CX ; HERE DX CONTAINS THEREMINDEROF THE DIVISIONFROM 0 TO 9 ADD DL,'0' ; TO ASCII FROM'0'TO '9' MOV BL,DL RET Project showing/ Interface: Tricky math puzzleis a game made by assembly language. We made it with a lucrative interface as wecould. Actually, assembly language doesn’t give as opportunities as any other high level languages. After all, our game had very user friendly interface wethink. In addition-  For being in assembly languageits procedureis so speedy.
  • 17.  Though it is a small project, but we tried to make it bug free. And we also confidently say that is has no bug in our game!  It’s an interesting game, no doubt! Is has three segments full of enjoyment.  Itcan be said a brain game. We tried to make it logical so that one can stormhis/ her brain through our game. Future Planning: Actually, wemade it in very shorttime. Though we full filled all of our expectations, we have somefuture plan about our game. We may develop it by any other high level language like C++/Java or with Unity. The features may have in our next version like bellow-  A significant partof gaming is its graphics quality. So, we musthave a lucrative graphicalinterface.  Now artificial interface is a hot cake in gaming world. We will try to add AI features in our next version.  We may add many more segments and events in our game.  We may develop morestages and will update everything day by day. ------- Thank you! -------