TheInsider
Programmer
Hello,
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?
Thank you in advance,
Rob
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);
}
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?
Thank you in advance,
Rob