Hi
In my college they have given me the following codings for implementing linker function.
Codings:
[CODE=c]#include<stdio. h>
#include<conio. h>
void cursoron();
void cursoroff();
void main()
{
clrscr();
printf("LINKER\ n\n");
printf("Cursor off state\n");
cursoroff();
getch();
printf("\nCurso r on state\n");
cursoron();
getch();
printf("\nCurso r off state\n");
cursoroff();
getch();
printf("\nCurso r on state\n");
cursoron();
getch();
}
void cursoron()
{
asm MOV AH,3;
asm XOR BX,BX;
asm INT 0X10;
asm XOR CH,0X3F;
asm MOV AH,1;
asm INT 0X10;
}
void cursoroff()
{
asm MOV AH,3;
asm XOR BX,BX;
asm INT 0X10;
asm OR CH,0X3F;
asm MOV AH,1;
asm INT 0X10;
}[/CODE]
Output:
Cursor off state
Cursor on state
-
Cursor off state
Cursor on state
-
- indicates blinking cursor in output.
I know the assembly language codings only a little bit. Can you please explain me what each assembly language statements are doing for cursoron() function alone so that i can understand cursoroff() function also.
I know the meaning of MOV,XOR,INT,OR etc.. But what is the purpose of moving values 3,1 in A register before and after cursor on/off stage and why we are clearing BX register,why we are moving 0X3F in CH register. What actually they do.
Can u please explain me...
In my college they have given me the following codings for implementing linker function.
Codings:
[CODE=c]#include<stdio. h>
#include<conio. h>
void cursoron();
void cursoroff();
void main()
{
clrscr();
printf("LINKER\ n\n");
printf("Cursor off state\n");
cursoroff();
getch();
printf("\nCurso r on state\n");
cursoron();
getch();
printf("\nCurso r off state\n");
cursoroff();
getch();
printf("\nCurso r on state\n");
cursoron();
getch();
}
void cursoron()
{
asm MOV AH,3;
asm XOR BX,BX;
asm INT 0X10;
asm XOR CH,0X3F;
asm MOV AH,1;
asm INT 0X10;
}
void cursoroff()
{
asm MOV AH,3;
asm XOR BX,BX;
asm INT 0X10;
asm OR CH,0X3F;
asm MOV AH,1;
asm INT 0X10;
}[/CODE]
Output:
Cursor off state
Cursor on state
-
Cursor off state
Cursor on state
-
- indicates blinking cursor in output.
I know the assembly language codings only a little bit. Can you please explain me what each assembly language statements are doing for cursoron() function alone so that i can understand cursoroff() function also.
I know the meaning of MOV,XOR,INT,OR etc.. But what is the purpose of moving values 3,1 in A register before and after cursor on/off stage and why we are clearing BX register,why we are moving 0X3F in CH register. What actually they do.
Can u please explain me...
Comment