git @ Cat's Eye Technologies SixtyPical / 0.18 eg / rudiments / support / stdlib.60p
0.18

Tree @0.18 (Download .tar.gz)

stdlib.60p @0.18raw · history · blame

byte table[16] hexchars : "0123456789ABCDEF"

define prbyte routine
  inputs a, hexchars
  trashes a, z, n, c, v
{
    save x {
        save a {
            st off, c
            shr a
            shr a
            shr a
            shr a
            and a, 15
            ld x, a
            ld a, hexchars + x
            call chrout
        }
        save a {
            and a, 15
            ld x, a
            ld a, hexchars + x
            call chrout
        }
    }
}