en:docs:macrolib

This is an old revision of the document!


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

2022/03/13 05:41 · prokushev · 0 Comments

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