No Comments

What are C Tokens?

C programs contains many elements which are identified by the compiler as Tokens. Tokens can be categorized as 1. Keywords2. Variables3. Constants 4. Special characters 5. Operators C Token example program: int main() { int x, y, sum; x = 5, y = 10; sum = x + y; Printf (“Sum = %d \n”, sum); […]

No Comments

What do you mean by header file in C language?

header file contains the library functions along with the necessary definitions and declarations. C programming language have a directive, often called include (as well as copy and import), that causes the contents of a second file to be inserted into the original file. For example #include causes the contents of a file stdio.h to be […]

1 Comment

ASM program to calculate arithmetic mean of ‘N’ numbers

Aim: – To write an assembly language program to calculate arithmetic mean of ‘N’ numbers. 1 2 3 4 5 6 7 8 9 10 11 12 13 MOV AX, DATA MOV DS, AX XOR AL, AL LEA SI, NUM MOV CX, 0005 MOV AH, 00 NEXT: ADD AL, [SI] INC SI LOOP NEXT MOV […]

1 Comment

ASM program to comparing two given strings

Aim: – To write an assembly language program to comparing two given strings. 1 2 3 4 5 6 7 8 9 10 11 MOV AX, DATA MOV DS, AX MOV ES, AX CID MOV CX, 07 LEA SI, SR1 LEA DI, SR2 REP CMP, SB JB L1 L1: MOV BH, 00 END Result: Two […]

No Comments

ASM program to reverse the given string

Aim: – To write an assembly language program to reverse the given string. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 MOV AX, DATA MOV DS, AX MOV ES, AX MOV CL, 03 LEA SI, A MOV AX, 04 ADD DI, AX L1: MOV AL, [SI] XCHG AL, [DI] […]

No Comments

ASM program to find a letter in the given string

Aim: – To write an assembly language program to find a letter in the given string. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 MOV AX, DATA MOV DS, AX MOV ES, AX MOV BX, 00 MOV CL, 00 LOOK: MOV AL, A[BX] CMP AL, KEY JE L1 INC […]

No Comments

ASM program to find the factorial of the given number

Aim: – To write an assembly language program to find the factorial of the given number. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 MOV CL, X DEC CL MOV BX, 00 INC BX MOV A[BX], 01 MOV AL, 00 MOV DL, 01 L1: INC BX ADD AL, DL […]