.code
main proc
mov ax,@data
mov ds,ax
lea dx,msg ;printing msg
mov ah,09h
int 21h
mov ax,x ;ax=x
mov bx,y ;bx=y
cmp ax,0 ;jump to l3 if ax is negtive
jb l3
cmp bx,0 ;jump to l6 if bx is negative
jb l6
cmp ax,bx ;if ax<bx,then jump to l1
jl l1
sub ax,bx ;else normal sub
mov diff,ax ;diff=result is stored
jmp l2
l1: ;iff (+)ax<(+)bx
neg bx ;bx=-bx
clc
add ax,bx
neg ax ;-ans=ans
mov diff,ax
mov dx,2dh ;print '-'
mov ah,02h
int 21h
jmp l2
l3: ;iff (-)ax
neg ax ;-ax=ax
cmp bx,0 ;jump to l4 if bx is negative
jb l4
clc
add ax,bx ;ax=(+)ax+(+)bx
mov ax,diff
mov dx,2dh ;print '-'
mov ah,02h
int 21h
jmp l2
l4: ;if (-)ax & (-)bx
neg bx ;-bx=bx
cmp ax,bx ;if ax>bx then jump to l5
jg l5
sub ax,bx ;else ax-bx
mov diff,ax
mov dx,2dh ;print '-'
mov ah,02h
int 21h
jmp l3
l5: ;if(-)ax>(-)bx
xchg ax,bx ;exchange ax and bx
sub ax,bx ;ax-bx
mov diff,ax ;ans is positive
jmp l2
l6: ;iff (-)bx
neg bx ;-bx=bx
add ax,bx ;ax-(-)bx
mov diff,ax ;ans will be positive
mov ah,4ch
int 21h
main endp
How to write a program for mouse in microprocessor?
write it in 8085
mov ax,1234hmov bx,03hmul bxhlt( "THIS IS THE PROGRAMM CODING FOR 8 BIT 2NUMBERE'S MULTIPLICATION
x -=y;
write program to concatenating two sting in 8086 assembly language
One many find this answer on YouTube. One also may find out how to write ascending order programs using an 8086 microprocessor by looking at the owners manual.
Code for 8085 microprocessor. MVI A, Number1 SUI Number2 The code works as follows: Register A = Number1 - Number2
There are several methods available to sort numbers. A simple way to program sorting is the so-called "bubble-sort". This is inefficient for larger lists of numbers; in which case it is more convenient to use one of the faster algorithms, for example, "quick-sort".
write a lex program to delete space from the program
write an assembly language program to find sum of N numbers
write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html
Sp[[Q/Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix|Answer]]ell chec[[Q/Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix&action=edit&section=new|Answer it!]]k your answe[[Q/Discuss:Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix|Disc]][[help/answering questions|guidelin]]Spell check your answeresussionr[[help/signing in|full benefits]] Save C[[Q/Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix|Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 ]][[Q/Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix&action=edit&section=new|Answering 'Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix?']]matrix?ancel[[Q/How many animals are in West Texas|How many animals are in West Texas?]][[Q/How do you increase the number of four wheelers vehicles for servicing in a Service workshop|How do you increase the number of four wheelers vehicles for servicing in a]][[Q/How do you increase the number of four wheelers vehicles for servicing in a Service workshop|How do you increase the number of four wheelers vehicles for servicing in a Service workshop?]] Service workshop?[[Q/How do you increase the number of four wheelers vehicles for servicing in a Service workshop|How do you increase the number of four wheelers vehicles for servicing in a Service workshop?]]More Q&A