Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_33.ADF » P/+EDOC2

P/+EDOC2

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_33.ADF
Filename: P/+EDOC2
Read OK:
File size: 278B bytes
Load address: 0000
Exec address: FFFFFFFF
File contents
Editremarks V2.00

Edit (C)1995-1997 SPROW


History:


Editcore

V1.00 Original BASIC version (Sept 1995)

V2.00 Version to use new features of M/C calls in Edit V2.00.Never finished 

      due to problems with the machine code.Keyboard entry is no longer case

      sensitive,so CAPs lock can be on or off.(Dec 1996).

V3.00 Re-release version now uses PROCs for speed.Also makes full use of

      the new Edit V3.01,and uses integar variables with meaningful names

      throughout.This was not possible before as memory was tight due to 

      masses of duplicated bulky BASIC code everywhere!.If in text entry mode

      the entered text may now also be deleted,without corrupting the image

      behind.(March 1997)

V3.05 Fixed bug in text entry part whereby OS would get confused as it was

      sent coordinates that were off the screen,since X% and Y% were out of

      range.Also,'String too long' occurred if you typed for ages without

      pressing return.(April 1997)


Edit

V1.00 Original BASIC version (Sept 1995)

V2.00 Converted time dependant routines to M/C,inc.box drawing and scanning 

      of keyboard.Boxes could only be dragged from top left to bottom right

      otherwise the assembler would go mad.(Nov 1996)

V3.00 Realised keyboard scanning wasn't being slowed by BASIC,it was the line

      drawing that took all the time.Removed box drawing routine from M/C so

      now boxes are considered as a series of horizontal and vertical lines.

      Also,co-ordinates are size ordered and range checked and clipped if

      appropriate so boxes can be dragged in ANY direction.The size ordering

      is reversed on exit so as not to confuse BASIC.(March 1997)

V3.05 Reduced HIMEM to stop BASIC overwriting screen memory (March 1997)


Editenlarged

V1.00 Original BASIC version (Sept 1995)

V2.00 Tidied code,and made it compatible with the new EDITCLP file format 

      (uses integar variables for co-ordinates now).Speed improvements

      added for initial loading of file due to use of ! operator instead of

      several ? operators.Similarly for toggling of pixels. (March 1997)

V2.05 Changed a FOR...NEXT loop so that one less calculation was reqd per

      itteration of the main loading loop.Saves time.

V2.10 Cursor used to be able to go outside the bounds of the area being edited.

      This didn't affect the result saved to the clipboard though. (March 1997)


Variables:


EDIT

~~~~

key% holds the ASCii value of the last pressed button

X%,Y%,P%,Q% define the position of the cursor

addr% is the address at which to assemble (code length is approx half a kB)

exist% is the handle of the file requested by the user,if it exists

wait% is a dummy variable and is set to -1 if the INKEY times out

F$ holds the filename of the file requested by the user


EDITCRE

~~~~~~~

buffer% is a block of memory used to hold what was behind the message/prompt 

        box,bottom left

row% is a block of memory used to buffer the clipboard file when loading back 

        in snippets

key% holds the ASCii value of the last pressed button

step% is 2 if shift wasn't pressed or 10 if shift was pressed

X%,Y% are the current pixel coordinate

P%,Q% will be the other pair of coordinates,eg when dragging a box 2 points 

      are required to define a rectangle

M$ is used by the message box generator,and hold the string to be shown

off% is a general offset pointer,used in lots of places

wait% is a dummy variable and is set to -1 if the INKEY times out

t%,b%,l%,r% are a copy of Y%,Q%,X%,P% when it is required that Y%,Q%,X%,P% need

            to be manipulated

tempX% and tempY% are backup copies of X% and Y% as X% and Y% are used as 

                  parameter to call the machine code

data% is used to hold value read from screen memory

line$ is the string entered so far when text is being overlayed

F is a file handle


EDITENL

~~~~~~~

F is a file handle

width% holds the snippet width

height% holds the snipped depth

posx%,posy% is where the cursor is at the moment

bit% is a mask for isolating individual binary bits

offset% is the location currently being considered

data% is the byte got from a file

result% is data% after the bit being considered has been masked out

poke% is where in memory to put the value

X%,Y%,P%,Q% as before


Workings:


EDIT

~~~~

Ensure output is to screen only,shift screen down because of my monitor,speed 

up the repeat rate,and make the cursors do ASCii values so that you can't get 

that white square appearing in Mode 7

-

Menu chooses whether to goto the loadit proc or the new proc

-

Assemble the code,turn off error handling,and goto the main program

-

Assembler is commented as and when required,and integar variables (held even 

when CHAINing between programs) are set to important entry points.This means 

that if the code improved in the future only 'EDIT' need be updated,and the 

other programs in the suite can make use of the new features.

-

Procload gives the opportunity to put in you 'screen images' disk or whatever,

or just press a key to skip past that prompt.If the file can't be found,then 

the program is rerun.Otherwise Mode is changed and the file is loaded,

irrespective of whether it is the right length etc...

-

Procnew just changes mode to black the screen and returns


EDITCRE

~~~~~~~

Reset keyboard repeat rate incase EditENL altered it,and DIM some memory

-

Enter main loop,poll the keyboard for some action,if it's a cursor key then 

adjust the pointer's position accordingly,depending on whether SHIFT was 

pressed then the step rate is either *1 or *5 pixels at a time.

If the key pressed wasn't a cursor key,see if it was one of the keys that 

we're waiting for (by anding with &DF) caps lock can be on or off.

-

Procmssg,reads from the bottom of the screen memory,keeping this safe in the 

buffer and then types over the area with M$,the user is gven 1 second to read 

this,before the former screen is restored.

-

Proccursor,draws a scaled down box around the cursor,this routine is very 

simple as clipping is performed by the machine code,so no range checking need 

be done.

-

Procframe,draws a border defined by the entry parameters by considering a box 

to be a set of 2 horzontal and 2 vertical lines.

-

Procexpand,repeatedly calls procframe,keeping one set of coordinates constant

and enlarging the other defined by which cursor key is pressed and the step 

defined by whether shift was held down at the time.On receipt of a 'COPY',

chr$135 the values are ANDed with &FFFF so as only the bottom two bytes are

ever checked by the M/C routines,but BASIC allows 4 byte integars.If the value

has no depth or width,or none of either,then a message is flagged and you must

give the box some size at least 2*2 in size.Lastly,the coordinates are size 

ordered.This is ESSENTIAL,because all other routines assume they are,this

allows the box to be dragged from any corner,and not just top left down.

-

Procdragframe

Move the whole box around the screen by adding offsets to BOTH the start and

finish coordinates.Note that the box may be dragged off the screen,this is

used mainly when pasting areas back from the clipboard,they can be cropped by

the limits of the monitor.

-

Procsaveselect

This puts to a file only multiples of WHOLE bytes to a file.This makes saving

faster and easier.

-

Procloadselect

As a trade off of Procsaveselect being simple the reloading becomes more

complex as not all of the bits in the file are needed.On entry X,Y,P,Q are

copied as this is to be the destination,then the source X,Y,P,Q are

restored by looking at the file.The routine cycles through one line at a time,

first reading each row into a memory buffer then interpretting these values.The

destination coordinate is calculated in X% and Y% is already set by the loop.

A test is made to see if the pixel is on the screen or not (USR(T%) - test 

range),if it isn't then that is skipped to save time,and to stop the clipboard

being pasted in two different places on the screen! If it was on the screen,

then the byte is read that refers to X%.Lastly,a bit comparison is made to 

see if the bit in the byte from the screen (data% from USR(G%) - get byte) 

matches that from the file buffer (?row%+some offsets).If they match no action

is required,otherwise toggle the pixel to the correct value (CALL C% - 

calculate and write pixel).

-

Procclearselect,follows the same idea as procsaveselect but instead of filling

the file with values read from the screen it is filled with a pattern.0 and 

255 for black and white,or 170 for grey (binary 10101010).The renaming of the

old clipboard file means that it is preserved,as the end user shouldn't know

that when filling an area they are infact just loading a clipboard file in!

-

FNditherbw,chooses the fill 'colour'

-

Proctext,uses VDU5 and the OS's built in character set to write text by 

exclusive oring.Delete function would not be possible unless the EOR option 

was used,as to delete the text you simply exclusive OR a letter with itself

-

Procedit,checks the selection size and warns if it is too big,otherwise saves

the current screen to 'OUTPUT' and goes onto EDITENL

-

FNscanclip,just tests the existance of a clipboard file,returning the handle.


EDITENL

~~~~~~~

Turns the cursor off again,as a mode change restores the cursor.

Load in the file,by scanning through it serially and setting bytes in the 

screen to match the bit being scanned.The ! operator inproves speed.

Once loaded,the cursor keys are set to return ASCii and tab toggles the

screen bytes by EORing with &FFFFFFFF,again the ! operator is used.Checks are

made to ensure that the cursor hasn't moved beyond the bounds of the snippet.

When done,the reverse process to loading is performed,ie.the bit to put to file

is determined by reading the screen memory.

It is the responsibility of EditENL to reload the main picture as EditCRE 

doesn't do this,to make the snippet paste itself the keyboard is stuffed 

with "P" using FX138


00000000  45 64 69 74 72 65 6d 61  72 6b 73 20 56 32 2e 30  |Editremarks V2.0|
00000010  30 0a 0d 45 64 69 74 20  28 43 29 31 39 39 35 2d  |0..Edit (C)1995-|
00000020  31 39 39 37 20 53 50 52  4f 57 0a 0d 0a 0d 48 69  |1997 SPROW....Hi|
00000030  73 74 6f 72 79 3a 0a 0d  0a 0d 45 64 69 74 63 6f  |story:....Editco|
00000040  72 65 0a 0d 56 31 2e 30  30 20 4f 72 69 67 69 6e  |re..V1.00 Origin|
00000050  61 6c 20 42 41 53 49 43  20 76 65 72 73 69 6f 6e  |al BASIC version|
00000060  20 28 53 65 70 74 20 31  39 39 35 29 0a 0d 56 32  | (Sept 1995)..V2|
00000070  2e 30 30 20 56 65 72 73  69 6f 6e 20 74 6f 20 75  |.00 Version to u|
00000080  73 65 20 6e 65 77 20 66  65 61 74 75 72 65 73 20  |se new features |
00000090  6f 66 20 4d 2f 43 20 63  61 6c 6c 73 20 69 6e 20  |of M/C calls in |
000000a0  45 64 69 74 20 56 32 2e  30 30 2e 4e 65 76 65 72  |Edit V2.00.Never|
000000b0  20 66 69 6e 69 73 68 65  64 20 0a 0d 20 20 20 20  | finished ..    |
000000c0  20 20 64 75 65 20 74 6f  20 70 72 6f 62 6c 65 6d  |  due to problem|
000000d0  73 20 77 69 74 68 20 74  68 65 20 6d 61 63 68 69  |s with the machi|
000000e0  6e 65 20 63 6f 64 65 2e  4b 65 79 62 6f 61 72 64  |ne code.Keyboard|
000000f0  20 65 6e 74 72 79 20 69  73 20 6e 6f 20 6c 6f 6e  | entry is no lon|
00000100  67 65 72 20 63 61 73 65  0a 0d 20 20 20 20 20 20  |ger case..      |
00000110  73 65 6e 73 69 74 69 76  65 2c 73 6f 20 43 41 50  |sensitive,so CAP|
00000120  73 20 6c 6f 63 6b 20 63  61 6e 20 62 65 20 6f 6e  |s lock can be on|
00000130  20 6f 72 20 6f 66 66 2e  28 44 65 63 20 31 39 39  | or off.(Dec 199|
00000140  36 29 2e 0a 0d 56 33 2e  30 30 20 52 65 2d 72 65  |6)...V3.00 Re-re|
00000150  6c 65 61 73 65 20 76 65  72 73 69 6f 6e 20 6e 6f  |lease version no|
00000160  77 20 75 73 65 73 20 50  52 4f 43 73 20 66 6f 72  |w uses PROCs for|
00000170  20 73 70 65 65 64 2e 41  6c 73 6f 20 6d 61 6b 65  | speed.Also make|
00000180  73 20 66 75 6c 6c 20 75  73 65 20 6f 66 0a 0d 20  |s full use of.. |
00000190  20 20 20 20 20 74 68 65  20 6e 65 77 20 45 64 69  |     the new Edi|
000001a0  74 20 56 33 2e 30 31 2c  61 6e 64 20 75 73 65 73  |t V3.01,and uses|
000001b0  20 69 6e 74 65 67 61 72  20 76 61 72 69 61 62 6c  | integar variabl|
000001c0  65 73 20 77 69 74 68 20  6d 65 61 6e 69 6e 67 66  |es with meaningf|
000001d0  75 6c 20 6e 61 6d 65 73  0a 0d 20 20 20 20 20 20  |ul names..      |
000001e0  74 68 72 6f 75 67 68 6f  75 74 2e 54 68 69 73 20  |throughout.This |
000001f0  77 61 73 20 6e 6f 74 20  70 6f 73 73 69 62 6c 65  |was not possible|
00000200  20 62 65 66 6f 72 65 20  61 73 20 6d 65 6d 6f 72  | before as memor|
00000210  79 20 77 61 73 20 74 69  67 68 74 20 64 75 65 20  |y was tight due |
00000220  74 6f 20 0a 0d 20 20 20  20 20 20 6d 61 73 73 65  |to ..      masse|
00000230  73 20 6f 66 20 64 75 70  6c 69 63 61 74 65 64 20  |s of duplicated |
00000240  62 75 6c 6b 79 20 42 41  53 49 43 20 63 6f 64 65  |bulky BASIC code|
00000250  20 65 76 65 72 79 77 68  65 72 65 21 2e 49 66 20  | everywhere!.If |
00000260  69 6e 20 74 65 78 74 20  65 6e 74 72 79 20 6d 6f  |in text entry mo|
00000270  64 65 0a 0d 20 20 20 20  20 20 74 68 65 20 65 6e  |de..      the en|
00000280  74 65 72 65 64 20 74 65  78 74 20 6d 61 79 20 6e  |tered text may n|
00000290  6f 77 20 61 6c 73 6f 20  62 65 20 64 65 6c 65 74  |ow also be delet|
000002a0  65 64 2c 77 69 74 68 6f  75 74 20 63 6f 72 72 75  |ed,without corru|
000002b0  70 74 69 6e 67 20 74 68  65 20 69 6d 61 67 65 0a  |pting the image.|
000002c0  0d 20 20 20 20 20 20 62  65 68 69 6e 64 2e 28 4d  |.      behind.(M|
000002d0  61 72 63 68 20 31 39 39  37 29 0a 0d 56 33 2e 30  |arch 1997)..V3.0|
000002e0  35 20 46 69 78 65 64 20  62 75 67 20 69 6e 20 74  |5 Fixed bug in t|
000002f0  65 78 74 20 65 6e 74 72  79 20 70 61 72 74 20 77  |ext entry part w|
00000300  68 65 72 65 62 79 20 4f  53 20 77 6f 75 6c 64 20  |hereby OS would |
00000310  67 65 74 20 63 6f 6e 66  75 73 65 64 20 61 73 20  |get confused as |
00000320  69 74 20 77 61 73 0a 0d  20 20 20 20 20 20 73 65  |it was..      se|
00000330  6e 74 20 63 6f 6f 72 64  69 6e 61 74 65 73 20 74  |nt coordinates t|
00000340  68 61 74 20 77 65 72 65  20 6f 66 66 20 74 68 65  |hat were off the|
00000350  20 73 63 72 65 65 6e 2c  73 69 6e 63 65 20 58 25  | screen,since X%|
00000360  20 61 6e 64 20 59 25 20  77 65 72 65 20 6f 75 74  | and Y% were out|
00000370  20 6f 66 0a 0d 20 20 20  20 20 20 72 61 6e 67 65  | of..      range|
00000380  2e 41 6c 73 6f 2c 27 53  74 72 69 6e 67 20 74 6f  |.Also,'String to|
00000390  6f 20 6c 6f 6e 67 27 20  6f 63 63 75 72 72 65 64  |o long' occurred|
000003a0  20 69 66 20 79 6f 75 20  74 79 70 65 64 20 66 6f  | if you typed fo|
000003b0  72 20 61 67 65 73 20 77  69 74 68 6f 75 74 0a 0d  |r ages without..|
000003c0  20 20 20 20 20 20 70 72  65 73 73 69 6e 67 20 72  |      pressing r|
000003d0  65 74 75 72 6e 2e 28 41  70 72 69 6c 20 31 39 39  |eturn.(April 199|
000003e0  37 29 0a 0d 0a 0d 45 64  69 74 0a 0d 56 31 2e 30  |7)....Edit..V1.0|
000003f0  30 20 4f 72 69 67 69 6e  61 6c 20 42 41 53 49 43  |0 Original BASIC|
00000400  20 76 65 72 73 69 6f 6e  20 28 53 65 70 74 20 31  | version (Sept 1|
00000410  39 39 35 29 0a 0d 56 32  2e 30 30 20 43 6f 6e 76  |995)..V2.00 Conv|
00000420  65 72 74 65 64 20 74 69  6d 65 20 64 65 70 65 6e  |erted time depen|
00000430  64 61 6e 74 20 72 6f 75  74 69 6e 65 73 20 74 6f  |dant routines to|
00000440  20 4d 2f 43 2c 69 6e 63  2e 62 6f 78 20 64 72 61  | M/C,inc.box dra|
00000450  77 69 6e 67 20 61 6e 64  20 73 63 61 6e 6e 69 6e  |wing and scannin|
00000460  67 20 0a 0d 20 20 20 20  20 20 6f 66 20 6b 65 79  |g ..      of key|
00000470  62 6f 61 72 64 2e 42 6f  78 65 73 20 63 6f 75 6c  |board.Boxes coul|
00000480  64 20 6f 6e 6c 79 20 62  65 20 64 72 61 67 67 65  |d only be dragge|
00000490  64 20 66 72 6f 6d 20 74  6f 70 20 6c 65 66 74 20  |d from top left |
000004a0  74 6f 20 62 6f 74 74 6f  6d 20 72 69 67 68 74 0a  |to bottom right.|
000004b0  0d 20 20 20 20 20 20 6f  74 68 65 72 77 69 73 65  |.      otherwise|
000004c0  20 74 68 65 20 61 73 73  65 6d 62 6c 65 72 20 77  | the assembler w|
000004d0  6f 75 6c 64 20 67 6f 20  6d 61 64 2e 28 4e 6f 76  |ould go mad.(Nov|
000004e0  20 31 39 39 36 29 0a 0d  56 33 2e 30 30 20 52 65  | 1996)..V3.00 Re|
000004f0  61 6c 69 73 65 64 20 6b  65 79 62 6f 61 72 64 20  |alised keyboard |
00000500  73 63 61 6e 6e 69 6e 67  20 77 61 73 6e 27 74 20  |scanning wasn't |
00000510  62 65 69 6e 67 20 73 6c  6f 77 65 64 20 62 79 20  |being slowed by |
00000520  42 41 53 49 43 2c 69 74  20 77 61 73 20 74 68 65  |BASIC,it was the|
00000530  20 6c 69 6e 65 0a 0d 20  20 20 20 20 20 64 72 61  | line..      dra|
00000540  77 69 6e 67 20 74 68 61  74 20 74 6f 6f 6b 20 61  |wing that took a|
00000550  6c 6c 20 74 68 65 20 74  69 6d 65 2e 52 65 6d 6f  |ll the time.Remo|
00000560  76 65 64 20 62 6f 78 20  64 72 61 77 69 6e 67 20  |ved box drawing |
00000570  72 6f 75 74 69 6e 65 20  66 72 6f 6d 20 4d 2f 43  |routine from M/C|
00000580  20 73 6f 0a 0d 20 20 20  20 20 20 6e 6f 77 20 62  | so..      now b|
00000590  6f 78 65 73 20 61 72 65  20 63 6f 6e 73 69 64 65  |oxes are conside|
000005a0  72 65 64 20 61 73 20 61  20 73 65 72 69 65 73 20  |red as a series |
000005b0  6f 66 20 68 6f 72 69 7a  6f 6e 74 61 6c 20 61 6e  |of horizontal an|
000005c0  64 20 76 65 72 74 69 63  61 6c 20 6c 69 6e 65 73  |d vertical lines|
000005d0  2e 0a 0d 20 20 20 20 20  20 41 6c 73 6f 2c 63 6f  |...      Also,co|
000005e0  2d 6f 72 64 69 6e 61 74  65 73 20 61 72 65 20 73  |-ordinates are s|
000005f0  69 7a 65 20 6f 72 64 65  72 65 64 20 61 6e 64 20  |ize ordered and |
00000600  72 61 6e 67 65 20 63 68  65 63 6b 65 64 20 61 6e  |range checked an|
00000610  64 20 63 6c 69 70 70 65  64 20 69 66 0a 0d 20 20  |d clipped if..  |
00000620  20 20 20 20 61 70 70 72  6f 70 72 69 61 74 65 20  |    appropriate |
00000630  73 6f 20 62 6f 78 65 73  20 63 61 6e 20 62 65 20  |so boxes can be |
00000640  64 72 61 67 67 65 64 20  69 6e 20 41 4e 59 20 64  |dragged in ANY d|
00000650  69 72 65 63 74 69 6f 6e  2e 54 68 65 20 73 69 7a  |irection.The siz|
00000660  65 20 6f 72 64 65 72 69  6e 67 0a 0d 20 20 20 20  |e ordering..    |
00000670  20 20 69 73 20 72 65 76  65 72 73 65 64 20 6f 6e  |  is reversed on|
00000680  20 65 78 69 74 20 73 6f  20 61 73 20 6e 6f 74 20  | exit so as not |
00000690  74 6f 20 63 6f 6e 66 75  73 65 20 42 41 53 49 43  |to confuse BASIC|
000006a0  2e 28 4d 61 72 63 68 20  31 39 39 37 29 0a 0d 56  |.(March 1997)..V|
000006b0  33 2e 30 35 20 52 65 64  75 63 65 64 20 48 49 4d  |3.05 Reduced HIM|
000006c0  45 4d 20 74 6f 20 73 74  6f 70 20 42 41 53 49 43  |EM to stop BASIC|
000006d0  20 6f 76 65 72 77 72 69  74 69 6e 67 20 73 63 72  | overwriting scr|
000006e0  65 65 6e 20 6d 65 6d 6f  72 79 20 28 4d 61 72 63  |een memory (Marc|
000006f0  68 20 31 39 39 37 29 0a  0d 0a 0d 45 64 69 74 65  |h 1997)....Edite|
00000700  6e 6c 61 72 67 65 64 0a  0d 56 31 2e 30 30 20 4f  |nlarged..V1.00 O|
00000710  72 69 67 69 6e 61 6c 20  42 41 53 49 43 20 76 65  |riginal BASIC ve|
00000720  72 73 69 6f 6e 20 28 53  65 70 74 20 31 39 39 35  |rsion (Sept 1995|
00000730  29 0a 0d 56 32 2e 30 30  20 54 69 64 69 65 64 20  |)..V2.00 Tidied |
00000740  63 6f 64 65 2c 61 6e 64  20 6d 61 64 65 20 69 74  |code,and made it|
00000750  20 63 6f 6d 70 61 74 69  62 6c 65 20 77 69 74 68  | compatible with|
00000760  20 74 68 65 20 6e 65 77  20 45 44 49 54 43 4c 50  | the new EDITCLP|
00000770  20 66 69 6c 65 20 66 6f  72 6d 61 74 20 0a 0d 20  | file format .. |
00000780  20 20 20 20 20 28 75 73  65 73 20 69 6e 74 65 67  |     (uses integ|
00000790  61 72 20 76 61 72 69 61  62 6c 65 73 20 66 6f 72  |ar variables for|
000007a0  20 63 6f 2d 6f 72 64 69  6e 61 74 65 73 20 6e 6f  | co-ordinates no|
000007b0  77 29 2e 53 70 65 65 64  20 69 6d 70 72 6f 76 65  |w).Speed improve|
000007c0  6d 65 6e 74 73 0a 0d 20  20 20 20 20 20 61 64 64  |ments..      add|
000007d0  65 64 20 66 6f 72 20 69  6e 69 74 69 61 6c 20 6c  |ed for initial l|
000007e0  6f 61 64 69 6e 67 20 6f  66 20 66 69 6c 65 20 64  |oading of file d|
000007f0  75 65 20 74 6f 20 75 73  65 20 6f 66 20 21 20 6f  |ue to use of ! o|
00000800  70 65 72 61 74 6f 72 20  69 6e 73 74 65 61 64 20  |perator instead |
00000810  6f 66 0a 0d 20 20 20 20  20 20 73 65 76 65 72 61  |of..      severa|
00000820  6c 20 3f 20 6f 70 65 72  61 74 6f 72 73 2e 53 69  |l ? operators.Si|
00000830  6d 69 6c 61 72 6c 79 20  66 6f 72 20 74 6f 67 67  |milarly for togg|
00000840  6c 69 6e 67 20 6f 66 20  70 69 78 65 6c 73 2e 20  |ling of pixels. |
00000850  28 4d 61 72 63 68 20 31  39 39 37 29 0a 0d 56 32  |(March 1997)..V2|
00000860  2e 30 35 20 43 68 61 6e  67 65 64 20 61 20 46 4f  |.05 Changed a FO|
00000870  52 2e 2e 2e 4e 45 58 54  20 6c 6f 6f 70 20 73 6f  |R...NEXT loop so|
00000880  20 74 68 61 74 20 6f 6e  65 20 6c 65 73 73 20 63  | that one less c|
00000890  61 6c 63 75 6c 61 74 69  6f 6e 20 77 61 73 20 72  |alculation was r|
000008a0  65 71 64 20 70 65 72 0a  0d 20 20 20 20 20 20 69  |eqd per..      i|
000008b0  74 74 65 72 61 74 69 6f  6e 20 6f 66 20 74 68 65  |tteration of the|
000008c0  20 6d 61 69 6e 20 6c 6f  61 64 69 6e 67 20 6c 6f  | main loading lo|
000008d0  6f 70 2e 53 61 76 65 73  20 74 69 6d 65 2e 0a 0d  |op.Saves time...|
000008e0  56 32 2e 31 30 20 43 75  72 73 6f 72 20 75 73 65  |V2.10 Cursor use|
000008f0  64 20 74 6f 20 62 65 20  61 62 6c 65 20 74 6f 20  |d to be able to |
00000900  67 6f 20 6f 75 74 73 69  64 65 20 74 68 65 20 62  |go outside the b|
00000910  6f 75 6e 64 73 20 6f 66  20 74 68 65 20 61 72 65  |ounds of the are|
00000920  61 20 62 65 69 6e 67 20  65 64 69 74 65 64 2e 0a  |a being edited..|
00000930  0d 20 20 20 20 20 20 54  68 69 73 20 64 69 64 6e  |.      This didn|
00000940  27 74 20 61 66 66 65 63  74 20 74 68 65 20 72 65  |'t affect the re|
00000950  73 75 6c 74 20 73 61 76  65 64 20 74 6f 20 74 68  |sult saved to th|
00000960  65 20 63 6c 69 70 62 6f  61 72 64 20 74 68 6f 75  |e clipboard thou|
00000970  67 68 2e 20 28 4d 61 72  63 68 20 31 39 39 37 29  |gh. (March 1997)|
00000980  0a 0d 0a 0d 56 61 72 69  61 62 6c 65 73 3a 0a 0d  |....Variables:..|
00000990  0a 0d 45 44 49 54 0a 0d  7e 7e 7e 7e 0a 0d 6b 65  |..EDIT..~~~~..ke|
000009a0  79 25 20 68 6f 6c 64 73  20 74 68 65 20 41 53 43  |y% holds the ASC|
000009b0  69 69 20 76 61 6c 75 65  20 6f 66 20 74 68 65 20  |ii value of the |
000009c0  6c 61 73 74 20 70 72 65  73 73 65 64 20 62 75 74  |last pressed but|
000009d0  74 6f 6e 0a 0d 58 25 2c  59 25 2c 50 25 2c 51 25  |ton..X%,Y%,P%,Q%|
000009e0  20 64 65 66 69 6e 65 20  74 68 65 20 70 6f 73 69  | define the posi|
000009f0  74 69 6f 6e 20 6f 66 20  74 68 65 20 63 75 72 73  |tion of the curs|
00000a00  6f 72 0a 0d 61 64 64 72  25 20 69 73 20 74 68 65  |or..addr% is the|
00000a10  20 61 64 64 72 65 73 73  20 61 74 20 77 68 69 63  | address at whic|
00000a20  68 20 74 6f 20 61 73 73  65 6d 62 6c 65 20 28 63  |h to assemble (c|
00000a30  6f 64 65 20 6c 65 6e 67  74 68 20 69 73 20 61 70  |ode length is ap|
00000a40  70 72 6f 78 20 68 61 6c  66 20 61 20 6b 42 29 0a  |prox half a kB).|
00000a50  0d 65 78 69 73 74 25 20  69 73 20 74 68 65 20 68  |.exist% is the h|
00000a60  61 6e 64 6c 65 20 6f 66  20 74 68 65 20 66 69 6c  |andle of the fil|
00000a70  65 20 72 65 71 75 65 73  74 65 64 20 62 79 20 74  |e requested by t|
00000a80  68 65 20 75 73 65 72 2c  69 66 20 69 74 20 65 78  |he user,if it ex|
00000a90  69 73 74 73 0a 0d 77 61  69 74 25 20 69 73 20 61  |ists..wait% is a|
00000aa0  20 64 75 6d 6d 79 20 76  61 72 69 61 62 6c 65 20  | dummy variable |
00000ab0  61 6e 64 20 69 73 20 73  65 74 20 74 6f 20 2d 31  |and is set to -1|
00000ac0  20 69 66 20 74 68 65 20  49 4e 4b 45 59 20 74 69  | if the INKEY ti|
00000ad0  6d 65 73 20 6f 75 74 0a  0d 46 24 20 68 6f 6c 64  |mes out..F$ hold|
00000ae0  73 20 74 68 65 20 66 69  6c 65 6e 61 6d 65 20 6f  |s the filename o|
00000af0  66 20 74 68 65 20 66 69  6c 65 20 72 65 71 75 65  |f the file reque|
00000b00  73 74 65 64 20 62 79 20  74 68 65 20 75 73 65 72  |sted by the user|
00000b10  0a 0d 0a 0d 45 44 49 54  43 52 45 0a 0d 7e 7e 7e  |....EDITCRE..~~~|
00000b20  7e 7e 7e 7e 0a 0d 62 75  66 66 65 72 25 20 69 73  |~~~~..buffer% is|
00000b30  20 61 20 62 6c 6f 63 6b  20 6f 66 20 6d 65 6d 6f  | a block of memo|
00000b40  72 79 20 75 73 65 64 20  74 6f 20 68 6f 6c 64 20  |ry used to hold |
00000b50  77 68 61 74 20 77 61 73  20 62 65 68 69 6e 64 20  |what was behind |
00000b60  74 68 65 20 6d 65 73 73  61 67 65 2f 70 72 6f 6d  |the message/prom|
00000b70  70 74 20 0a 0d 20 20 20  20 20 20 20 20 62 6f 78  |pt ..        box|
00000b80  2c 62 6f 74 74 6f 6d 20  6c 65 66 74 0a 0d 72 6f  |,bottom left..ro|
00000b90  77 25 20 69 73 20 61 20  62 6c 6f 63 6b 20 6f 66  |w% is a block of|
00000ba0  20 6d 65 6d 6f 72 79 20  75 73 65 64 20 74 6f 20  | memory used to |
00000bb0  62 75 66 66 65 72 20 74  68 65 20 63 6c 69 70 62  |buffer the clipb|
00000bc0  6f 61 72 64 20 66 69 6c  65 20 77 68 65 6e 20 6c  |oard file when l|
00000bd0  6f 61 64 69 6e 67 20 62  61 63 6b 20 0a 0d 20 20  |oading back ..  |
00000be0  20 20 20 20 20 20 69 6e  20 73 6e 69 70 70 65 74  |      in snippet|
00000bf0  73 0a 0d 6b 65 79 25 20  68 6f 6c 64 73 20 74 68  |s..key% holds th|
00000c00  65 20 41 53 43 69 69 20  76 61 6c 75 65 20 6f 66  |e ASCii value of|
00000c10  20 74 68 65 20 6c 61 73  74 20 70 72 65 73 73 65  | the last presse|
00000c20  64 20 62 75 74 74 6f 6e  0a 0d 73 74 65 70 25 20  |d button..step% |
00000c30  69 73 20 32 20 69 66 20  73 68 69 66 74 20 77 61  |is 2 if shift wa|
00000c40  73 6e 27 74 20 70 72 65  73 73 65 64 20 6f 72 20  |sn't pressed or |
00000c50  31 30 20 69 66 20 73 68  69 66 74 20 77 61 73 20  |10 if shift was |
00000c60  70 72 65 73 73 65 64 0a  0d 58 25 2c 59 25 20 61  |pressed..X%,Y% a|
00000c70  72 65 20 74 68 65 20 63  75 72 72 65 6e 74 20 70  |re the current p|
00000c80  69 78 65 6c 20 63 6f 6f  72 64 69 6e 61 74 65 0a  |ixel coordinate.|
00000c90  0d 50 25 2c 51 25 20 77  69 6c 6c 20 62 65 20 74  |.P%,Q% will be t|
00000ca0  68 65 20 6f 74 68 65 72  20 70 61 69 72 20 6f 66  |he other pair of|
00000cb0  20 63 6f 6f 72 64 69 6e  61 74 65 73 2c 65 67 20  | coordinates,eg |
00000cc0  77 68 65 6e 20 64 72 61  67 67 69 6e 67 20 61 20  |when dragging a |
00000cd0  62 6f 78 20 32 20 70 6f  69 6e 74 73 20 0a 0d 20  |box 2 points .. |
00000ce0  20 20 20 20 20 61 72 65  20 72 65 71 75 69 72 65  |     are require|
00000cf0  64 20 74 6f 20 64 65 66  69 6e 65 20 61 20 72 65  |d to define a re|
00000d00  63 74 61 6e 67 6c 65 0a  0d 4d 24 20 69 73 20 75  |ctangle..M$ is u|
00000d10  73 65 64 20 62 79 20 74  68 65 20 6d 65 73 73 61  |sed by the messa|
00000d20  67 65 20 62 6f 78 20 67  65 6e 65 72 61 74 6f 72  |ge box generator|
00000d30  2c 61 6e 64 20 68 6f 6c  64 20 74 68 65 20 73 74  |,and hold the st|
00000d40  72 69 6e 67 20 74 6f 20  62 65 20 73 68 6f 77 6e  |ring to be shown|
00000d50  0a 0d 6f 66 66 25 20 69  73 20 61 20 67 65 6e 65  |..off% is a gene|
00000d60  72 61 6c 20 6f 66 66 73  65 74 20 70 6f 69 6e 74  |ral offset point|
00000d70  65 72 2c 75 73 65 64 20  69 6e 20 6c 6f 74 73 20  |er,used in lots |
00000d80  6f 66 20 70 6c 61 63 65  73 0a 0d 77 61 69 74 25  |of places..wait%|
00000d90  20 69 73 20 61 20 64 75  6d 6d 79 20 76 61 72 69  | is a dummy vari|
00000da0  61 62 6c 65 20 61 6e 64  20 69 73 20 73 65 74 20  |able and is set |
00000db0  74 6f 20 2d 31 20 69 66  20 74 68 65 20 49 4e 4b  |to -1 if the INK|
00000dc0  45 59 20 74 69 6d 65 73  20 6f 75 74 0a 0d 74 25  |EY times out..t%|
00000dd0  2c 62 25 2c 6c 25 2c 72  25 20 61 72 65 20 61 20  |,b%,l%,r% are a |
00000de0  63 6f 70 79 20 6f 66 20  59 25 2c 51 25 2c 58 25  |copy of Y%,Q%,X%|
00000df0  2c 50 25 20 77 68 65 6e  20 69 74 20 69 73 20 72  |,P% when it is r|
00000e00  65 71 75 69 72 65 64 20  74 68 61 74 20 59 25 2c  |equired that Y%,|
00000e10  51 25 2c 58 25 2c 50 25  20 6e 65 65 64 0a 0d 20  |Q%,X%,P% need.. |
00000e20  20 20 20 20 20 20 20 20  20 20 20 74 6f 20 62 65  |           to be|
00000e30  20 6d 61 6e 69 70 75 6c  61 74 65 64 0a 0d 74 65  | manipulated..te|
00000e40  6d 70 58 25 20 61 6e 64  20 74 65 6d 70 59 25 20  |mpX% and tempY% |
00000e50  61 72 65 20 62 61 63 6b  75 70 20 63 6f 70 69 65  |are backup copie|
00000e60  73 20 6f 66 20 58 25 20  61 6e 64 20 59 25 20 61  |s of X% and Y% a|
00000e70  73 20 58 25 20 61 6e 64  20 59 25 20 61 72 65 20  |s X% and Y% are |
00000e80  75 73 65 64 20 61 73 20  0a 0d 20 20 20 20 20 20  |used as ..      |
00000e90  20 20 20 20 20 20 20 20  20 20 20 20 70 61 72 61  |            para|
00000ea0  6d 65 74 65 72 20 74 6f  20 63 61 6c 6c 20 74 68  |meter to call th|
00000eb0  65 20 6d 61 63 68 69 6e  65 20 63 6f 64 65 0a 0d  |e machine code..|
00000ec0  64 61 74 61 25 20 69 73  20 75 73 65 64 20 74 6f  |data% is used to|
00000ed0  20 68 6f 6c 64 20 76 61  6c 75 65 20 72 65 61 64  | hold value read|
00000ee0  20 66 72 6f 6d 20 73 63  72 65 65 6e 20 6d 65 6d  | from screen mem|
00000ef0  6f 72 79 0a 0d 6c 69 6e  65 24 20 69 73 20 74 68  |ory..line$ is th|
00000f00  65 20 73 74 72 69 6e 67  20 65 6e 74 65 72 65 64  |e string entered|
00000f10  20 73 6f 20 66 61 72 20  77 68 65 6e 20 74 65 78  | so far when tex|
00000f20  74 20 69 73 20 62 65 69  6e 67 20 6f 76 65 72 6c  |t is being overl|
00000f30  61 79 65 64 0a 0d 46 20  69 73 20 61 20 66 69 6c  |ayed..F is a fil|
00000f40  65 20 68 61 6e 64 6c 65  0a 0d 0a 0d 45 44 49 54  |e handle....EDIT|
00000f50  45 4e 4c 0a 0d 7e 7e 7e  7e 7e 7e 7e 0a 0d 46 20  |ENL..~~~~~~~..F |
00000f60  69 73 20 61 20 66 69 6c  65 20 68 61 6e 64 6c 65  |is a file handle|
00000f70  0a 0d 77 69 64 74 68 25  20 68 6f 6c 64 73 20 74  |..width% holds t|
00000f80  68 65 20 73 6e 69 70 70  65 74 20 77 69 64 74 68  |he snippet width|
00000f90  0a 0d 68 65 69 67 68 74  25 20 68 6f 6c 64 73 20  |..height% holds |
00000fa0  74 68 65 20 73 6e 69 70  70 65 64 20 64 65 70 74  |the snipped dept|
00000fb0  68 0a 0d 70 6f 73 78 25  2c 70 6f 73 79 25 20 69  |h..posx%,posy% i|
00000fc0  73 20 77 68 65 72 65 20  74 68 65 20 63 75 72 73  |s where the curs|
00000fd0  6f 72 20 69 73 20 61 74  20 74 68 65 20 6d 6f 6d  |or is at the mom|
00000fe0  65 6e 74 0a 0d 62 69 74  25 20 69 73 20 61 20 6d  |ent..bit% is a m|
00000ff0  61 73 6b 20 66 6f 72 20  69 73 6f 6c 61 74 69 6e  |ask for isolatin|
00001000  67 20 69 6e 64 69 76 69  64 75 61 6c 20 62 69 6e  |g individual bin|
00001010  61 72 79 20 62 69 74 73  0a 0d 6f 66 66 73 65 74  |ary bits..offset|
00001020  25 20 69 73 20 74 68 65  20 6c 6f 63 61 74 69 6f  |% is the locatio|
00001030  6e 20 63 75 72 72 65 6e  74 6c 79 20 62 65 69 6e  |n currently bein|
00001040  67 20 63 6f 6e 73 69 64  65 72 65 64 0a 0d 64 61  |g considered..da|
00001050  74 61 25 20 69 73 20 74  68 65 20 62 79 74 65 20  |ta% is the byte |
00001060  67 6f 74 20 66 72 6f 6d  20 61 20 66 69 6c 65 0a  |got from a file.|
00001070  0d 72 65 73 75 6c 74 25  20 69 73 20 64 61 74 61  |.result% is data|
00001080  25 20 61 66 74 65 72 20  74 68 65 20 62 69 74 20  |% after the bit |
00001090  62 65 69 6e 67 20 63 6f  6e 73 69 64 65 72 65 64  |being considered|
000010a0  20 68 61 73 20 62 65 65  6e 20 6d 61 73 6b 65 64  | has been masked|
000010b0  20 6f 75 74 0a 0d 70 6f  6b 65 25 20 69 73 20 77  | out..poke% is w|
000010c0  68 65 72 65 20 69 6e 20  6d 65 6d 6f 72 79 20 74  |here in memory t|
000010d0  6f 20 70 75 74 20 74 68  65 20 76 61 6c 75 65 0a  |o put the value.|
000010e0  0d 58 25 2c 59 25 2c 50  25 2c 51 25 20 61 73 20  |.X%,Y%,P%,Q% as |
000010f0  62 65 66 6f 72 65 0a 0d  0a 0d 57 6f 72 6b 69 6e  |before....Workin|
00001100  67 73 3a 0a 0d 0a 0d 45  44 49 54 0a 0d 7e 7e 7e  |gs:....EDIT..~~~|
00001110  7e 0a 0d 45 6e 73 75 72  65 20 6f 75 74 70 75 74  |~..Ensure output|
00001120  20 69 73 20 74 6f 20 73  63 72 65 65 6e 20 6f 6e  | is to screen on|
00001130  6c 79 2c 73 68 69 66 74  20 73 63 72 65 65 6e 20  |ly,shift screen |
00001140  64 6f 77 6e 20 62 65 63  61 75 73 65 20 6f 66 20  |down because of |
00001150  6d 79 20 6d 6f 6e 69 74  6f 72 2c 73 70 65 65 64  |my monitor,speed|
00001160  20 0a 0d 75 70 20 74 68  65 20 72 65 70 65 61 74  | ..up the repeat|
00001170  20 72 61 74 65 2c 61 6e  64 20 6d 61 6b 65 20 74  | rate,and make t|
00001180  68 65 20 63 75 72 73 6f  72 73 20 64 6f 20 41 53  |he cursors do AS|
00001190  43 69 69 20 76 61 6c 75  65 73 20 73 6f 20 74 68  |Cii values so th|
000011a0  61 74 20 79 6f 75 20 63  61 6e 27 74 20 67 65 74  |at you can't get|
000011b0  20 0a 0d 74 68 61 74 20  77 68 69 74 65 20 73 71  | ..that white sq|
000011c0  75 61 72 65 20 61 70 70  65 61 72 69 6e 67 20 69  |uare appearing i|
000011d0  6e 20 4d 6f 64 65 20 37  0a 0d 2d 0a 0d 4d 65 6e  |n Mode 7..-..Men|
000011e0  75 20 63 68 6f 6f 73 65  73 20 77 68 65 74 68 65  |u chooses whethe|
000011f0  72 20 74 6f 20 67 6f 74  6f 20 74 68 65 20 6c 6f  |r to goto the lo|
00001200  61 64 69 74 20 70 72 6f  63 20 6f 72 20 74 68 65  |adit proc or the|
00001210  20 6e 65 77 20 70 72 6f  63 0a 0d 2d 0a 0d 41 73  | new proc..-..As|
00001220  73 65 6d 62 6c 65 20 74  68 65 20 63 6f 64 65 2c  |semble the code,|
00001230  74 75 72 6e 20 6f 66 66  20 65 72 72 6f 72 20 68  |turn off error h|
00001240  61 6e 64 6c 69 6e 67 2c  61 6e 64 20 67 6f 74 6f  |andling,and goto|
00001250  20 74 68 65 20 6d 61 69  6e 20 70 72 6f 67 72 61  | the main progra|
00001260  6d 0a 0d 2d 0a 0d 41 73  73 65 6d 62 6c 65 72 20  |m..-..Assembler |
00001270  69 73 20 63 6f 6d 6d 65  6e 74 65 64 20 61 73 20  |is commented as |
00001280  61 6e 64 20 77 68 65 6e  20 72 65 71 75 69 72 65  |and when require|
00001290  64 2c 61 6e 64 20 69 6e  74 65 67 61 72 20 76 61  |d,and integar va|
000012a0  72 69 61 62 6c 65 73 20  28 68 65 6c 64 20 65 76  |riables (held ev|
000012b0  65 6e 20 0a 0d 77 68 65  6e 20 43 48 41 49 4e 69  |en ..when CHAINi|
000012c0  6e 67 20 62 65 74 77 65  65 6e 20 70 72 6f 67 72  |ng between progr|
000012d0  61 6d 73 29 20 61 72 65  20 73 65 74 20 74 6f 20  |ams) are set to |
000012e0  69 6d 70 6f 72 74 61 6e  74 20 65 6e 74 72 79 20  |important entry |
000012f0  70 6f 69 6e 74 73 2e 54  68 69 73 20 6d 65 61 6e  |points.This mean|
00001300  73 20 0a 0d 74 68 61 74  20 69 66 20 74 68 65 20  |s ..that if the |
00001310  63 6f 64 65 20 69 6d 70  72 6f 76 65 64 20 69 6e  |code improved in|
00001320  20 74 68 65 20 66 75 74  75 72 65 20 6f 6e 6c 79  | the future only|
00001330  20 27 45 44 49 54 27 20  6e 65 65 64 20 62 65 20  | 'EDIT' need be |
00001340  75 70 64 61 74 65 64 2c  61 6e 64 20 74 68 65 20  |updated,and the |
00001350  0a 0d 6f 74 68 65 72 20  70 72 6f 67 72 61 6d 73  |..other programs|
00001360  20 69 6e 20 74 68 65 20  73 75 69 74 65 20 63 61  | in the suite ca|
00001370  6e 20 6d 61 6b 65 20 75  73 65 20 6f 66 20 74 68  |n make use of th|
00001380  65 20 6e 65 77 20 66 65  61 74 75 72 65 73 2e 0a  |e new features..|
00001390  0d 2d 0a 0d 50 72 6f 63  6c 6f 61 64 20 67 69 76  |.-..Procload giv|
000013a0  65 73 20 74 68 65 20 6f  70 70 6f 72 74 75 6e 69  |es the opportuni|
000013b0  74 79 20 74 6f 20 70 75  74 20 69 6e 20 79 6f 75  |ty to put in you|
000013c0  20 27 73 63 72 65 65 6e  20 69 6d 61 67 65 73 27  | 'screen images'|
000013d0  20 64 69 73 6b 20 6f 72  20 77 68 61 74 65 76 65  | disk or whateve|
000013e0  72 2c 0a 0d 6f 72 20 6a  75 73 74 20 70 72 65 73  |r,..or just pres|
000013f0  73 20 61 20 6b 65 79 20  74 6f 20 73 6b 69 70 20  |s a key to skip |
00001400  70 61 73 74 20 74 68 61  74 20 70 72 6f 6d 70 74  |past that prompt|
00001410  2e 49 66 20 74 68 65 20  66 69 6c 65 20 63 61 6e  |.If the file can|
00001420  27 74 20 62 65 20 66 6f  75 6e 64 2c 74 68 65 6e  |'t be found,then|
00001430  20 0a 0d 74 68 65 20 70  72 6f 67 72 61 6d 20 69  | ..the program i|
00001440  73 20 72 65 72 75 6e 2e  4f 74 68 65 72 77 69 73  |s rerun.Otherwis|
00001450  65 20 4d 6f 64 65 20 69  73 20 63 68 61 6e 67 65  |e Mode is change|
00001460  64 20 61 6e 64 20 74 68  65 20 66 69 6c 65 20 69  |d and the file i|
00001470  73 20 6c 6f 61 64 65 64  2c 0a 0d 69 72 72 65 73  |s loaded,..irres|
00001480  70 65 63 74 69 76 65 20  6f 66 20 77 68 65 74 68  |pective of wheth|
00001490  65 72 20 69 74 20 69 73  20 74 68 65 20 72 69 67  |er it is the rig|
000014a0  68 74 20 6c 65 6e 67 74  68 20 65 74 63 2e 2e 2e  |ht length etc...|
000014b0  0a 0d 2d 0a 0d 50 72 6f  63 6e 65 77 20 6a 75 73  |..-..Procnew jus|
000014c0  74 20 63 68 61 6e 67 65  73 20 6d 6f 64 65 20 74  |t changes mode t|
000014d0  6f 20 62 6c 61 63 6b 20  74 68 65 20 73 63 72 65  |o black the scre|
000014e0  65 6e 20 61 6e 64 20 72  65 74 75 72 6e 73 0a 0d  |en and returns..|
000014f0  0a 0d 45 44 49 54 43 52  45 0a 0d 7e 7e 7e 7e 7e  |..EDITCRE..~~~~~|
00001500  7e 7e 0a 0d 52 65 73 65  74 20 6b 65 79 62 6f 61  |~~..Reset keyboa|
00001510  72 64 20 72 65 70 65 61  74 20 72 61 74 65 20 69  |rd repeat rate i|
00001520  6e 63 61 73 65 20 45 64  69 74 45 4e 4c 20 61 6c  |ncase EditENL al|
00001530  74 65 72 65 64 20 69 74  2c 61 6e 64 20 44 49 4d  |tered it,and DIM|
00001540  20 73 6f 6d 65 20 6d 65  6d 6f 72 79 0a 0d 2d 0a  | some memory..-.|
00001550  0d 45 6e 74 65 72 20 6d  61 69 6e 20 6c 6f 6f 70  |.Enter main loop|
00001560  2c 70 6f 6c 6c 20 74 68  65 20 6b 65 79 62 6f 61  |,poll the keyboa|
00001570  72 64 20 66 6f 72 20 73  6f 6d 65 20 61 63 74 69  |rd for some acti|
00001580  6f 6e 2c 69 66 20 69 74  27 73 20 61 20 63 75 72  |on,if it's a cur|
00001590  73 6f 72 20 6b 65 79 20  74 68 65 6e 20 0a 0d 61  |sor key then ..a|
000015a0  64 6a 75 73 74 20 74 68  65 20 70 6f 69 6e 74 65  |djust the pointe|
000015b0  72 27 73 20 70 6f 73 69  74 69 6f 6e 20 61 63 63  |r's position acc|
000015c0  6f 72 64 69 6e 67 6c 79  2c 64 65 70 65 6e 64 69  |ordingly,dependi|
000015d0  6e 67 20 6f 6e 20 77 68  65 74 68 65 72 20 53 48  |ng on whether SH|
000015e0  49 46 54 20 77 61 73 20  0a 0d 70 72 65 73 73 65  |IFT was ..presse|
000015f0  64 20 74 68 65 6e 20 74  68 65 20 73 74 65 70 20  |d then the step |
00001600  72 61 74 65 20 69 73 20  65 69 74 68 65 72 20 2a  |rate is either *|
00001610  31 20 6f 72 20 2a 35 20  70 69 78 65 6c 73 20 61  |1 or *5 pixels a|
00001620  74 20 61 20 74 69 6d 65  2e 0a 0d 49 66 20 74 68  |t a time...If th|
00001630  65 20 6b 65 79 20 70 72  65 73 73 65 64 20 77 61  |e key pressed wa|
00001640  73 6e 27 74 20 61 20 63  75 72 73 6f 72 20 6b 65  |sn't a cursor ke|
00001650  79 2c 73 65 65 20 69 66  20 69 74 20 77 61 73 20  |y,see if it was |
00001660  6f 6e 65 20 6f 66 20 74  68 65 20 6b 65 79 73 20  |one of the keys |
00001670  74 68 61 74 20 0a 0d 77  65 27 72 65 20 77 61 69  |that ..we're wai|
00001680  74 69 6e 67 20 66 6f 72  20 28 62 79 20 61 6e 64  |ting for (by and|
00001690  69 6e 67 20 77 69 74 68  20 26 44 46 29 20 63 61  |ing with &DF) ca|
000016a0  70 73 20 6c 6f 63 6b 20  63 61 6e 20 62 65 20 6f  |ps lock can be o|
000016b0  6e 20 6f 72 20 6f 66 66  2e 0a 0d 2d 0a 0d 50 72  |n or off...-..Pr|
000016c0  6f 63 6d 73 73 67 2c 72  65 61 64 73 20 66 72 6f  |ocmssg,reads fro|
000016d0  6d 20 74 68 65 20 62 6f  74 74 6f 6d 20 6f 66 20  |m the bottom of |
000016e0  74 68 65 20 73 63 72 65  65 6e 20 6d 65 6d 6f 72  |the screen memor|
000016f0  79 2c 6b 65 65 70 69 6e  67 20 74 68 69 73 20 73  |y,keeping this s|
00001700  61 66 65 20 69 6e 20 74  68 65 20 0a 0d 62 75 66  |afe in the ..buf|
00001710  66 65 72 20 61 6e 64 20  74 68 65 6e 20 74 79 70  |fer and then typ|
00001720  65 73 20 6f 76 65 72 20  74 68 65 20 61 72 65 61  |es over the area|
00001730  20 77 69 74 68 20 4d 24  2c 74 68 65 20 75 73 65  | with M$,the use|
00001740  72 20 69 73 20 67 76 65  6e 20 31 20 73 65 63 6f  |r is gven 1 seco|
00001750  6e 64 20 74 6f 20 72 65  61 64 20 0a 0d 74 68 69  |nd to read ..thi|
00001760  73 2c 62 65 66 6f 72 65  20 74 68 65 20 66 6f 72  |s,before the for|
00001770  6d 65 72 20 73 63 72 65  65 6e 20 69 73 20 72 65  |mer screen is re|
00001780  73 74 6f 72 65 64 2e 0a  0d 2d 0a 0d 50 72 6f 63  |stored...-..Proc|
00001790  63 75 72 73 6f 72 2c 64  72 61 77 73 20 61 20 73  |cursor,draws a s|
000017a0  63 61 6c 65 64 20 64 6f  77 6e 20 62 6f 78 20 61  |caled down box a|
000017b0  72 6f 75 6e 64 20 74 68  65 20 63 75 72 73 6f 72  |round the cursor|
000017c0  2c 74 68 69 73 20 72 6f  75 74 69 6e 65 20 69 73  |,this routine is|
000017d0  20 76 65 72 79 20 0a 0d  73 69 6d 70 6c 65 20 61  | very ..simple a|
000017e0  73 20 63 6c 69 70 70 69  6e 67 20 69 73 20 70 65  |s clipping is pe|
000017f0  72 66 6f 72 6d 65 64 20  62 79 20 74 68 65 20 6d  |rformed by the m|
00001800  61 63 68 69 6e 65 20 63  6f 64 65 2c 73 6f 20 6e  |achine code,so n|
00001810  6f 20 72 61 6e 67 65 20  63 68 65 63 6b 69 6e 67  |o range checking|
00001820  20 6e 65 65 64 20 0a 0d  62 65 20 64 6f 6e 65 2e  | need ..be done.|
00001830  0a 0d 2d 0a 0d 50 72 6f  63 66 72 61 6d 65 2c 64  |..-..Procframe,d|
00001840  72 61 77 73 20 61 20 62  6f 72 64 65 72 20 64 65  |raws a border de|
00001850  66 69 6e 65 64 20 62 79  20 74 68 65 20 65 6e 74  |fined by the ent|
00001860  72 79 20 70 61 72 61 6d  65 74 65 72 73 20 62 79  |ry parameters by|
00001870  20 63 6f 6e 73 69 64 65  72 69 6e 67 20 61 20 62  | considering a b|
00001880  6f 78 20 0a 0d 74 6f 20  62 65 20 61 20 73 65 74  |ox ..to be a set|
00001890  20 6f 66 20 32 20 68 6f  72 7a 6f 6e 74 61 6c 20  | of 2 horzontal |
000018a0  61 6e 64 20 32 20 76 65  72 74 69 63 61 6c 20 6c  |and 2 vertical l|
000018b0  69 6e 65 73 2e 0a 0d 2d  0a 0d 50 72 6f 63 65 78  |ines...-..Procex|
000018c0  70 61 6e 64 2c 72 65 70  65 61 74 65 64 6c 79 20  |pand,repeatedly |
000018d0  63 61 6c 6c 73 20 70 72  6f 63 66 72 61 6d 65 2c  |calls procframe,|
000018e0  6b 65 65 70 69 6e 67 20  6f 6e 65 20 73 65 74 20  |keeping one set |
000018f0  6f 66 20 63 6f 6f 72 64  69 6e 61 74 65 73 20 63  |of coordinates c|
00001900  6f 6e 73 74 61 6e 74 0a  0d 61 6e 64 20 65 6e 6c  |onstant..and enl|
00001910  61 72 67 69 6e 67 20 74  68 65 20 6f 74 68 65 72  |arging the other|
00001920  20 64 65 66 69 6e 65 64  20 62 79 20 77 68 69 63  | defined by whic|
00001930  68 20 63 75 72 73 6f 72  20 6b 65 79 20 69 73 20  |h cursor key is |
00001940  70 72 65 73 73 65 64 20  61 6e 64 20 74 68 65 20  |pressed and the |
00001950  73 74 65 70 20 0a 0d 64  65 66 69 6e 65 64 20 62  |step ..defined b|
00001960  79 20 77 68 65 74 68 65  72 20 73 68 69 66 74 20  |y whether shift |
00001970  77 61 73 20 68 65 6c 64  20 64 6f 77 6e 20 61 74  |was held down at|
00001980  20 74 68 65 20 74 69 6d  65 2e 4f 6e 20 72 65 63  | the time.On rec|
00001990  65 69 70 74 20 6f 66 20  61 20 27 43 4f 50 59 27  |eipt of a 'COPY'|
000019a0  2c 0a 0d 63 68 72 24 31  33 35 20 74 68 65 20 76  |,..chr$135 the v|
000019b0  61 6c 75 65 73 20 61 72  65 20 41 4e 44 65 64 20  |alues are ANDed |
000019c0  77 69 74 68 20 26 46 46  46 46 20 73 6f 20 61 73  |with &FFFF so as|
000019d0  20 6f 6e 6c 79 20 74 68  65 20 62 6f 74 74 6f 6d  | only the bottom|
000019e0  20 74 77 6f 20 62 79 74  65 73 20 61 72 65 0a 0d  | two bytes are..|
000019f0  65 76 65 72 20 63 68 65  63 6b 65 64 20 62 79 20  |ever checked by |
00001a00  74 68 65 20 4d 2f 43 20  72 6f 75 74 69 6e 65 73  |the M/C routines|
00001a10  2c 62 75 74 20 42 41 53  49 43 20 61 6c 6c 6f 77  |,but BASIC allow|
00001a20  73 20 34 20 62 79 74 65  20 69 6e 74 65 67 61 72  |s 4 byte integar|
00001a30  73 2e 49 66 20 74 68 65  20 76 61 6c 75 65 0a 0d  |s.If the value..|
00001a40  68 61 73 20 6e 6f 20 64  65 70 74 68 20 6f 72 20  |has no depth or |
00001a50  77 69 64 74 68 2c 6f 72  20 6e 6f 6e 65 20 6f 66  |width,or none of|
00001a60  20 65 69 74 68 65 72 2c  74 68 65 6e 20 61 20 6d  | either,then a m|
00001a70  65 73 73 61 67 65 20 69  73 20 66 6c 61 67 67 65  |essage is flagge|
00001a80  64 20 61 6e 64 20 79 6f  75 20 6d 75 73 74 0a 0d  |d and you must..|
00001a90  67 69 76 65 20 74 68 65  20 62 6f 78 20 73 6f 6d  |give the box som|
00001aa0  65 20 73 69 7a 65 20 61  74 20 6c 65 61 73 74 20  |e size at least |
00001ab0  32 2a 32 20 69 6e 20 73  69 7a 65 2e 4c 61 73 74  |2*2 in size.Last|
00001ac0  6c 79 2c 74 68 65 20 63  6f 6f 72 64 69 6e 61 74  |ly,the coordinat|
00001ad0  65 73 20 61 72 65 20 73  69 7a 65 20 0a 0d 6f 72  |es are size ..or|
00001ae0  64 65 72 65 64 2e 54 68  69 73 20 69 73 20 45 53  |dered.This is ES|
00001af0  53 45 4e 54 49 41 4c 2c  62 65 63 61 75 73 65 20  |SENTIAL,because |
00001b00  61 6c 6c 20 6f 74 68 65  72 20 72 6f 75 74 69 6e  |all other routin|
00001b10  65 73 20 61 73 73 75 6d  65 20 74 68 65 79 20 61  |es assume they a|
00001b20  72 65 2c 74 68 69 73 0a  0d 61 6c 6c 6f 77 73 20  |re,this..allows |
00001b30  74 68 65 20 62 6f 78 20  74 6f 20 62 65 20 64 72  |the box to be dr|
00001b40  61 67 67 65 64 20 66 72  6f 6d 20 61 6e 79 20 63  |agged from any c|
00001b50  6f 72 6e 65 72 2c 61 6e  64 20 6e 6f 74 20 6a 75  |orner,and not ju|
00001b60  73 74 20 74 6f 70 20 6c  65 66 74 20 64 6f 77 6e  |st top left down|
00001b70  2e 0a 0d 2d 0a 0d 50 72  6f 63 64 72 61 67 66 72  |...-..Procdragfr|
00001b80  61 6d 65 0a 0d 4d 6f 76  65 20 74 68 65 20 77 68  |ame..Move the wh|
00001b90  6f 6c 65 20 62 6f 78 20  61 72 6f 75 6e 64 20 74  |ole box around t|
00001ba0  68 65 20 73 63 72 65 65  6e 20 62 79 20 61 64 64  |he screen by add|
00001bb0  69 6e 67 20 6f 66 66 73  65 74 73 20 74 6f 20 42  |ing offsets to B|
00001bc0  4f 54 48 20 74 68 65 20  73 74 61 72 74 20 61 6e  |OTH the start an|
00001bd0  64 0a 0d 66 69 6e 69 73  68 20 63 6f 6f 72 64 69  |d..finish coordi|
00001be0  6e 61 74 65 73 2e 4e 6f  74 65 20 74 68 61 74 20  |nates.Note that |
00001bf0  74 68 65 20 62 6f 78 20  6d 61 79 20 62 65 20 64  |the box may be d|
00001c00  72 61 67 67 65 64 20 6f  66 66 20 74 68 65 20 73  |ragged off the s|
00001c10  63 72 65 65 6e 2c 74 68  69 73 20 69 73 0a 0d 75  |creen,this is..u|
00001c20  73 65 64 20 6d 61 69 6e  6c 79 20 77 68 65 6e 20  |sed mainly when |
00001c30  70 61 73 74 69 6e 67 20  61 72 65 61 73 20 62 61  |pasting areas ba|
00001c40  63 6b 20 66 72 6f 6d 20  74 68 65 20 63 6c 69 70  |ck from the clip|
00001c50  62 6f 61 72 64 2c 74 68  65 79 20 63 61 6e 20 62  |board,they can b|
00001c60  65 20 63 72 6f 70 70 65  64 20 62 79 0a 0d 74 68  |e cropped by..th|
00001c70  65 20 6c 69 6d 69 74 73  20 6f 66 20 74 68 65 20  |e limits of the |
00001c80  6d 6f 6e 69 74 6f 72 2e  0a 0d 2d 0a 0d 50 72 6f  |monitor...-..Pro|
00001c90  63 73 61 76 65 73 65 6c  65 63 74 0a 0d 54 68 69  |csaveselect..Thi|
00001ca0  73 20 70 75 74 73 20 74  6f 20 61 20 66 69 6c 65  |s puts to a file|
00001cb0  20 6f 6e 6c 79 20 6d 75  6c 74 69 70 6c 65 73 20  | only multiples |
00001cc0  6f 66 20 57 48 4f 4c 45  20 62 79 74 65 73 20 74  |of WHOLE bytes t|
00001cd0  6f 20 61 20 66 69 6c 65  2e 54 68 69 73 20 6d 61  |o a file.This ma|
00001ce0  6b 65 73 20 73 61 76 69  6e 67 0a 0d 66 61 73 74  |kes saving..fast|
00001cf0  65 72 20 61 6e 64 20 65  61 73 69 65 72 2e 0a 0d  |er and easier...|
00001d00  2d 0a 0d 50 72 6f 63 6c  6f 61 64 73 65 6c 65 63  |-..Procloadselec|
00001d10  74 0a 0d 41 73 20 61 20  74 72 61 64 65 20 6f 66  |t..As a trade of|
00001d20  66 20 6f 66 20 50 72 6f  63 73 61 76 65 73 65 6c  |f of Procsavesel|
00001d30  65 63 74 20 62 65 69 6e  67 20 73 69 6d 70 6c 65  |ect being simple|
00001d40  20 74 68 65 20 72 65 6c  6f 61 64 69 6e 67 20 62  | the reloading b|
00001d50  65 63 6f 6d 65 73 20 6d  6f 72 65 0a 0d 63 6f 6d  |ecomes more..com|
00001d60  70 6c 65 78 20 61 73 20  6e 6f 74 20 61 6c 6c 20  |plex as not all |
00001d70  6f 66 20 74 68 65 20 62  69 74 73 20 69 6e 20 74  |of the bits in t|
00001d80  68 65 20 66 69 6c 65 20  61 72 65 20 6e 65 65 64  |he file are need|
00001d90  65 64 2e 4f 6e 20 65 6e  74 72 79 20 58 2c 59 2c  |ed.On entry X,Y,|
00001da0  50 2c 51 20 61 72 65 0a  0d 63 6f 70 69 65 64 20  |P,Q are..copied |
00001db0  61 73 20 74 68 69 73 20  69 73 20 74 6f 20 62 65  |as this is to be|
00001dc0  20 74 68 65 20 64 65 73  74 69 6e 61 74 69 6f 6e  | the destination|
00001dd0  2c 74 68 65 6e 20 74 68  65 20 73 6f 75 72 63 65  |,then the source|
00001de0  20 58 2c 59 2c 50 2c 51  20 61 72 65 0a 0d 72 65  | X,Y,P,Q are..re|
00001df0  73 74 6f 72 65 64 20 62  79 20 6c 6f 6f 6b 69 6e  |stored by lookin|
00001e00  67 20 61 74 20 74 68 65  20 66 69 6c 65 2e 54 68  |g at the file.Th|
00001e10  65 20 72 6f 75 74 69 6e  65 20 63 79 63 6c 65 73  |e routine cycles|
00001e20  20 74 68 72 6f 75 67 68  20 6f 6e 65 20 6c 69 6e  | through one lin|
00001e30  65 20 61 74 20 61 20 74  69 6d 65 2c 0a 0d 66 69  |e at a time,..fi|
00001e40  72 73 74 20 72 65 61 64  69 6e 67 20 65 61 63 68  |rst reading each|
00001e50  20 72 6f 77 20 69 6e 74  6f 20 61 20 6d 65 6d 6f  | row into a memo|
00001e60  72 79 20 62 75 66 66 65  72 20 74 68 65 6e 20 69  |ry buffer then i|
00001e70  6e 74 65 72 70 72 65 74  74 69 6e 67 20 74 68 65  |nterpretting the|
00001e80  73 65 20 76 61 6c 75 65  73 2e 54 68 65 0a 0d 64  |se values.The..d|
00001e90  65 73 74 69 6e 61 74 69  6f 6e 20 63 6f 6f 72 64  |estination coord|
00001ea0  69 6e 61 74 65 20 69 73  20 63 61 6c 63 75 6c 61  |inate is calcula|
00001eb0  74 65 64 20 69 6e 20 58  25 20 61 6e 64 20 59 25  |ted in X% and Y%|
00001ec0  20 69 73 20 61 6c 72 65  61 64 79 20 73 65 74 20  | is already set |
00001ed0  62 79 20 74 68 65 20 6c  6f 6f 70 2e 0a 0d 41 20  |by the loop...A |
00001ee0  74 65 73 74 20 69 73 20  6d 61 64 65 20 74 6f 20  |test is made to |
00001ef0  73 65 65 20 69 66 20 74  68 65 20 70 69 78 65 6c  |see if the pixel|
00001f00  20 69 73 20 6f 6e 20 74  68 65 20 73 63 72 65 65  | is on the scree|
00001f10  6e 20 6f 72 20 6e 6f 74  20 28 55 53 52 28 54 25  |n or not (USR(T%|
00001f20  29 20 2d 20 74 65 73 74  20 0a 0d 72 61 6e 67 65  |) - test ..range|
00001f30  29 2c 69 66 20 69 74 20  69 73 6e 27 74 20 74 68  |),if it isn't th|
00001f40  65 6e 20 74 68 61 74 20  69 73 20 73 6b 69 70 70  |en that is skipp|
00001f50  65 64 20 74 6f 20 73 61  76 65 20 74 69 6d 65 2c  |ed to save time,|
00001f60  61 6e 64 20 74 6f 20 73  74 6f 70 20 74 68 65 20  |and to stop the |
00001f70  63 6c 69 70 62 6f 61 72  64 0a 0d 62 65 69 6e 67  |clipboard..being|
00001f80  20 70 61 73 74 65 64 20  69 6e 20 74 77 6f 20 64  | pasted in two d|
00001f90  69 66 66 65 72 65 6e 74  20 70 6c 61 63 65 73 20  |ifferent places |
00001fa0  6f 6e 20 74 68 65 20 73  63 72 65 65 6e 21 20 49  |on the screen! I|
00001fb0  66 20 69 74 20 77 61 73  20 6f 6e 20 74 68 65 20  |f it was on the |
00001fc0  73 63 72 65 65 6e 2c 0a  0d 74 68 65 6e 20 74 68  |screen,..then th|
00001fd0  65 20 62 79 74 65 20 69  73 20 72 65 61 64 20 74  |e byte is read t|
00001fe0  68 61 74 20 72 65 66 65  72 73 20 74 6f 20 58 25  |hat refers to X%|
00001ff0  2e 4c 61 73 74 6c 79 2c  61 20 62 69 74 20 63 6f  |.Lastly,a bit co|
00002000  6d 70 61 72 69 73 6f 6e  20 69 73 20 6d 61 64 65  |mparison is made|
00002010  20 74 6f 20 0a 0d 73 65  65 20 69 66 20 74 68 65  | to ..see if the|
00002020  20 62 69 74 20 69 6e 20  74 68 65 20 62 79 74 65  | bit in the byte|
00002030  20 66 72 6f 6d 20 74 68  65 20 73 63 72 65 65 6e  | from the screen|
00002040  20 28 64 61 74 61 25 20  66 72 6f 6d 20 55 53 52  | (data% from USR|
00002050  28 47 25 29 20 2d 20 67  65 74 20 62 79 74 65 29  |(G%) - get byte)|
00002060  20 0a 0d 6d 61 74 63 68  65 73 20 74 68 61 74 20  | ..matches that |
00002070  66 72 6f 6d 20 74 68 65  20 66 69 6c 65 20 62 75  |from the file bu|
00002080  66 66 65 72 20 28 3f 72  6f 77 25 2b 73 6f 6d 65  |ffer (?row%+some|
00002090  20 6f 66 66 73 65 74 73  29 2e 49 66 20 74 68 65  | offsets).If the|
000020a0  79 20 6d 61 74 63 68 20  6e 6f 20 61 63 74 69 6f  |y match no actio|
000020b0  6e 0a 0d 69 73 20 72 65  71 75 69 72 65 64 2c 6f  |n..is required,o|
000020c0  74 68 65 72 77 69 73 65  20 74 6f 67 67 6c 65 20  |therwise toggle |
000020d0  74 68 65 20 70 69 78 65  6c 20 74 6f 20 74 68 65  |the pixel to the|
000020e0  20 63 6f 72 72 65 63 74  20 76 61 6c 75 65 20 28  | correct value (|
000020f0  43 41 4c 4c 20 43 25 20  2d 20 0a 0d 63 61 6c 63  |CALL C% - ..calc|
00002100  75 6c 61 74 65 20 61 6e  64 20 77 72 69 74 65 20  |ulate and write |
00002110  70 69 78 65 6c 29 2e 0a  0d 2d 0a 0d 50 72 6f 63  |pixel)...-..Proc|
00002120  63 6c 65 61 72 73 65 6c  65 63 74 2c 66 6f 6c 6c  |clearselect,foll|
00002130  6f 77 73 20 74 68 65 20  73 61 6d 65 20 69 64 65  |ows the same ide|
00002140  61 20 61 73 20 70 72 6f  63 73 61 76 65 73 65 6c  |a as procsavesel|
00002150  65 63 74 20 62 75 74 20  69 6e 73 74 65 61 64 20  |ect but instead |
00002160  6f 66 20 66 69 6c 6c 69  6e 67 0a 0d 74 68 65 20  |of filling..the |
00002170  66 69 6c 65 20 77 69 74  68 20 76 61 6c 75 65 73  |file with values|
00002180  20 72 65 61 64 20 66 72  6f 6d 20 74 68 65 20 73  | read from the s|
00002190  63 72 65 65 6e 20 69 74  20 69 73 20 66 69 6c 6c  |creen it is fill|
000021a0  65 64 20 77 69 74 68 20  61 20 70 61 74 74 65 72  |ed with a patter|
000021b0  6e 2e 30 20 61 6e 64 20  0a 0d 32 35 35 20 66 6f  |n.0 and ..255 fo|
000021c0  72 20 62 6c 61 63 6b 20  61 6e 64 20 77 68 69 74  |r black and whit|
000021d0  65 2c 6f 72 20 31 37 30  20 66 6f 72 20 67 72 65  |e,or 170 for gre|
000021e0  79 20 28 62 69 6e 61 72  79 20 31 30 31 30 31 30  |y (binary 101010|
000021f0  31 30 29 2e 54 68 65 20  72 65 6e 61 6d 69 6e 67  |10).The renaming|
00002200  20 6f 66 20 74 68 65 0a  0d 6f 6c 64 20 63 6c 69  | of the..old cli|
00002210  70 62 6f 61 72 64 20 66  69 6c 65 20 6d 65 61 6e  |pboard file mean|
00002220  73 20 74 68 61 74 20 69  74 20 69 73 20 70 72 65  |s that it is pre|
00002230  73 65 72 76 65 64 2c 61  73 20 74 68 65 20 65 6e  |served,as the en|
00002240  64 20 75 73 65 72 20 73  68 6f 75 6c 64 6e 27 74  |d user shouldn't|
00002250  20 6b 6e 6f 77 0a 0d 74  68 61 74 20 77 68 65 6e  | know..that when|
00002260  20 66 69 6c 6c 69 6e 67  20 61 6e 20 61 72 65 61  | filling an area|
00002270  20 74 68 65 79 20 61 72  65 20 69 6e 66 61 63 74  | they are infact|
00002280  20 6a 75 73 74 20 6c 6f  61 64 69 6e 67 20 61 20  | just loading a |
00002290  63 6c 69 70 62 6f 61 72  64 20 66 69 6c 65 20 69  |clipboard file i|
000022a0  6e 21 0a 0d 2d 0a 0d 46  4e 64 69 74 68 65 72 62  |n!..-..FNditherb|
000022b0  77 2c 63 68 6f 6f 73 65  73 20 74 68 65 20 66 69  |w,chooses the fi|
000022c0  6c 6c 20 27 63 6f 6c 6f  75 72 27 0a 0d 2d 0a 0d  |ll 'colour'..-..|
000022d0  50 72 6f 63 74 65 78 74  2c 75 73 65 73 20 56 44  |Proctext,uses VD|
000022e0  55 35 20 61 6e 64 20 74  68 65 20 4f 53 27 73 20  |U5 and the OS's |
000022f0  62 75 69 6c 74 20 69 6e  20 63 68 61 72 61 63 74  |built in charact|
00002300  65 72 20 73 65 74 20 74  6f 20 77 72 69 74 65 20  |er set to write |
00002310  74 65 78 74 20 62 79 20  0a 0d 65 78 63 6c 75 73  |text by ..exclus|
00002320  69 76 65 20 6f 72 69 6e  67 2e 44 65 6c 65 74 65  |ive oring.Delete|
00002330  20 66 75 6e 63 74 69 6f  6e 20 77 6f 75 6c 64 20  | function would |
00002340  6e 6f 74 20 62 65 20 70  6f 73 73 69 62 6c 65 20  |not be possible |
00002350  75 6e 6c 65 73 73 20 74  68 65 20 45 4f 52 20 6f  |unless the EOR o|
00002360  70 74 69 6f 6e 20 0a 0d  77 61 73 20 75 73 65 64  |ption ..was used|
00002370  2c 61 73 20 74 6f 20 64  65 6c 65 74 65 20 74 68  |,as to delete th|
00002380  65 20 74 65 78 74 20 79  6f 75 20 73 69 6d 70 6c  |e text you simpl|
00002390  79 20 65 78 63 6c 75 73  69 76 65 20 4f 52 20 61  |y exclusive OR a|
000023a0  20 6c 65 74 74 65 72 20  77 69 74 68 20 69 74 73  | letter with its|
000023b0  65 6c 66 0a 0d 2d 0a 0d  50 72 6f 63 65 64 69 74  |elf..-..Procedit|
000023c0  2c 63 68 65 63 6b 73 20  74 68 65 20 73 65 6c 65  |,checks the sele|
000023d0  63 74 69 6f 6e 20 73 69  7a 65 20 61 6e 64 20 77  |ction size and w|
000023e0  61 72 6e 73 20 69 66 20  69 74 20 69 73 20 74 6f  |arns if it is to|
000023f0  6f 20 62 69 67 2c 6f 74  68 65 72 77 69 73 65 20  |o big,otherwise |
00002400  73 61 76 65 73 0a 0d 74  68 65 20 63 75 72 72 65  |saves..the curre|
00002410  6e 74 20 73 63 72 65 65  6e 20 74 6f 20 27 4f 55  |nt screen to 'OU|
00002420  54 50 55 54 27 20 61 6e  64 20 67 6f 65 73 20 6f  |TPUT' and goes o|
00002430  6e 74 6f 20 45 44 49 54  45 4e 4c 0a 0d 2d 0a 0d  |nto EDITENL..-..|
00002440  46 4e 73 63 61 6e 63 6c  69 70 2c 6a 75 73 74 20  |FNscanclip,just |
00002450  74 65 73 74 73 20 74 68  65 20 65 78 69 73 74 61  |tests the exista|
00002460  6e 63 65 20 6f 66 20 61  20 63 6c 69 70 62 6f 61  |nce of a clipboa|
00002470  72 64 20 66 69 6c 65 2c  72 65 74 75 72 6e 69 6e  |rd file,returnin|
00002480  67 20 74 68 65 20 68 61  6e 64 6c 65 2e 0a 0d 0a  |g the handle....|
00002490  0d 45 44 49 54 45 4e 4c  0a 0d 7e 7e 7e 7e 7e 7e  |.EDITENL..~~~~~~|
000024a0  7e 0a 0d 54 75 72 6e 73  20 74 68 65 20 63 75 72  |~..Turns the cur|
000024b0  73 6f 72 20 6f 66 66 20  61 67 61 69 6e 2c 61 73  |sor off again,as|
000024c0  20 61 20 6d 6f 64 65 20  63 68 61 6e 67 65 20 72  | a mode change r|
000024d0  65 73 74 6f 72 65 73 20  74 68 65 20 63 75 72 73  |estores the curs|
000024e0  6f 72 2e 0a 0d 4c 6f 61  64 20 69 6e 20 74 68 65  |or...Load in the|
000024f0  20 66 69 6c 65 2c 62 79  20 73 63 61 6e 6e 69 6e  | file,by scannin|
00002500  67 20 74 68 72 6f 75 67  68 20 69 74 20 73 65 72  |g through it ser|
00002510  69 61 6c 6c 79 20 61 6e  64 20 73 65 74 74 69 6e  |ially and settin|
00002520  67 20 62 79 74 65 73 20  69 6e 20 74 68 65 20 0a  |g bytes in the .|
00002530  0d 73 63 72 65 65 6e 20  74 6f 20 6d 61 74 63 68  |.screen to match|
00002540  20 74 68 65 20 62 69 74  20 62 65 69 6e 67 20 73  | the bit being s|
00002550  63 61 6e 6e 65 64 2e 54  68 65 20 21 20 6f 70 65  |canned.The ! ope|
00002560  72 61 74 6f 72 20 69 6e  70 72 6f 76 65 73 20 73  |rator inproves s|
00002570  70 65 65 64 2e 0a 0d 4f  6e 63 65 20 6c 6f 61 64  |peed...Once load|
00002580  65 64 2c 74 68 65 20 63  75 72 73 6f 72 20 6b 65  |ed,the cursor ke|
00002590  79 73 20 61 72 65 20 73  65 74 20 74 6f 20 72 65  |ys are set to re|
000025a0  74 75 72 6e 20 41 53 43  69 69 20 61 6e 64 20 74  |turn ASCii and t|
000025b0  61 62 20 74 6f 67 67 6c  65 73 20 74 68 65 0a 0d  |ab toggles the..|
000025c0  73 63 72 65 65 6e 20 62  79 74 65 73 20 62 79 20  |screen bytes by |
000025d0  45 4f 52 69 6e 67 20 77  69 74 68 20 26 46 46 46  |EORing with &FFF|
000025e0  46 46 46 46 46 2c 61 67  61 69 6e 20 74 68 65 20  |FFFFF,again the |
000025f0  21 20 6f 70 65 72 61 74  6f 72 20 69 73 20 75 73  |! operator is us|
00002600  65 64 2e 43 68 65 63 6b  73 20 61 72 65 0a 0d 6d  |ed.Checks are..m|
00002610  61 64 65 20 74 6f 20 65  6e 73 75 72 65 20 74 68  |ade to ensure th|
00002620  61 74 20 74 68 65 20 63  75 72 73 6f 72 20 68 61  |at the cursor ha|
00002630  73 6e 27 74 20 6d 6f 76  65 64 20 62 65 79 6f 6e  |sn't moved beyon|
00002640  64 20 74 68 65 20 62 6f  75 6e 64 73 20 6f 66 20  |d the bounds of |
00002650  74 68 65 20 73 6e 69 70  70 65 74 2e 0a 0d 57 68  |the snippet...Wh|
00002660  65 6e 20 64 6f 6e 65 2c  74 68 65 20 72 65 76 65  |en done,the reve|
00002670  72 73 65 20 70 72 6f 63  65 73 73 20 74 6f 20 6c  |rse process to l|
00002680  6f 61 64 69 6e 67 20 69  73 20 70 65 72 66 6f 72  |oading is perfor|
00002690  6d 65 64 2c 69 65 2e 74  68 65 20 62 69 74 20 74  |med,ie.the bit t|
000026a0  6f 20 70 75 74 20 74 6f  20 66 69 6c 65 0a 0d 69  |o put to file..i|
000026b0  73 20 64 65 74 65 72 6d  69 6e 65 64 20 62 79 20  |s determined by |
000026c0  72 65 61 64 69 6e 67 20  74 68 65 20 73 63 72 65  |reading the scre|
000026d0  65 6e 20 6d 65 6d 6f 72  79 2e 0a 0d 49 74 20 69  |en memory...It i|
000026e0  73 20 74 68 65 20 72 65  73 70 6f 6e 73 69 62 69  |s the responsibi|
000026f0  6c 69 74 79 20 6f 66 20  45 64 69 74 45 4e 4c 20  |lity of EditENL |
00002700  74 6f 20 72 65 6c 6f 61  64 20 74 68 65 20 6d 61  |to reload the ma|
00002710  69 6e 20 70 69 63 74 75  72 65 20 61 73 20 45 64  |in picture as Ed|
00002720  69 74 43 52 45 20 0a 0d  64 6f 65 73 6e 27 74 20  |itCRE ..doesn't |
00002730  64 6f 20 74 68 69 73 2c  74 6f 20 6d 61 6b 65 20  |do this,to make |
00002740  74 68 65 20 73 6e 69 70  70 65 74 20 70 61 73 74  |the snippet past|
00002750  65 20 69 74 73 65 6c 66  20 74 68 65 20 6b 65 79  |e itself the key|
00002760  62 6f 61 72 64 20 69 73  20 73 74 75 66 66 65 64  |board is stuffed|
00002770  20 0a 0d 77 69 74 68 20  22 50 22 20 75 73 69 6e  | ..with "P" usin|
00002780  67 20 46 58 31 33 38 0a  0d 0a 0d                 |g FX138....|
0000278b
P/+EDOC2.m0
P/+EDOC2.m1
P/+EDOC2.m2
P/+EDOC2.m4
P/+EDOC2.m5