assembly language in turbo C++
-
this is code of gotoxy, i have made in c++ using assembly, but it is not working and giving an error of "invalid operand". plz help!!!! void _gotoxy(int row,int cols) { asm MOV AH,0x2 asm MOV DH,row// problem is here,if we use asm MOV DL,cols//constant here, it works asm MOV BH,0x0 asm INT 0x10 } void main() { clrscr(); _gotoxy(15,15); printf("x"); getch(); }
-
this is code of gotoxy, i have made in c++ using assembly, but it is not working and giving an error of "invalid operand". plz help!!!! void _gotoxy(int row,int cols) { asm MOV AH,0x2 asm MOV DH,row// problem is here,if we use asm MOV DL,cols//constant here, it works asm MOV BH,0x0 asm INT 0x10 } void main() { clrscr(); _gotoxy(15,15); printf("x"); getch(); }
ummmmmm dh is a 8 bit register so is dl and ints are 16 or 32 bits ... could it be that u are loading the wrong bit of the int value into the register and doing something really squiffy later? also can u access the params by name? i always used to use the stackframe offset :suss:
"... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away"
sonork: 100.18128 8028finder.com -
this is code of gotoxy, i have made in c++ using assembly, but it is not working and giving an error of "invalid operand". plz help!!!! void _gotoxy(int row,int cols) { asm MOV AH,0x2 asm MOV DH,row// problem is here,if we use asm MOV DL,cols//constant here, it works asm MOV BH,0x0 asm INT 0x10 } void main() { clrscr(); _gotoxy(15,15); printf("x"); getch(); }
hmmm, I just answered this exact same question. Two people with the same problem or a case of severe impatience:~ http://www.codeproject.com/script/comments/forums.asp?msg=249735&forumid=1647#xx249735xx
CPUA 0x5041 Sonork 100.11743 Chicken Little "So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies Within you lies the power for good - Use it!