TheInsider
Programmer
Hello,
I'm not sure if this is a C++ or TASM question so I posted it in both forums... I just downloaded a copy of Borland C++ 1.01 from the Borland Museum. Great compiler, but when I use the ASM{} directive to define Assembly code, I get "Error: Undefined label 'label1' in function clear_screen" if I try to define a label!
I've also tried _label1: and just _label1 with no ":". No matter what it completely ignores my label definition line. What is the correct syntax?... in pure assembly the above should work -- at least in MASM and Arrowsoft Assembler. (I haven't used TASM in 5 or 6 years)
Thank you in advance,
Rob
I'm not sure if this is a C++ or TASM question so I posted it in both forums... I just downloaded a copy of Borland C++ 1.01 from the Borland Museum. Great compiler, but when I use the ASM{} directive to define Assembly code, I get "Error: Undefined label 'label1' in function clear_screen" if I try to define a label!
Code:
int clear_screen(void){
asm{
mov ax, 0A000h
mov es, ax
mov di, 00h
label1:
mov es:[di], 00h
inc di
cmp di, 0FA00h
jl label1
}
return(0);
}
Thank you in advance,
Rob