16bit integer to string ASM code needed

Basic and Machine Language

Moderator: Moderators

Post Reply
xlar54
Vic 20 Newbie
Posts: 15
Joined: Tue Sep 27, 2005 11:41 pm

16bit integer to string ASM code needed

Post by xlar54 »

As stated in the subject line.. can someone help please?

Thanks
nikoniko
Vic 20 Newbie
Posts: 2
Joined: Mon Dec 31, 2007 11:44 am

Post 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
MacbthPSW
Vic 20 Afficionado
Posts: 478
Joined: Wed Apr 06, 2005 1:56 pm

Post 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)
Post Reply