Note: This IBM PC BIOS API call is for DOS/Win16 personality only. Use Family API for portability.

Note: osFree Macro Library provides macros for most of functions

osFree Macro Library

Introduction

ALP/MASM compatible macro library for BIOS and DOS. Original MASM provides macros for BIOS and DOS interrupts as well as OS/2 and Windows macros. osFree Macro Library is a open source replacement of MASM macros. osFree macro library is for Microsoft MASM, IBM MASM, IBM ALP, JWASM and other MASM compatible assemblers. It has more type check and some BIOS bugs workaround. At the present time BIOS and DOS APIs are supported.

Using macros

osFree Macro Library consist of BIOS.INC and DOS.INC. To use macros just include BIOS.INC, DOS.INC or both. For example:

INCLUDE BIOS.INC @SetPage ; Set default video page (zero page)

Files

osFree Macro Library provides two include files:

BIOS.INC

DOS.INC

BIOS.INC contains macros for BIOS interrupts. DOS.INC contains macros for DOS interrupts.

BIOS.INC

Macro	Description
@SetMode	Set current video mode
@SetCurSz	Set cursor size
@SetCurPos	Set cursor position
@GetCur	Get cursor shape and position
@SetPage	Set active video page
@ScrollUp	Scroll screen area up
@ScrollDn	Scroll screen area down
@Scroll	Scroll sreen area up or down
@GetChAtr	Get char and attribute from screen
@PutChAtr	Put char and attribute to screen
@PutCh	Put char to screen
@SetPalet	Set pallete
@SetColor	Set border color
@SetDot	Set pixel dot on screen
@GetDot	Get pixel dot from screen
@WrtTTY	Write char in TTY mode
@VideoState	Get video state
@GetMode	Get video mode
@GetDisplay	Get display info
@GetVideoState	Get extended video state
@GetEGAInfo	Get EGA information
@Cls	Clear screen
@AuxInit	Initialize serial port
@AuxSendChar
@AuxRecieveChar
@AuxStatus
@PrnPrint
@PrnInit
@PrnStatus
@KbdStatus
@CharIn
@CharPeek
@SetTime
@GetTime
@TapeOn
@TapeOff
@TapeRead
@TapeWrite
@Equipment
@MemSize
@DskReset
@DskStatus
@DskRead
@DskWrite
@DskVerify
@DskFormat
IBM PC BIOS API
Video I/O	INT 10H: 00H, 01H, 02H, 03H, 05H, 06H, 07H, 08H, 09H, 0AH, 0BH, 0CH, 0DH, 0EH, 0FH
Hardware info	INT 11H, INT 12H
Serial I/O	INT 14H: 00H, 01H, 02H, 03H
Tape I/O	INT 15H: 00H, 01H, 02H, 03H
Keyboard I/O	INT 16H: 00H, 01H, 02H
Printer I/O	INT 17H: 00H, 01H, 02H
Disk I/O	INT 13H: 00H, 01H, 02H, 03H, 04H, 05H
Date and Time	INT 1AH: 00H, 01H
osFree Macro Library
Video I/O	@SetMode @SetCurSz @SetCurPos @GetCur @SetPage @ScrollUp @ScrollDn @Scroll @GetChAtr @PutChAtr @PutCh @SetPalet @SetColor @SetDot @GetDot @WrtTTY @VideoState @GetMode @GetDisplay @GetVideoState @GetEGAInfo @Cls
Hardware info	@Equipment @MemSize
Serial I/O	@AuxInit @AuxSendChar @AuxRecieveChar @AuxStatus
Tape I/O	@TapeOn @TapeOff @TapeRead @TapeWrite
Keyboard I/O	@KbdStatus @CharIn @CharPeek
Printer I/O	@PrnPrint @PrnInit @PrnStatus
Disk I/O	@DskReset @DskStatus @DskRead @DskWrite @DskVerify @DskFormat
Date and Time	@SetTime @GetTime
Mouse	@MouInit @MouShowPointer @MouStatus @MouSetPos @MouSetMickey @MouRegion
Memory manager	@ModBlok SET_BLOCK
Family API
DOS	Process Manager	DosBeep DosExit DosSleep DosExecPgm
File Manager	DosChDir DosChgFilePtr DosClose DosDelete DosDupHandle DosMkDir DosMove DosQCurDir DosQCurDisk DosSetFileMode DosOpen DosQFileInfo DosRead DosQFileMode DosQFSInfo DosQVerify DosRmDir DosSelectDisk DosFindClose DosFindFirst DosFindNext DosSetFileInfo DosSetVerify DosWrite DosFileLocks DosSetFHandState DosNewSize DosBufReset DosQFHandState DosSetFSinfo DosShutdown
Memory Manager	DosFreeSeg DosSubAlloc DosSubFree DosSubSet DosAllocHuge DosAllocSeg DosReallocHuge DosReallocSeg DosGetHugeShift DosCreateCSAlias
NLS	DosCaseMap DosGetCtryInfo DosGetDBCSEv DosSetCtryCode DosGetCollate DosGetMessage DosInsMessage DosPutMessage
Date and Time	DosSetDateTime DosGetDateTime
Devices	DosDevConfig DosDevIOCtl DosDevIOCtl2
Signals	DosHoldSignal DosSetSigHandler
Misc	BadDynLink DosGetEnv DosGetMachineMode DosGetVersion DosError DosErrClass DosSetVec
KBD	KbdCharIn KbdFlushBuffer KbdGetStatus KbdSetStatus KbdStringIn KbdPeek
VIO	VioGetBuf VioGetConfig VioGetCurPos VioGetCurType VioGetPhysBuf VioReadCellStr VioReadCharStr VioScrollUp VioScrollDn VioScrollLf VioScrollRt VioScrUnLock VioSetCurPos VioSetCurType VioSetMode VioGetMode VioShowBuf VioWrtCellStr VioWrtCharStr VioWrtCharStrAtt VioWrtNAttr VioWrtNCell VioWrtNChar VioWrtTTY VioScrLock VioPopUp
Tools	BIND
Modules	DOSCALLS.DLL VIOCALLS.DLL KBDCALLS.DLL MSG.DLL
Libraries	API.LIB OS2386.LIB FAPI.LIB DOSCALLS.LIB SUBCALLS.LIB