Sign up with your email address to be the first to know about new products, VIP offers, blog features & more.

 




Tag Archives Microprocessor 8086

8086 ALP to check if input number is Prime or not

Title: Code for 8086 ALP to check if input number is prime or not.

Description: This 8086 Assembly language program is to check if the user inputted number is prime or not. This program allows user to give the number to test, and the 8086 ALP to check if input number is Prime or not.

share

Assembly language program to count the number of 1’s in a byte stored in memory location 2000H

Write an assembly language program to count the number of 1’s in a byte stored in memory location 2000H.
Algorithm:

Step 1: Point to memory location 2000H

Step 2: Load register A (Accumulator) with the content of memory location

Step 3: Set a counter to loop through each bits of number, Say C

Step 4: Set a counter to store the number of one’s (1’s) in the byte, Say B

Step 5: Rotate the content of accumulator to left through carry

Step 6: If no carry found from Step 5 then jump to Step 8

Step 7: Else increase the counter B by one (if carry found)

Step 8: Decrease counter C by one

Step 9: Until the value at counter C is 0 repeat from Step 5

Step 10: Terminate the program.

share