This is an old revision of the document!
−Table of Contents
Note: This library 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 | Send char to serial port |
@AuxRecieveChar | Recieve char from serial port |
@AuxStatus | Get serial port status |
@PrnPrint | Print char to printer |
@PrnInit | Initialize printer |
@PrnStatus | Get printer status |
@KbdStatus | Get keyboard status |
@CharIn | Input char from keyboard |
@CharPeek | Peek char from keyboard buffer |
@SetTime | Set time tick |
@GetTime | Get time tick |
@TapeOn | Turn tape motor on |
@TapeOff | Turn tape motor off |
@TapeRead | Read block from tape |
@TapeWrite | Write block to tape |
@Equipment | Get equipment list |
@MemSize | Get memory size |
@DskReset | Reset disk system |
@DskStatus | Get last disk operation status |
@DskRead | Read sector |
@DskWrite | Write sector |
@DskVerify | Verify sector |
@DskFormat | Format track |
DOS.INC
Macro | Description |
---|---|
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 |