Charles,
Do you see any problems with the asm/end asm being a string until the assembler looks at it?
asm = """
mov ecx,[p] 'ADDRESS OF CODE
cmp dword ptr [ecx],&h00905A4D 'DOS `MZ` SIGNATURE: `MZ` 90 00
jnz npef 'SKIP IF NOT PE
add ecx,&hff0 'MOVE o2 ENTRY POINT
npef: '
mov ebx,[psysfuns] 'BASE ADDRESS OF RUNTIME FUNCTION TABLE
call ecx 'CALL CODE
mov [function],eax 'RETURN DATA
"""
I understand that within the ASM code there may be variables references defined by the compiler Basic code.
npef: '
mov ebx,[""" & psysfuns & """] 'BASE ADDRESS OF RUNTIME FUNCTION TABLE
call ecx 'CALL CODE