Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
an additional label in <library-asm/print.asm>
#1
Mi wish is easy to satisfy: I need one label after CP 80h in <print.asm>:

Code:
ex af, af'

        cp 80h  ; Is the char an UDG, a block character or a token?
JUMP_IF_GREATER_THAN_80H:
        ; XXX label needed to hack the printing system
        jp c, __SRCADDR ; if not, jump

(That is an extract from my hacked version of <print.asm>, with additional comments of my own; the actual name of the label doesn't matter.)

The reason I need a label there is I have written a module that provides a sub to switch on an off the ZX Spectrum legacy printing mode (that treats ASCII chars, block chars and UDG chars apart). When the legacy mode is off, all chars 32-255 are taken from the same charset. This makes it possible to write source code with a modern 8-bit encoding, e.g. Latin1. This is very useful for programs that print a lot of text in other languages than English.

I tinkered with this idea four years ago, and hacked <print.asm>, but I had to redo the changes after every new version of ZX BASIC. The new approach is simpler and better: The sub modifies the code of <print.asm> in two locations, and the legacy printing mode can be restored at any time by the program. It works great. So far I have tried it with a modified version of <print.asm>. That's why I need that single label.

I will publish the module as soon as it can be used with a new version of ZX BASIC, unless someone requires it sooner.

Thank you.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)