Page 1 of 1

16bit integer to string ASM code needed

Posted: Tue Jan 01, 2008 11:32 pm
by xlar54
As stated in the subject line.. can someone help please?

Thanks

Posted: Wed Jan 02, 2008 1:43 am
by nikoniko
There are many different approaches, but here's a link to a fairly simple and easy to understand routine which might be helpful:

http://homepage.mac.com/bobsc/aal/1983/aal8306.html#a3

Posted: Wed Jan 02, 2008 4:39 am
by MacbthPSW
For those times when you just want to print the integer right to the screen, you can use BASIC and the KERNAL:

ldx #low_byte
lda #high_byte
jsr $ddcd ; ($bdcd on C-64)