On Sat, 25 May 2002, Ken Martwick wrote: > How does one write inline assembly code in "bcc" to move > a register value to a "C" variable? The following code > is acceptable to "bcc", but "ld86" fails with something > about undefined variables. I couldn't find any examples. Because until recently it didn't work with local variables. For the most recent version I've found a way of fixing the old bug where mixed C & assembler may get out of sequence and added some more 'magic' symbols for frame pointer offsets to the local variables (as opposed to the existing stack pointer relative offsets). The general method is something like this: void mem_check() { /* Try int $15 EAX=$E801 */ { unsigned int mem_64, mem_16; /* For int $15,AX=$E801 */ #asm mov ax,#$E801 int $15 jc no_e801 mov .mem_check.mem_16[bp],ax mov .mem_check.mem_64[bp],bx #endasm main_mem_top = ((unsigned long)mem_64<<6) + mem_16; #asm no_e801: #endasm } } I've attached the whole function which has a couple of other bits too. -- Rob. (Robert de Bath )