This package maintain current cursor position and current line start, so caller don't have to compute screen address at each character.
I.e. disp_chr works like &bb5a (but doesn't preserve registers !).

All *_at version are shortcut, calling disp_locate beforehand.
All *_nl version are shortcut, calling disp_nl afterward.

+0 disp_init

Initialize screen parameters for text display.
Set write location to &C000.

In: A = Screen width in words (40 standard, 32 for Monogams)
Out: BC, DE, HL corrupted.

+3 disp_cls

Clear screen fast, and set write location to &C000

Out: A, BC, DE, HL corrupted.

+6 disp_locate_scr

Set write location (position in screen, eg &C000), which also will be used as start of line.

In : DE = location (from &C000 to &C7ff)
Out: All registers preserved.

+9 disp_locate_x

Change location to "start of current line + x".

In : A = x
Out: A corrupted, all other registers preserved.

+C disp_locate_inc

Increment location (typically used for space when we know screen was cleared, so we don't have to explictly write a space character).

Out: All registers preserved.

+f disp_chr

Display chr at current location.

In : A=chr. Bit 7 set for video inverse.
Out: A, BC, DE, HL, IX, IY corrupted.

+12 disp_chr_at

+15 disp_chr_shaded

+18 disp_chr_shaded_at

+1B disp_text

Display zero terminated text at current location.

In : BC= zero terminated string.
Out: BC= past string (after zero).
A, DE, HL, IX, IY corrupted.

+1e disp_text_at

+21 disp_text_shaded

Like disp_text, but using shaded font.

+24 disp_text_shaded_at

+27 disp_text_inv

Like disp_text, but with video inversion.

+2a disp_text_inv_at

+2d disp_text_nl

+30 reserved.

+33 reserved.

+36 disp_inline

Display 0 terminated text placed after the call.

   call disp_inline:byte "Wouh!",0  ;Don't forget the 0 !

+39 disp_inline_at

+3C disp_inline_nl

+3F reserved

+42 disp_nl

Go at start of next line.

+45 reserved

+48 disp_deci_a

Display decimal value of A, skipping leading 0s.
NB: Leading 0s are not replaced by spaces, so the result is left justified.

+4B disp_deci_a_inv

+4E disp_deci_a_shaded

+51 disp_deci_hl

As disp_deci_a but for 16 bits value in HL.

+54 disp_deci_hl_inv

+57 disp_deci_hl_shaded

+5a disp_hexa_a

Display hexadecimal value of A, leaving leadings 0s, so it always take 2 chars.

+5d disp_hexa_a_inv

+60 disp_hexa_a_shaded

+63 disp_hexa_hl

As disp_hexa_a bit for 16 bits value in HL.

+66 disp_hexa_hl_inv

+69 disp_hexa_hl_shaded

+6C put_deci_a

+6F put_deci_hl

+72 put_hexa_a

+75 put_hexa_hl

Sauf mention contraire, le contenu de cette page est protégé par la licence Creative Commons Attribution-ShareAlike 3.0 License