INLINE FUNCTION INLINE FUNCTION: The inline function is the concept used commonly with classes. When the function is inline, the compiler places a copy of the code of that function at each point. Conditions for the Inline function: Inline functions should not contain any loops, recursion. – The inline…
ARM thumb program to find first 10 fibonacci numbers
In this article let’s learn how to find the first 10 Fibonacci numbers.Usually Fibonacci numbers start from 0,1,1,2……In this, we can observe that the present number in Fibonacci is the summation of the previous two numbers. So in this, we should initialize the first two numbers as -1 and +1…
Java program to compute employee's net salary,HRA,DA and GS
In this article let’s learn how to calculate the net salary of an employee by considering the parameters called HRA(House rent allowance),DA(Dearness allowance),GS (Gross salary)and income tax. Let us assume some parameters. HRA=10% of basic salary DA=73% of basic salary GS=basic salary+DA+HRA Income tax=30% of gross salary net salary= GS-income…
ARM assembly code to find number of ones and zeros in a 32 bit number
Hello guys! Today we will see how to find number of ones and zeros in a 32 bit number. Let’s first understand the algorithm later we see a example code. Algorithm: Start Store a 32 bit number in register(Rd). Initialize a counter register to 1Fh(32) Initialize one regiter(Ra) to zero…
8051 code find sum of first N natural numbers
Hello, guys! Today we will see 8051 assembly program to find the sum of first N natural numbers. There are two ways to compute the sum of N natural numbers. We will go through one by one. First method: It’s simple basic code. Let’s go through the algorithm. Algorithm: Start Store the value(N)…
8051 program to convert Ascii value to Hexadecimal value….
Hi guys…In this article let’s learn conversion.The ascii to Hex conversion logic is very simple.The hexadecimal numbers from 31H-39H are 0-9 numbers in ascii and 41H to 46H are A to F numbers. So we should first compare the number with 40H if it is lesser subtract with 30H and…
Introduction of classes and objects in java.Program to take the input as student name,roll number and display in different class.
Hi guys in this article let’s learn about class.You might be thinking that you use class in every single program but don’t know what is class so let’s start.Hope you’ll enjoy it 🙂 Class is the core of Java.Each every single thing in java is referred as object and class.…
8051 itimer interrupt program to display value of 'Y' at P0 and 'n' at P2. Also generate square wave of 10 KHz at P2^0 with timer0 in interrupt mode.Using XTAL@22MHz
I have explained the calculations for the timer in my previous post.please have a look . CODE: #include<REGx51.h> sbit sqwave=P2^0; void timer0() interrupt 1 { sqwave=~sqwave; //generating sq wave } void main() { TMOD=0x02; //Timer0 in 8 bit autoreload mode IE=0x82; //enabling intrupt TH0=0x47; //loading the calculated…
8051 timer Interrupt program to copy data from P0 to P1 ,while simultaneously generating square wave of time period 200 uS at P2^0 .
When it comes to interrupt programming , we have to consider some important registers. For this program the registers used are IE(interrupt enable),TCON(timer control),TMOD(timer mode). In timer interrupt programming calculating the value to be loaded to the timer is very important. Here XTAL frequency i have considered is…
Difference between static and non-static methods in java
In this article let’s learn how static and non-static methods are used in a program.Usually when we want to access class members we create the object of the class and then access through the object as reference.There is another way to do this without creating the object(accessing directly by class…
You must be logged in to post a comment.