Here's a simple example that I'll walk you through:
sync on
sync rate 0
do
cls
set cursor 0, 0
print screen fps()
sync
loop
When compiled, this code produces the following DBM file (edited to reduce its size a little):
######CODE:
0 PUSH REGISTERS ; PUSH REGISTERS
0 MOV MEM4 ESP @$_ESP_ ; STORE STACK IN MEM
1 LINE : nc on
1 MOV EBX IMM4 [1
1 CALL EBX ; CALL [dbprocore.dll ,?SyncOn@@YAXXZ
1 MOV MEM IMM4 @$_SLN_, 1
1 MOV EAX MEM4 @$_ERR_
1 CMP EAX4 0
1 JNE $labelend ; CALL Normal Runtime Error Hook
#### REMOVED FOR CLARITY ####
4 MOV EBX IMM4 [9
4 CALL EBX ; CALL [dbprocore.dll ,?ProcessMessages@@YAKXZ
4 CMP EAX4 1 ; CONDITION COMPARE
4 JE $labelend ; JUMP IF EQUAL
9 JMP $label0[4] ; DIRECT JUMP
4 MOV MEM IMM4 @$_SLN_, 4
4 MOV EAX MEM4 @$_ERR_
4 CMP EAX4 0
4 JNE $labelend ; CALL Normal Runtime Error Hook
9 LINE : loop
4 MOV EAX MEM4 @$_REK_
4 CMP EAX4 0
4 JNE LEAP
9 MOV EBX IMM4 [10
9 CALL EBX ; CALL [dbprocore.dll ,?Quit@@YAKXZ
9 MOV ESP MEM4 @$_ESP_ ; RESTORE STACK FROM MEM
9 POP REGISTERS ; POP REGISTERS
9 LINE : loop
9 RET ; RETURN
VARIABLES:
@$_ESP_=0 [STRUCT@dword]
@$_ERR_=4 [STRUCT@dword]
@$_ESC_=8 [STRUCT@dword]
@$_REK_=12 [STRUCT@dword]
@$_SLN_=16 [STRUCT@dword]
@$_TEMPA_=20 [STRUCT@dword]
@$_TEMPB_=24 [STRUCT@dword]
@$L0=28 [STRUCT@integer]
@$L1=32 [STRUCT@integer]
@$R1=36 [STRUCT@double integer]
SIZE OF VARIABLE BUFFER = 44
DLLS:
>>1=dbprocore.dll
>>2=DBProSetupDebug.dll
>>3=DBProBasic2DDebug.dll
>>4=DBProTextDebug.dll
COMMANDS:
>>1=1,?SyncOn@@YAXXZ
>>2=1,?SyncRate@@YAXH@Z
>>3=1,?Cls@@YAXXZ
>>4=1,?SetCursor@@YAXHH@Z
>>5=2,?GetDisplayFPS@@YAHXZ
>>6=1,?CastLtoR@@YA_JH@Z
>>7=1,?PrintR@@YAX_J@Z
>>8=1,?Sync@@YAXXZ
>>9=1,?ProcessMessages@@YAKXZ
>>10=1,?Quit@@YAKXZ
LABELS:
$label0[4] code:4 data:0 byte:80
$label1[9] code:9 data:0 byte:355
$labelend code:9 data:0 byte:355
DEBUG:
STRUCT@integer Overall Size:4
STRUCT@float Overall Size:4
STRUCT@string Overall Size:4
STRUCT@boolean Overall Size:1
STRUCT@byte Overall Size:1
STRUCT@word Overall Size:2
STRUCT@dword Overall Size:4
STRUCT@double float Overall Size:8
STRUCT@double integer Overall Size:8
STRUCT@label Overall Size:4
STRUCT@dabel Overall Size:4
STRUCT@integer array Overall Size:4
STRUCT@float array Overall Size:4
STRUCT@string array Overall Size:4
STRUCT@boolean array Overall Size:4
STRUCT@byte array Overall Size:4
STRUCT@word array Overall Size:4
STRUCT@dword array Overall Size:4
STRUCT@double float array Overall Size:4
STRUCT@double integer array Overall Size:4
STRUCT@anytype non casted Overall Size:4
STRUCT@userdefined var ptr Overall Size:4
STRUCT@userdefined array ptr Overall Size:4
As you can see, the DLLs required are:
- DBProCore.dll
- DBProSetupDebug.dll
- DBProBasic2DDebug.dll
- DBProTextDebug.dll
I picked the TEXT command (for the Text plug-in) and the LINE command (for the Basic2D plug-in), ignoring the Core and Setup DLLs, and put the commands into a function (not necessary, but neater):
sync on
sync rate 0
do
cls
set cursor 0, 0
print screen fps()
sync
loop
function NeverToBeRun()
text 0, 0, ""
line 0, 0, 1, 1
endfunction
Then I changed the ExternaliseDLLS value in setup.ini to Yes and recompiled. The same 4 DLLs were listed in the DBM file, so at this point, the executable is runnable.