Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 10

Graphical Calculator

In Assembly Language
Introduction:

• We have made a simple calculator with graphics in Assembly


Language.
• It can perfom four operations.
1. Addition
2. Subtraction
3. Multiplication
4. Division
• Moreover It can deal with upto 40 digits.
Macro:
• A macro is a sequence of instructions, assigned by a
name and could be used anywhere in the program.
• In MASM, macros are defined with macro and endm
directives.
• Syntax:
FunctionName Macro parameters

endm
Local:

• We use Local keyword to define Labels in Macro function


• Syntax:
Local L1,L2,L3,…Ln
L1:
VIDEO Programming with INT 10h

•Basic Background
•Controlling the Color
•INT 10h Video Functions
INT 10h Video Functions

• AH register contains the function number


•00h:
Set video mode
text modes
graphics modes
• Al register contains the function number
• 13h:
Initiate Graphical mode
INT 10h Pixel-Related Functions

• AH register contains the function number


• 0Ch: Write graphics pixel
• 0Dh: Read graphics pixel
Mouse Programming

• Reset Mouse and Get Status


•INT 33h, AX = 0
•Example:
mov ax,0
int33h
Set Background:

• 0BH Functioning
MOV AH,0BH ;request for set background or border color
MOV BH,0H ;set backcolor & border color in graphic mode but
border color in text mode
MOV BL,3 ;color value in bits 0-3(00-0FH)
INT 10H
The End

You might also like