Reference Section
_draw_wborder {
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = (char *)_rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = (char *)_rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
_wborder_off ();
...
_wborder_on ();
_draw_wborder ();
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset of block */
jc wborder_030/* if unable to allocate */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size required buffer */
jc wborder_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc wborder_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc wborder_020/* if unable to create window */
wborder_on ();
...
wborder_off ();
draw_wborder ();
...
win_remove (); /* DI = offset window buffer */
jncwborder_020/* if successful */
... /* if unable to remove window */
wborder_020:
pop di /* DI = offset of win workbuf */
rel_free ();
wborder_030:
...
}
Source file WBDRAW.ASM ASM equiv DRAW_WBORDER
{
char chr, attr;
_get_backdrop (&chr, &attr);/* load vars w/backdrop info */
}
#include <inline.h>
...
get_backdrop ();/* AL=character, AH=attribute */
...
Source file _WGBDROP.ASM ASM equiv GET_BACKDROP
{
void far *buffer;
segaddr heapseg;
...
buffer = _rel_malloc (heapseg, _screen_bufsize ());
if (buffer != NULL)
{
_save_screen (buffer);
_set_backdropbuf (buffer);
}
...
_rel_free (_get_backdropbuf ());
}
#include <inline.h>
{
segaddr heapseg;
unsigned int heapsize;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
screen_bufsize ();
rel_malloc (); /* DI = offset allocated block */
jc g_bkdrpb_010/* if unable to allocate block */
set_backdropbuf ();
...
get_backdropbuf ();/* ES:DI -> backdrop buffer */
rel_free ();
jncg_bkdrpb_010/* if successful */
... /* if an error occurred */
g_bkdrpb_010:
...
}
Source file _WGBDRPB.ASM ASM equiv GET_BACKDROPBUF
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if (_win_create (&win, buffer) == 0)
{
/* Handle the error */
}
...
handle = _get_whandle (1);
if (handle == 0)
{
/* Handle the error */
}
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc g_whandle_030/* if unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size of required buf */
jc g_whandle_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc g_whandle_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc g_whandle_020/* if unable to create window */
...
mov ax,1
get_whandle ();
jc g_whandle_020/* if an error occurred */
...
win_remove (); /* DI = offset window buffer */
jncg_whandle_020/* if successful */
... /* if unable to remove window */
g_whandle_020:
pop di /* DI = offset win work buffer */
rel_free ();
g_whandle_030:
...
}
Source file _WGETHDL.ASM ASM equiv GET_WHANDLE
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle, level;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == 0)
{
/* Handle the error */
}
...
level = _get_wlevel (handle);
if (level == 0)
{
/* Handle the error */
}
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc g_wlevel_030/* if unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size required buffer */
jc g_wlevel_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc g_wlevel_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc g_wlevel_020/* if unable to create window */
...
get_wlevel (); /* AX = window level */
jc g_wlevel_020/* if an error occurred */
...
win_remove (); /* DI = offset window buffer */
jncg_wlevel_020/* if successful */
... /* if unable to remove window */
g_wlevel_020:
pop di
rel_free ();
g_wlevel_030:
...
}
Source file _WGETLVL.ASM ASM equiv GET_WLEVEL
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle, x, y;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
...
if (_get_wpos (handle, &x, &y))
{
/* Handle the error */
}
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc get_wpos_030/* if unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size required buffer */
jc get_wpos_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc get_wpos_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc get_wpos_020/* if unable to create window */
...
get_wpos (); /* AX = xpos, DX = ypos */
jc get_wpos_020
...
win_remove (); /* DI = offset window buffer */
jncget_wpos_020/* if successful */
... /* if unable to remove window */
get_wpos_020:
pop di /* DI = offset win work buffer */
rel_free ();
get_wpos_030:
...
}
Source file _WGETPOS.ASM ASM equiv GET_WPOS
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
...
if (_get_wspec (handle, &win))
{
/* Handle the error */
}
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc g_wspec_030/* if unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size required buffer */
jc g_wspec_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc g_wspec_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc g_wspec_020/* if unable to create window */
...
get_wspec ();
jc g_wspec_020/* if an error occurred */
...
win_remove (); /* DI = offset window buffer */
jncg_wspec_020/* if successful */
... /* if unable to remove window */
g_wspec_020:
pop di /* DI = offset win work buffer */
rel_free ();
g_wspec_030:
...
}
Source file _WGETSPC.ASM ASM equiv GET_WSPEC
_set_backdrop ('°', BLUE + (WHITE * 16));
#include <inline.h>
...
mov al,177
mov ah,(BLUE + (WHITE*16))
set_backdrop ();
...
}
Source file _WSBDROP.ASM ASM equiv SET_BACKDROP
{
void far *buffer;
segaddr heapseg;
...
buffer = _rel_malloc (heapseg, _screen_bufsize ());
if (buffer != NULL)
{
_save_screen (buffer);
_set_backdropbuf (buffer);
}
...
}
#include <inline.h>
{
segaddr heapseg;
...
mov es,heapseg
screen_bufsize ();
rel_malloc (); /* DI = offset allocated block */
jc s_bdropb_010/* if unable to allocate block */
save_screen ();
set_backdropbuf ();
...
s_bdropb_010:
}
Source file _WSBDRPB.ASM ASM equiv SET_BACKDROPBUF
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
...
if (_set_spos (handle, 3, 3))
{
/* Handle the error */
}
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc set_spos_030/* if unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size required buffer */
jc set_spos_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc set_spos_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc set_spos_020/* if unable to create window */
...
mov al,3
mov ah,al
set_spos ();
jc set_spos_020/* if an error occurred */
...
win_remove (); /* DI = offset window buffer */
jncset_spos_020/* if successful */
... /* if unable to remove window */
set_spos_020:
pop di /* DI = offset of win workbuf */
rel_free ();
set_spos_030:
...
}
Source file _WSETSPS.ASM ASM equiv SET_SPOS
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
...
if (_set_wborder (handle, -1, BORDER_SNGLDBL))
{
/* Handle the error */
}
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
void *style = BORDER_SNGLDBL;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset of block */
jc s_wborder_030/* unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size required buffer */
jc s_wborder_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset of block */
jc s_wborder_020/* unable to allocate block */
win_create (); /* BX = window handle */
jc s_wborder_020/* if unable to create window */
...
mov ah,-1
mov si,style
set_wborder ();
jc s_wborder_020/* if an error occurred */
...
win_remove (); /* DI = offset of win buffer */
jncs_wborder_020/* if successful */
... /* if unable to remove window */
s_wborder_020:
pop di /* DI = offset of win workbuf */
rel_free ();
s_wborder_030:
...
}
Source file _WSBORDR.ASM ASM equiv SET_WBORDER
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
...
if (_set_wlevel (handle, 1))
{
/* Handle the error */
}
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc s_wlevel_030/* if unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size required buffer */
jc s_wlevel_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc s_wlevel_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc s_wlevel_020/* if unable to create window */
...
mov ax,1
set_wlevel ();
jc s_wlevel_020
... /* if an error occurred */
win_remove (); /* DI = offset of buffer being
used for window */
jncs_wlevel_020/* if successful */
... /* if unable to remove window */
s_wlevel_020:
pop di /* DI = offset of win workbuf */
rel_free();
s_wlevel_030:
}
Source file _WSETLVL.ASM ASM equiv SET_WLEVEL
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
...
if (_set_wpos (handle, 1, 1))
{
/* Handle the error */
}
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc set_wpos_030/* if unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size required buffer */
jc set_wpos_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc set_wpos_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc set_wpos_020/* if unable to create window */
...
mov ax,1
mov dx,ax
set_wpos ();
jc set_wpos_020/* if an error occurred */
...
win_remove (); /* DI = offset window buffer */
jncset_wpos_020/* if successful */
... /* if unable to remove window */
set_wpos_020:
pop di /* DI = offset of win workbuf */
rel_free ();
set_wpos_030:
...
}
Source file _WSETWPS.ASM ASM equiv SET_WPOS
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
...
if (_set_wshadow (handle, S_HALFHGHT, BK_TRNSPRNT,
SHADOW_HALFHGHT))
{
/* Handle the error */
}
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
void *style = SHADOW_HALFHGHT;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc s_wshadow_030/* if unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size required buffer */
jc s_wshadow_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc s_wshadow_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc s_wshadow_020/* if unable to create window */
...
mov al,S_HALFHGHT
mov ah,BK_TRNSPRNT
mov si,style
set_wshadow ();
jc s_wshadow_020/* if an error occurred */
...
win_remove (); /* DI = offset window buffer */
jncs_wshadow_020/* if successful */
... /* if unable to remove window */
s_wshadow_020:
pop di /* DI = offset of win workbuf */
rel_free ();
s_wshadow_030:
...
}
Source file _WSSHADO.ASM ASM equiv SET_WSHADOW
_update_cursor ()
#include <inline.h>
update_cursor ();
Source file WUPDATEC.ASM ASM equiv UPDATE_CURSOR
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
...
_update_off ();
if (_win_move (handle, 1, 1))
{
/* Handle the error */
}
_update_on ();
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset memory block */
jc win_move_030/* error allocating memory */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size required buffer */
jc win_move_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset memory block */
jc win_move_020/* if unable to allocate */
win_create (); /* BX = window handle */
jc win_move_020/* if unable to create */
...
_update_off ();
mov ax,1
mov dx,ax
win_move ();
jc win_move_020/* if an error occurred */
_update_on ();
...
win_remove (); /* DI = offset window buffer */
jncwin_move_020/* if successful */
... /* if unable to remove window */
win_move_020:
pop di /* DI = offset win work buffer */
rel_free ();
win_move_030:
...
}
Source file WUPOFF.ASM ASM equiv UPDATE_OFF
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
...
_update_off ();
if (_win_move (handle, 1, 1))
{
/* Handle the error */
}
_update_on ();
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc win_move_030/* if unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size of required buf */
jc win_move_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc win_move_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc win_move_020/* if unable to create window */
...
_update_off ();
mov ax,1
mov dx,ax
win_move ();
jc win_move_020/* if an error occurred */
_update_on ();
...
win_remove (); /* DI = offset window buffer */
jncwin_move_020/* if successful */
... /* if unable to remove window */
win_move_020:
pop di /* DI = offset of win workbuf */
rel_free ();
win_move_030:
...
}
Source file WUPON.ASM ASM equiv UPDATE_ON
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
_update_off ();
...
_update_rect (1, 1, 10, 10);
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc upd_rect_030/* if unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size of required buf */
jc upd_rect_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc upd_rect_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc upd_rect_020/* if unable to create window */
update_off ();
...
mov dh,1
mov dl,1
mov ah,10
mov al,10
update_rect ();
...
update_on ();
win_remove (); /* DI = offset window buffer */
jncupd_rect_020/* if successful */
... /* if unable to remove window */
upd_rect_020:
pop di /* DI = offset of win workbuf */
rel_free ();
upd_rect_030:
...
}
Source file _WUPDATR.ASM ASM equiv UPDATE_RECT
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
_update_off ();
...
if (_update_window (handle))
{
/* Handle the error */
}
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc upd_win_030/* if unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size required buffer */
jc upd_win_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc upd_win_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc upd_win_020/* if unable to create window */
update_off ();
...
update_window ();
...
update_on ();
win_remove (); /* DI = offset window buffer */
jncupd_win_020/* if successful */
... /* if unable to remove window */
upd_win_020:
pop di /* DI = offset of win workbuf */
rel_free ();
upd_win_030:
...
}
Source file WUPDATES.ASM ASM equiv UPDATE_SCREEN
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
_update_off ();
...
_update_screen ();
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc upd_scrn_030/* if unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size required buffer */
jc upd_scrn_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc upd_scrn_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc upd_scrn_020/* if unable to create window */
update_off ();
...
update_screen ();
...
update_on ();
win_remove (); /* DI = offset window buffer */
jncupd_scrn_020/* if successful */
... /* if unable to remove window */
upd_scrn_020:
pop di /* DI = offset of win workbuf */
rel_free ();
upd_scrn_030:
...
}
Source file _WUPDATW.ASM ASM equiv UPDATE_WINDOW
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
_wborder_off ();
...
_wborder_on ();
_draw_wborder ();
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc wborder_030/* if unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size required buffer */
jc wborder_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc wborder_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc wborder_020/* if unable to create window */
wborder_on ();
...
wborder_off ();
draw_wborder ();
...
win_remove (); /* DI = offset window buffer */
jncwborder_020/* if successful */
... /* if unable to remove window */
wborder_020:
pop di /* DI = offset win work buffer */
rel_free ();
wborder_030:
...
}
Source file WBONOFF.ASM ASM equiv WBORDER_OFF
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
_wborder_off ();
...
_wborder_on ();
_draw_wborder ();
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc wborder_030/* if unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size required buffer */
jc wborder_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc wborder_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc wborder_010/* if unable to create window */
wborder_on ();
...
wborder_off ();
draw_wborder ();
...
win_remove (); /* DI = offset window buffer */
jncwborder_010/* if successful */
... /* if unable to remove window */
wborder_020:
pop di /* DI = offset of win work buf */
rel_free ();
wborder_030:
...
}
Source file WBONOFF.ASM ASM equiv WBORDER_ON
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
...
_rel_malloc (heapseg, _win_bufsize (&win));
...
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
...
lea si,win
win_bufsize (); /* AX = buffer size */
jc w_bufsize_010/* if buffer would be > 64k */
mov es,heapseg
rel_malloc (); /* DI = offset allocated block */
jc w_bufsize_010/* if unable to allocate block */
...
w_bufsize_010:
...
}
Source file _WBUFSIZ.ASM ASM equiv WIN_BUFSIZE
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
...
if (_win_close (handle))
{
/* Handle the error */
}
...
if (_win_open (handle))
{
/* Handle the error */
}
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc win_close_030/* if unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size required buffer */
jc win_close_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc win_close_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc win_close_020/* if unable to create window */
win_close ();
jc win_close_020/* if an error occurred */
...
win_open ();
jc win_close_020/* if an error occurred */
...
win_remove (); /* DI = offset window buffer */
jncwin_close_020/* if successful */
... /* if unable to remove window */
win_close_020:
pop di /* DI = offset of win work buf */
rel_free ();
win_close_030:
...
}
Source file _WCLOSE.ASM ASM equiv WIN_CLOSE
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc w_create_030/* if unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size required buffer */
jc w_create_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc w_create_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc w_create_020/* if unable to create window */
...
win_remove (); /* DI = offset window buffer */
jncw_create_020/* if successful */
... /* if unable to remove window */
w_create_020:
pop di /* DI = offset of win work buf */
rel_free ();
w_create_030:
...
}
Source file _WCREATE.ASM ASM equiv WIN_CREATE
{
void far *buffer;
segaddr heapseg;
unsigned int heapsize;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
...
}
#include <inline.h>
{
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc win_init_010/* if unable to allocate block */
win_init ();
...
win_init_010:
...
}
Source file _WINIT.ASM ASM equiv WIN_INIT
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
...
_update_off ();
if (_win_move (handle, 1, 1))
{
/* Handle the error */
}
_update_on ();
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc win_move_030/* if unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size required buffer */
jc win_move_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc win_move_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc win_move_020/* if unable to create window */
...
_update_off ();
mov ax,1
mov dx,ax
win_move ();
jc win_move_020/* if an error occurred */
_update_on ();
...
win_remove (); /* DI = offset window buffer */
jncwin_move_020/* if successful */
... /* if unable to remove window */
win_move_020:
pop di /* DI = offset of win work buf */
rel_free ();
win_move_030:
...
}
Source file _WMOVE.ASM ASM equiv WIN_MOVE
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
...
if (_win_close (handle))
{
/* Handle the error */
}
...
if (_win_open (handle))
{
/* Handle the error */
}
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc win_close_030/* if unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size required buffer */
jc win_close_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc win_close_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc win_close_020/* if unable to create window */
win_close ();
jc win_close_020/* if an error occurred */
...
win_open ();
jc win_close_020/* if an error occurred */
...
win_remove (); /* DI = offset window buffer */
jncwin_close_020/* if successful */
... /* if unable to remove window */
fwin_close_020:
pop di /* DI = offset of win work buf */
rel_free ();
win_close_030:
...
}
Source file _WOPEN.ASM ASM equiv WIN_OPEN
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
...
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc w_remove_030/* if unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size required buffer */
jc w_remove_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc w_remove_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc w_remove_020/* if unable to create window */
...
win_remove (); /* DI = offset window buffer */
jncw_remove_020/* if successful */
... /* if unable to remove window */
w_remove_020:
pop di /* DI = offset of win work buf */
rel_free ();
w_remove_030:
...
}
Source file _WREMOVE.ASM ASM equiv WIN_REMOVE
_win_resume ()
#include <inline.h>
win_resume ();
Source file WSUSPEND.ASM ASM equiv WIN_RESUME
{
void far *buffer;
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize, bufsize;
int handle;
...
_rel_init (heapseg, heapsize);
buffer = _rel_malloc (heapseg, WWORKBUF_SIZE);
if (buffer == NULL)
{
/* Handle the error */
}
_win_init (buffer);
bufsize = _win_bufsize (&win);
buffer = _rel_malloc (heapseg, bufsize);
if (buffer == NULL)
{
/* Handle the error */
}
if ((handle = _win_create (&win, buffer)) == -1)
{
/* Handle the error */
}
...
_win_select (STDWIN);
...
if (_win_select (handle))
{
/* Handle the error */
}
buffer = _win_remove (handle);
if (buffer != NULL)
_rel_free (buffer);
}
#include <inline.h>
{
sawin win = WIN_DEFAULT;
segaddr heapseg;
unsigned int heapsize;
int size = WWORKBUF_SIZE;
...
mov es,heapseg
mov ax,heapsize
rel_init ();
mov ax,size
rel_malloc (); /* DI = offset allocated block */
jc w_select_030/* if unable to allocate block */
pushdi
win_init ();
lea si,win
win_bufsize (); /* AX = size required buffer */
jc w_select_020/* if buffer would be > 64k */
rel_malloc (); /* DI = offset allocated block */
jc w_select_020/* if unable to allocate block */
win_create (); /* BX = window handle */
jc w_select_020/* if unable to create window */
win_close ();
jc w_select_020/* if an error occurred */
...
win_open ();
jc w_select_020/* if an error occurred */
...
mov ax,bx
mov bx,STDWIN
win_select ();
jc w_select_020/* if an error occurred */
...
mov bx,ax
win_select ();
jc w_select_020/* if an error occurred */
win_remove (); /* DI = offset window buffer */
jncw_select_020/* if successful */
... /* if unable to remove window */
w_select_020:
pop di /* DI = offset win workbuf */
rel_free ();
w_select_030:
...
}
Source file _WSLCT.ASM ASM equiv WIN_SELECT
...
_win_suspend();/* suspend windowing */
...
#include <inline.h>
...
win_suspend();/* suspend windowing */
...
Source file WSUSPEND.ASM ASM equiv WIN_SUSPEND