Hi Emil,
OIL (OxygenBasic Intermediate Code) is in an imaginary state at present, so there is plenty of scope for thinking about syntax. As a compiling layer, though it is very real, specifying all operations, type conversions, call types, function headers, footers etc. There are about 40 instructions so far. But I am not sure how a programmer would benefit from using this layer. Could be an entry- point for other languages.
Oxygen has a fair amount of Macro-muscle and also a simple block structure to promote high-level assembly:
Macros are often better than attempting fast-calls. You don't have the overhead of function prologs and epilogs.
Here is a byte copy example:
with the improved addr instruction it should work with a wide range of types:
macro bytecopy(dest,src,c)
scope
let n=c 'allow functions
addr ecx,src
push ecx
addr ecx,dest
mov edi,ecx
pop esi
mov ecx,n
(
dec ecx
jl exit
mov al,[esi]
mov [edi],al
inc esi
inc edi
repeat
)
end scope
end macro
'test
string a=space 12
string b="abcde"
bytecopy(a,b,len b)
print a
Charles