********************************************************************
*                                                                  *
*     Scribble 1.7                                                 *
*                                                                  *
*     by Andrew Howlett, howlett@iosphere.net                      *
*     based on code by Darrin Massena                              *
*     thanks to Stephan Gehring for debugging                      *
*                                                                  *
*     Freeware, 5 January 1997                                     *
*                                                                  *
********************************************************************

DESCRIPTION

Scribble turns the 160x160 pixel LCD panel into a simple notepad,
upon which you can scribble names, telephone numbers, etc.  Scribble,
with one page of data, occupies less than 5k of RAM.

Scribble saves the screen when you exit the app and restores it
when you relauch the app.  Enter 'C' on the graffiti writing area
to clear the display (or choose clear from the menu).

Scribble supports multiple pages, stored in a PalmOS database.  Enter
'N' on the graffiti writing area to create a new page.  Use the page up
and page down buttons to change pages. Graffiti space and backspace will
also change pages. 'R' will remove the page.  A number in the bottom 
right corner tells you which page you're on.

Scribble will not tell you if an error occurs - dialog boxes cost RAM.
For instance if you try to create a new page but don't have enough memory,
it will just ignore you.

MEMORY REQUIREMENTS

Scribble occupies only 2048 bytes of memory, however each database
record (that is, each page) uses 2840 bytes of dynamic heap.  Therefore
the minimum RAM requirement is about 5k.

Pilot will load if you have 2k free, but it will crash if you have less
than 5k (it has to be able to create at least one database record).

WHAT'S THE DIFFERENCE BETWEEN SCRIBBLE AND DINKY PAD

Dinky Pad is better.  Dinky Pad is bigger.  To fit Dinky Pad on my Pilot
1000 I would have to delete Chess :-(

SOURCE CODE

Source code is included for your amusement.  Source files are:

    Scribble.asm            PILA asm file
    Scribble.rcp            PILRC resource file
    Scribble.bmp            Icon
    Make.bat                batch file to make prc

The code was formatted for a 100 column editor using 8 space tabs.
Debug code was left in the asm file but commented out.

How does it work?  Scribble is very simple coding.  Scribble catches
PenDownEvent, PenMoveEvent, and PenUpEvent.  For PenDownEvent, it 
stores the X,Y coordinates in lastX and lastY.  For PenMoveEvent and
PenUpEvent it draws a line from (lastX,lastY) to (X,Y) and then stores 
X,Y in lastX,lastY.  To save the screen, scribble creates a database
called ScribbleDB and stores LCD memory, from $6518 to $7030, 
in a database record.  Each Scribble page shows up as a Scribble record 
in the Memory ap.

Notice that it starts the LCD screen at $6518, not $63b0.  The first 18 
lines (360 bytes) of the LCD display are used by the form title bar.  
By starting at $6518 scribble doesn't overwrite the title bar drawn by 
frmDrawForm.

When you leave Scribble it stores your current page in the application
preferences database.  When you launch scribble, it gets the most recent
page from the application preferences database.

The Creator ID for scribble is 'Scrb'.  It's registered to me from
Palm Computing.  If you modify this code, make sure you get your own
Creator ID before distributing.  You can get a Creator ID from
"Developer Support <devsupp@palm.com>".

I enjoy talking about PILA coding.  Please send email if you have 
questions or comments.

Merry Christmas & Happy New Year,
Andrew Howlett
howlett@iosphere.net
3 January 1997

**************************
*                        *
*     MODIFICATIONS      *
*                        *
**************************

30 Dec 96, Version 1.1

Removed Graffitistateindicator 0 150 from form 1000.
                   
3 Jan 97, Version 1.5

Created ScribbleDB, multipage, page number.

5 Jan 97, Version 1.6

Fixed bottom of page random lines bug.

6 Jan 97, Version 1.7

change pages using the page up and page down buttons
