Showing posts with label Tasm Programming. Show all posts
Showing posts with label Tasm Programming. Show all posts

Wednesday, February 23, 2011

32 Bit addition of two numbers

.model small
.data
m1 db 10,13,'Enter 1st 32bit no: $'
m2 db 10,13,'Enter 2nd 32bit no: $'
m3 db 10,13,'Addition is: $'
n1 dw 0
n2 dw 0
n3 dw 0
n4 dw 0
n5 dw 0
n6 dw 0

16 bit addition

.model small
.data
m1 db 10,13,'Enter 1st no:$'
m2 db 10,13,'Enter 2nd no:$'
m3 db 10,13,'Answer is:$'
a dw 0
b dw 0
c dw 0
.code
mov ax,@data
mov ds,ax

mov ah,09h
lea dx,m1
int 21h

Tuesday, February 22, 2011

Tasm programming

Tasm programming is related to microprocessor ,Microprocessor based on the binary numbers.All operations handle by Microprocessor in form of instructions.First install the tasm then open a file ,write code as given Below and then save it as .asm extension and execute it .


Addition of 8 Bit number:
.model small
.data
m1 db 10,13,'Enter 1st no:$'
m2 db 10,13,'Enter 2nd no:$'
m3 db 10,13,'Answer is:$'
a db 0
b db 0
c db 0
.code
mov ax,@data
mov ds,ax

mov ah,09h
lea dx,m1
int 21h

call accept
mov a,bl