Wednesday, May 29, 2019

8086 Assembly program to check if the number is Even or Odd


For many other Assembly Language  Programs related to microprocessor 8086, c++ , datastructures  visit our  BLOG 
Assembly program to check whether number is even or odd in 8086
8086 program to compute even or odd number

DATA SEGMENT        
NUM DB 9H        
ODD DB ?        
EVE DB ?
DATA ENDS
CODE SEGMENT
START: ASSUME CS:CODE,DS:DATA 
MOV AX,DATA 
MOV DS,AX        
MOV AL,NUM        
ROR AL,1            
JNC DN
INC ODD         
JMP EXIT
DN: INC  EVE
JMP EXIT
 EXIT:  MOV AH,4CH 
INT 21H
CODE ENDS
END START




Programs:-

For many other Assembly Language  Programs related to microprocessor 8086, c++ , datastructures  visit our  BLOG 

There are programs of largest ,smallest ,division ,multiplication,odd/even,block operation ,string operations ,etc

No comments:

Post a Comment