This repo contains some pieces of assembly code I learned as a part of academics. Following are the programs that I have implemented:
- Add two 16 bit numbers using DAD
- Add two 16 bit numbers without using ADD
- Finding one's complement of a number
- Finding two's complement of a number
- Count number of ones in a number
- Multiply two 8 bit numbers
- Pack unpacked BCD numbers
- Shift a number right by 4 bits
- Storing a number
- Subtracting two 8 bit numbers
- Adding two 8 bit numbers
- Finding sum of 2 numbers using indirect addresssing
- Swap data in different memory locations
- Swap data using indirect addressing
- A program to count number of 1โs in the contents of C register and store the count in the E register
- An assembly language program to separate even numbers from the given list of 50 numbers and store them in the another list starting from 2300H. Assume starting address of 50 number list is 2200H
- Calculate the sum of series of even numbers from the list of numbers. The length of the list is in memory location 2200H and the series itself begins from memory location 2201H. Assume the sum to be 8 bit number so you can ignore carries and store the sum at memory location 2210H
- Determine largest number in an array of n elements. Assume that the value of n is stored at address 2050 and array starts from address 2051. Result is to be stored at address 3050
- Finding square of a number