Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CHR or CHR$ crashing running Spectrum
#4
The library ( <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Library#Text_Handling_Library">http://www.boriel.com/wiki/en/index.php ... ng_Library</a><!-- m --> ) has putchars ( <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Putchars.bas">http://www.boriel.com/wiki/en/index.php ... tchars.bas</a><!-- m --> ), which can drop a single character to the screen as well. It doesn't deal with attributes, which would require a separate function ( like, say <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:WindowPaint">http://www.boriel.com/wiki/en/index.php ... indowPaint</a><!-- m --> ) to do that.

The downside is you have to point it at the data to print on the screen - though there's no reason this can't come from the ROM character table, based on the character set system variable address. You could make a wrapper function that calculates all the numbers and uses puchars at the core.

Or of course write a new fastprint function, perhaps using screen tables ( <!-- l --><a class="postlink-local" href="http://www.boriel.com/forum/how-to-tutorials/topic493.html">how-to-tutorials/topic493.html</a><!-- l --> ) , and add it to the library?

By the way the fastest you are going to get is a method like <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:PutTile">http://www.boriel.com/wiki/en/index.php ... ICTongueutTile</a><!-- m -->
- but this does require a 2 character wide set of data to drop the screen as it uses push and pop to pull 16 bits at a time.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)