Functions i've made:
--------------------
  All functions are built automatically into EXE unless
otherwise stated.

-----------
malloc,siz:dword
  - alloc RAM (just like in C)  (NULL if none avail)
cmalloc,siz1:dword,siz2:dword  ;total size= siz1*siz2
  - alloc RAM (just like in C)  (NULL if none avail)
  - also clears alloc RAM to 0
qfree
  - query largest free RAM avail.  (eax=largest free)
coreleft
  - query total free RAM avail.    (eax=free ram)
free,blk:dword
  - free a block alloc from malloc or calloc
getenv,nam:dword
  - get an enviroment string ptr  (NULL if not found)
exit,errorcode:byte
  - exits to DOS (func will do cleanup)
  - DO NOT CALL int 21h/ah=4c00 directly

DATA avail from QLIB
--------------------
  selcode dw - code selector
  seldata dw - data selector
  selzero dw - zero selector
  _environ dd - ptr to enviroment table
  _psp dd - ptr to PSP
  _pmmode db - current PM mode = (SRV_RAW, SRV_XMS, SRV_VCPI or SRV_DPMI)
  _dta dd - ptr to DTA area (default = _psp+80h)
  plus other unimportant stuff...

string
------

str2num,str:dword,radix:byte
  - convert a string to a number  (always returned in eax)
  - string may start with + or - and leading spaces etc.

num2str,n:dword,str:dword,radix:byte
 - convert # to string (unsigned)
num2strc,n:dword,str:dword,radix:byte
 - convert # to string (unsigned and capitals)
num2strs,n:dword,str:dword,radix:byte
 - convert # to string (signed)
num2strsc,n:dword,str:dword,radix:byte
 - convert # to string (signed and capitals)

print,str:dword
  - simply print string
printxy,x:word,y:word,str:dword
  - print at screen pos x,y
gotoxy,x:word,y:word
  - change cursor pos x,y
wherex
  - get current X cursor pos
wherey
  - get current Y cursor pos
window,x1:word,y1:word,x2:word,y2:word
  - change window coords
clrscr
  - clears screen
setcursor,scan:word
  - sets cursor start/stop scan lines  (a value of 512 removes cursor)

strcpy , strcat, strlen ,strcmp
strccpy, stricmp, strcspn, etc.  (all string functions as in C)
printf, sprintf, sscanf, scanf - all as in C

file I/O
--------
open,file:dword,access:byte    ;0=read 1=read/write  (directly given to DOS)
  - open a file
close,h:word
read,h:word,buf:dword,len:dword
write,h:word,buf:dword,len:dword
lseek,h:word,pos:dword,typ:byte   ;0=from start  1=relative  2=from end

keyboard services
-----------------
getch
  - reads one key.  AH=scan code  AL=char
kbhit
  - detects if key is avail

