I wrote this code to demonstrate how to convert a binary number into ASCII digits for display on the screen.  This is a complete program that has been tested on a real TI-99/4A computer.  The code assumes VDP graphics mode I (the default) and includes the VDP routines I wrote as replacements to the ones built into the console ROM.  Also shown are two replacement routines for the I2A routine in the main code.  The first one deals with unsigned values only, and the second deals with unsigned values only and does not track the length of the converted number, i.e. assumes you have a known fixed length to display the number.  Which one you should use totally depend on your specific needs.

Subroutine for unsigned numbers only, minimal version:

Subroutine for unsigned numbers only:

Full code, signed and unsigned:

Tagged on:         

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">