RunTime support functions
These rely upon the ebx register, which holds the address of the
run time function table when your code is called with o2_exec
LoadLibrary
user32=loadlibrary `user32.dll`
FreeLibrary
freelibrary user32
GetprocAddress
msgbox getprocaddress user32,`MessageBoxA`
proc msgbox 0,`Hello`,`greeting`,0
data
create inline data
esi=data
(
nd 1.234
nd 3.14159
nl 2345
)
dataspace
create inline data / workspace
esi=dataspace 512
GetMemory
allocate system memory
esi=getmemory 512
FreeMemory
release memory
freememory esi
Bind
bind DLL calls
bind user32
(
MessageBox MessageBoxA
CreateWindowEx CreateWindowExA
)
messagebox 0,`hello`,`greeting`,0
copy0
for zstrings
copy0 dest,source
copy00
for wstrings
copy0o dest,source
copyn
for any string
copyn dest,source,length
Bookmarks