Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

What's the difference between int 10h and int 21h?


Asked by Aurelia Leal on Dec 05, 2021 FAQ



BIOS-level access: Characters are output using INT 10h function, known as BIOS services. This executes more quickly than int 21h, and permits the control of text color. Direct video access: Characters are moved directly to video RAM (screen buffer), so the execution is instantaneous.
One may also ask,
• Use INT 10H function calls to: –Clear the screen. –Set the cursor position. –Write characters to the screen in text mode. –Draw lines on the screen in graphics mode. –Change the video mode. • Use INT 21H function calls to:
Moreover, INT 21h function 4Ch is preferred. Reads a character from the standard input device and echoes it to the standard output device. If no character is ready it waits until one is available. I/O can be re-directed, but prevents detection of OEF.
Indeed,
INT 10h, INT 10H or INT 16 is shorthand for BIOS interrupt call 10 hex, the 17th interrupt vector in an x86 -based computer system. The BIOS typically sets up a real mode interrupt handler at this vector that provides video services. Such services include setting the video mode, character and string output,...
Accordingly,
–Saves CS:IP and the flags on the stack and goes to the subroutine associated with that interrupt. –In x86 processors, 256 interrupts, numbered 00 to FF. • INT 10H and INT 21H are the most widely used with various functions selected by the value in the AH register.