Page 1 of 1

Printreg16 function not working

Posted: Wed Mar 23, 2005 11:55 am
by tm-
Ok, I was learning that one tutorial, http://www.mega-tokyo.com/forum/index.p ... 31;start=0
and for me the printreg16 function didn't work properly. For some reason, the function prints '0F4C', or something else(reg16 is always 0). What's the problem?

Re:Printreg16 function not working

Posted: Wed Mar 23, 2005 12:42 pm
by Red Shaya
The function prints the value of AX in hex.
so if you copied the function correctly that's probably the value in AX when you call the function. In the example it should be '0F57'.
(it print the value of the top left char on the screen)

'0F4C' should be 'N', so check if 'N' was the char on the top left of your screen.

Re:Printreg16 function not working

Posted: Wed Mar 23, 2005 1:17 pm
by tm-
Oh, stupid me.. I put ax value to reg16 and then use reg16. I just didn't notice that :)