.POK - examples
================

.POK is a memory writer dot-command for esxDOS on ZX Spectrum.

.POK is very similar to the ZX BASIC POKE command, but it can
do a thousand times more. :-)

Values 0..255 take 1 byte, 256..65535 two bytes, larger
numbers three bytes, all little-endian.  Strings in single
quotes are raw chars; strings in double quotes get bit 7 set
on the last char (ZX Basic token-terminator, Prometheus
assembler and Lnx Assembler style).
Numbers accept any base: decimal, hex, binary.


Single write
------------

  .POK 40000 12, 167899 65535 'alfa', $11; 's', 1000h, "abeceda"

This writes, starting at address 40000:
  - byte 12
  - three bytes (167899 little-endian)
  - two bytes (65535)
  - four bytes ('alfa' - raw chars)
  - byte $11
  - one byte (char 's')
  - two bytes (1000h)
  - seven bytes ("abeceda" - and the last char has bit 7 set)


Repeating a sequence (-r N)
---------------------------

The same line, but writing the sequence 10 times in a row:

  .POK -r 9 40000 12, 167899 65535 'alfa', 11, 's', 1000, "abeceda"

       -r N writes the sequence N+1 times 


Spaced copies (-s N M)
----------------------

Spread copies across memory.  N+1 copies, each at stride M:

  .POK -s 7 4096 32768 'SIGN'

This places 'SIGN' at every 4 KB boundary of the upper RAM:
 $8000, $9000, $A000, ..., $F000 - eight copies in total.

  .POK -s 1 1000 50000 201 205 49

Same three bytes written twice: once at 50000 and once at 51000.


Delta after a value (+D or -D)
------------------------------

A "+D" or "-D" right after a value or string adds D (0..255)
to that value once per pass.  Works only with -r or -s.

  .POK -r 5 60000 100 -10

7 writes, starting at 60000:  100, 90, 80, 70, 60, 50, 40

  .POK -r 5 60000 250 +2

6 writes:  250, 252, 254, 0, 2, 4  (wraps within 1-byte width)


Delta D=0, added poking in one pass 
-----------------------------------

  .POK -r 0 30000 ´ABECEDA" -65

The -r 0 shortcut is a special case with only one pass, but
delta was already active. This example writes alphabet codes
shifted by 65 - so 'ABECEDA' produces: 0, 1, 4, 2, 4, 3, 0
Using "ABECEDA" will produce: 0, 1, 4, 2, 4, 3, 128.

Greetz, SCjoe.
