Assembly Language : Link Library


Link Library Overview 
• A file containing procedures that have been compiled into machine code
• These procedures are ready to be used (via the CALL instruction) within your program. They have their own unique name.
• Most, if not all, of these procedures run on pre-selected registers which you MUST use.

Calling a Library Procedure 
• Call a library procedure using the CALL instruction. Some procedures require input arguments.
 • The INCLUDE directive copies in the procedure prototypes (declarations).
• The following example displays "1234" on the console (as shown in output):
Library Procedures – Overview Here are some of the procedures available to you. You can find more from the Internet and reference books (Kip Irvine, Assembly Language programming books are a good place to start).
Clrscr - Clears the console and locates the cursor at the upper left corner.
 • Crlf - Writes an end of line sequence to standard output. • Delay - Pauses the program execution for a specified n millisecond interval.
 • DumpMem - Writes a block of memory to standard output in hexadecimal.
DumpRegs - Displays the EAX, EBX, ECX, EDX, ESI,  EDI,  EBP, ESP, EFLAGS, and EIP registers in hexadecimal. Also displays the Carry, Sign, Zero, and Overflow flags.
 • GetCommandtail - Copies the program’s command-line arguments (called the command tail) into an array of bytes.
 • GetMseconds - Returns the number of milliseconds that have elapsed since midnight. • Gotoxy - Locates cursor at row and column on the console.
 • Random32 - Generates a 32-bit pseudorandom integer in the range 0 to FFFFFFFFh.
Randomize - Seeds the random number generator.
RandomRange - Generates a pseudorandom integer within a specified range.
ReadChar - Reads a single character from standard input.
ReadHex - Reads a 32-bit hexadecimal integer from standard input, terminated by the Enter key.
 • ReadInt - Reads a 32-bit signed decimal integer from standard input, terminated by the Enter key.
ReadString - Reads a string from standard input, terminated by the Enter key.
SetTextColor - Sets the foreground and background colors of all subsequent text output to the console.
 • WaitMsg - Displays message, waits for Enter key to be pressed.
WriteBin - Writes an unsigned 32-bit integer to standard output in ASCII binary format.
 • WriteChar - Writes a single character to standard output.
WriteDec - Writes an unsigned 32-bit integer to standard output in decimal format.
 • WriteHex - Writes an unsigned 32-bit integer to standard output in hexadecimal format.
WriteInt - Writes a signed 32-bit integer to standard output in decimal format.
WriteString - Writes a null-terminated string to standard output.

Ctrl + 5 =Compile

Post a Comment

0 Comments