The LazyBoy Library Manual - A basic assembly program

The LazyBoy library makes it very easy to create extremely complex programs for DOS in assembly language with very little effort. The library will automatically include the various code that is required to support your program and leave out things you do not need or use. There are no massive blobs of unused library code that get linked into your program. Everything gets generated at compile time leaving out the unused code. To be off and creating programs with vesa text mode support with mouse support and much much more, all you need is four lines of code.

; all flat DOS binaries start at 0x100 org 0x100 ; include and initialize the LazyBoy library %include "lazy.inc" ; Exit to DOS Terminate ; include any required supporting code or data LAZY_CODE

Really, that is it. No other includes. No lists of subsystems to initialize. Everything the library provides is now available to your program. The display driver has been initialized. The DOS version has been verified as 5.00 or better. The Stack is prepared. And so, on and on.

Now all that initialization stuff does generate some code. If you do not care about things like windows, mouse, etc., check out the Conditional defines page to see how to disable those.

For those who are nostalgic and want a good old Hello, World! program, here ya go...

org 0x100 %include "lazy.inc" TextColor clCyan TextBackground clBlack WriteLn "Hello, World!" Terminate LAZY_CODE

However, such a simple program seems bloated with all the overhead for things like Mouse support and the rest. You probably want to trim it down some. So, here is a mimimalist version using some compiler directives.

org 0x100 ; Exclude the CRT stuff. Without CRT, the Mouse will be ; automatically be excluded. %define NO_CRT %include "lazy.inc" WriteLn "Hello, World!" Terminate LAZY_CODE