There's usually a route in any language, but you need to faff about for a day or two because these things aren't always documented
Declare a global memory op space in your flavour of HLL. DIM LABELNAME1(0)
Then search for the asm syntax which puts the address into eax
mov eax, ^LABELNAME(0)
mov eax, dword [_lablename]
mov eax, ^_lablename
etc etc etc
then pop it in asm
You won't find pop [^
anywhere on google, but it's one which works in certain HLLs
push eax
pop [^LABELNAME1(0)]
Now your HLL and asm can chat to each other whenever you like
So it's well worth figuring out
Undefined symbol _labelname
Probbly needs to be declared at the very start of the program
._labelname
mov dword [_lablename], 0
and used later by asm as a label
As I say, you'll have to mess about and suss it out for your particular flavour of HLL, and globals seem to work best
You'll also need to figure out how to declare separate memory zones for storing asm dynamic variables and running the opcodes or you'll get cache overwrites which will cripple the speed advantages of asm
A small routine I wrote without separating these asm areas took 20 hours to run. With separation it took 1 hour
mov ax, OFFSET _labelname
This is 16 bit stuff, (DOS etc, with goofy memory rules) aren't you doing 32 bit stuff with your HLL???
Unless it's all happening in one segment you will need a double memory operand to find _labelname
, dx:ax
etc, and as mentioned previously, you're 20 years too late
jmp cs:_labelname
Works in the same segment but for a bigger program the cs part will need to be a specific segment override and a far jump/return
Additionally, if your dynamic asm variables are plonked into your asm code segment then a cardinal rule for maximising asm speed has been broken