I am trying to understand the code for intcall which is used for generating bios interrupt for displaying text on the screen. Can anybody please help me understanding this code.
If you don't mind me asking, why are you looking into that particular call? If you are trying to understand how to use it in Linux itself, then the thread should be moved to General Programming.
On the other hand, if you are looking to implement the same thing in your OS, you need to stop and reconsider the matter. Unless your actual goal is to support legacy 16-bit MS-DOS code (yeah, good luck with that), you don't
want to do this. Using BIOS calls for console handling in a 32-bit OS is going to be more trouble than it is worth, no matter how well or poorly you implement it.
Even in 16-bit code, the BIOS is generally a poor fit; most MS-DOS programs that needed more than the most basic stream-oriented text output bypassed them, and every MS-DOS compiler of note avoided it in their own console libraries even for stream I/O. MS-DOS itself avoided the BIOS for many things it nominally could have been be used for, because even a good implementation of the BIOS was worse than a lousy, generic implementation of the same code which used interrupts instead of polling.
While it takes a little effort upfront, the truth is that the BIOS console routines are going to be a lot more
work to deal with down the road, and working directly with the text buffers is actually the easier option.