Third-Party BASIC Libraries

From Doors CS, Doors CSE, and Doors CE Wiki
Jump to: navigation, search

Doors CS offers compatibility for all the major BASIC libraries, including Celtic III, XLib, PicArc, and (partially) Omnicalc. Doors CS also contains its own set of powerful DCSB Libs. If you need to detect whether the Doors CS-provided Hybrid BASIC libraries are present (which you should do in any program or game that uses them), the DCSB Libs pages illustrates the necessary code.

Some functions are using a program name to edit a program. To use an AppVar instead of a program as input, prepend the string with the "rowSwap(" token.

Celtic Libraries

ToggleSet - det(0,"FN",f#) 0=Arc;1=Lk;2=PA;3=Hid;4=Del;5=Crt;6=PS;7=Stat
NumToString - det(1,var) Out:type code
GetListElem - det(2,"LN",elem) out:lNAME(elem) -> Real/Cpx
GetArgType - det(3,argofanytype) filetype code
ChkStats - det(4,f#) 0=RAM 1=ARC 2=ID 3=OSVER
LineRead - det(5,"FN",line#,[#oflines])
LineWrite - det(6,"STR","FN",line#)
LineErase - det(7,"FN",line#,[#oflines])
LineReplace - det(8,"FN","STR",line#,[#oflines])
FindProg - det(9,["SEARCH"])
UngroupFile - det(10,"GFN")
GetGroup - det(11,"GFN")
ExtGroup - det(12,"GFN",item#)
GroupMem - det(13,"GFN",item#)
BinRead - det(14,"FN",bytestart,#ofbytes)
BinWrite - det(15,"HEX","FN",bytestart)
BinDelete - det(16,"FN",bytestart,del#ofbytes)
HexToBin - det(17,"484558")
BinToHex - det(18,"BIN")
FastCopy - det(19)
ExecHex - det(20,"C9")
Edit1Byte - det(21,Str?,StartByte,ReplaceWithThisByte)
ModeChange - det(22...) Not implemented
IndexFile - det(23,"FILENAME","NEWINDEXNAME")
LookupIndex - det(24,"FILENAME","INDEXNAME",line#,[#oflines])
ErrorHandle - det(25,function,string)
MatToStr - det(26,Matrix#)
StringRead - det(27,"binstring",start,readThisMany)
HexToDec - det(28,"HEXSTRING")
DecToHex - det(29,SomeRealNumber,[autoOverride])
EditWord - det(30,start_byte,replace_with_this_word)
BitOperate - det(31,value1,value2,logic)
GetProgList - det(32,"SEARCHSTRING",[type])

PicArc Libraries

DBQuery1 - identity(0,"DB",f#,args) 0=fm;1=ad;2=dl;3=di;4=ac;5=cb;6=cp
TogglePic - identity(1,pic#,f#) 0-7=picToBuf;8=newPic;9=TARC;10=del
GetPicGroup - identity(2,"GFN")
ExtPicGroup - identity(3,"GFN",pic#)
StringTile - identity(4,"BSTR",xS,xE,yS,yE,W,xO,yO,pic#S,displogic)
PutSprite - identity(5,"HEXSTRING",x,y,w,h,logic,flip,update_lcd)
ShiftScreen - identity(6,sft#,sftDir,scrnUpdate)
DrawBox - identity(7,x1,y1,x2,y2,dispmeth)
FillMap - identity(8,"HEXSTRING",right,down,LOGIC,updateLCD)
BoxShift - identity(9,x,y,w,h,shiftType,shiftRepeat,updateLCD)
DrawText - identity(10,flag,[x,y],"TEXT")
CopyBox - identity(xx,x1s,y1s,x2s,y2s,x1d,y1d,x2d,y2d,dispmeth)

XLib Libraries

ClearScreen - real(0,ULCD)
DrawSprite - real(1,x,y,w,h,p#,pX,pY,logic,flp,ULCD)
DrawTileMap - real(2,MTRX#,xO,yO,W,H,xS,xE,yS,yE,p#,LOGIC,tSiz,ULCD)
RecallPic - real(3,p#,LOGIC,ULCD)
ScrollScreen - real(4,scrDir,scrStep,ULCD)
ChngContrast - real(5,f#,val). 0=SetContrast;1=ReturnCurrentContrast
UpdateLCD - real(6)
RunIndicator - real(7,value) 0=off;1=on
GetKey - real(8) Returns keycode
CreatePIC - real(9,f#,p#,[1=64 rows]) 0=stoPic;1=DelPic
ExecArcPrgm - real(10,f#,tPrg#) Pass Ans="FN"
GetCalcVer - real(11) Returns calcver. 0=83+;1=SE;2=84+;3=SE
DrawShape - real(12,shapeType,x1,y1,x2,y2,ULCD)
TextMode - real(13,f#,[chr]) 0=uninv;1=inv;2=lwrcse;3=un;4=outputchar
CheckRAM - real(14) Returns amount of free RAM.

Omnicalc Libraries

sprite - real(20,pic#,XPic,YPic,Width,Hight,XPos,YPos,Function)
ExecAsm - real(33,"HEXSTRING")