The LazyBoy Library Manual - The library core

There is quite a lot stuff in the LazyBoy library core. Most of which are macros and defines that make the rest of the library work. Unless you desire to add your own macros as part of the library (like maybe FireAftThruster), you probably don't need to worry about those.

So, let's first discuss what the library does when you place that %include "lazy.inc" in your program.

  • It configures the target CPU for an 8086 processor.
  • It verifies that the operating system is at least DOS 5.00 compatible or better. Otherwise, it will terminate with an unsupported DOS version error message.
  • It verifies that there is at least a full 64kb segment of memory allocated for the program. Otherwise, it will terminate with an insufficient memory error message.
  • It relocates relocates the stack into the BSS to permit easier usage of free memory.
  • It provides stack overflow checking when DEBUG is defined.
  • It initializes the Text Writer and other macro groups that have not been excluded through conditional defines.
  • It manages the safe shutdown process that is executed by the Terminate macro.
  • It provides the mechanisms for the inclusion of conditionally compiled code and data through the LAZY_CODE macro.

The library core macros:

AddExitProcInsert a function into the exit chain.
Lazy_CodeFulfill library code and data requirements.
Lazy_InitInitialize library functionailty.
StackCheckStack checking for debugging.
TerminateSafely shutdown and return to DOS.
usecpuSet the targeted CPU.
IdleSystem idle and reduced power consumption.