User Tools

Site Tools


This is an old revision of the document!

Tiny .A to ASCII routine

From somebody in comp.sys.cbm, don't remember who nor if I tweaked it further to get this version. The thread was probably “Converting An 8-bit Number Into A String”, but I couldn't find it in Google.

Converts .A to 3 ASCII/PETSCII digits: .Y = hundreds, .X = tens, .A = ones

  ldy #$2f
  ldx #$3a
- iny
  sbc #100
  bcs -
- dex
  adc #10
  bmi -
  adc #$2f

White Flame (aka David Holz)

base/tiny_.a_to_ascii_routine.1429238053.txt.gz · Last modified: 2015-04-17 04:34 by