## Friday, July 24, 2015

### Playing soduku.

Soduku is an interesting game of numbers and logic. You can not lose of you play it right. The board with preset numbers already sporadically spaced on the  board can be divided into nine sections  with each section of nine squares.The numbers one through nine must be strategically placed so that no number is duplicated in any column or row. Here is your typical sections.

Section:

The whole board:

or you could mentally separate it into three columns or rows.

You can have a maximum of one number shown three times in any column or row. For example we already have the number eight three times but the number nine is only shown twice. so we need another nine.

In the upper right hand corner we have three possibilities where another number nine can go.  So we look at the whole board to eliminate the possibilities in our mind.

In this case, it was easy to figure out the where the third nine should go. It will not be that easy with every number. It is a process of elimination with all numbers one through nine both in columns and rows.

Since only one number of each can be in each square, you can also eliminate boxes where a number exists. If most of a row is done, you can also fill in numbers.

Lastly if you have a mini-square almost filled in you can obviously choose the last number to be filled in.

There are other hints you can pick on your own, but just wanted to share a few starter hints. Good luck.

## Saturday, July 18, 2015

### Clone me.

You just bought a new computer and the first thing you want to do is to turn it on and play with it. DON'T. You will want to make a pristine duplicate of your computer's hard drive first. Why? Because that way you can be sure that you can go back to the beginning if you need to. In fact, I recommend getting two extra drives unless you have a server with plenty of space. Why two drives?  The first drive will be a duplicate of the virgin hard drive. The second drive will be a duplicate of the modified and  setup system you can use as a base in case you have problems.  After setting up thousands of systems in the corporate environment, the words come from experience.

You will also need software to back up your drives without it having to be installed. You will have to do some research as they change all the time. The two I have used most is Clonezilla and Ghost. Clonezilla is free for personal use. Best to read the manual before using the software. Even better would be to get a professional to help you out the first time.

The procedure is to back up the original hard drive to a second drive. Replace the original drive with the first backup drive. Now you can make any changes you want without losing the pristine image if you make a mistake.  One you have the backup drive configured with all the needed software, you will want to make a second backup. so you have a Grandfather, father  and son images. You are backed up twice so to speak,  If you have purchased duplicate machines, you can image them from the backup without having to manually setup each of the extra machines.

If you have a business and a business server, you can send the images to a server without having to get the extra drives. This is actually quicker and more efficient. With the server, you can image multiple machines (known as multicasting) at a time. For example: at the school where I worked, we would image a whole computer lab at a time instead of duplicating them manually.The nice thing was you could automate this to be done late at night when the computers in the labs were not being used.

Did not draw all the cables, but you get the idea. You can also make additional updated images to the server. So if a hard disk dies, you can simply re-image the replacement drive and be up and running again in no time. Actually today larger businesses are going disk-less with virtual machines via ltsp, aoe, and iscsi, but that is another discussion.

## Wednesday, July 15, 2015

### Making led control easy.

Controlling leds can be a real challenge, unless you know how to use a bit shifter aka the 74hs595. Oversimplified here, but one you get the gist of it only the sky is the limit.

From wikipedia:(https://en.wikipedia.org/wiki/Shift_register)

In digital circuits, a shift register is a cascade of flip flops, sharing the same clock, in which the output of each flip-flop is connected to the "data" input of the next flip-flop in the chain, resulting in a circuit that shifts by one position the "bit array" stored in it, shifting in the data present at its input and shifting out the last bit in the array, at each transition of the clock input. More generally, a shift register may be multidimensional, such that its "data in" and stage outputs are themselves bit arrays: this is implemented simply by running several shift registers of the same bit-length in parallel. Shift registers can have both parallel and serial inputs and outputs. These are often configured as 'serial-in, parallel-out' (SIPO) or as 'parallel-in, serial-out' (PISO). There are also types that have both serial and parallel input and types with serial and parallel output. There are also 'bidirectional' shift registers which allow shifting in both directions: L→R or R→L. The serial input and last output of a shift register can also be connected to create a 'circular shift register'.

74HC595 serial to parallel data converter that accepts one bit at a time, but the buffers can be daisy chained  to almost limitless control of outputs.  When DS pulses from the PC, you see that Output 0 and Output 1 on IC chip#1, goes high. Then IC chip #1 has determined that 8 pulses have past and it is time to pulse it's Q7' output which is connected to the next IC #2 chip's DS input. When the DS input of IC #2 gets a pulse from the Q7' output of IC #1, outputs 4, 5, 6, and 7 go high on chip #2. When the PC sends a DS pulse to IC #1 again, IC #1 reads the first eight bits from ST_CP and Output 0 on IC #1 turns off but output 1 stays on because it got a pulse and so on...........

[code]

int DS_pin = 8;
int STCP_pin = 9;
int SHCP_pin = 10;

void setup()
{
pinMode(DS_pin,OUTPUT);
pinMode(STCP_pin,OUTPUT);
pinMode(SHCP_pin,OUTPUT);
writereg();
}

boolean registers[8];

void writereg()
{
digitalWrite(STCP_pin, LOW);
for (int i = 7; i>=0; i--)
{
digitalWrite(SHCP_pin, LOW);
digitalWrite(DS_pin, registers[i] );
digitalWrite(SHCP_pin, HIGH);
}
digitalWrite(STCP_pin, HIGH);
}

void loop()
{
for(int i = 0; i<8; i++)
{
registers[i] = HIGH;
delay(100);
writereg();
}

for(int i = 7; i>0; i--)
{
registers[i] = LOW;
delay(100);
writereg();
}
}[/code]

The data entering the buffer might look like this assuming all the previous data bits are zeros.

Possible Arduino setup,

Several can be connected together with just a few control lines.

The pin-outs for the dip (dual in-line package) version.

## Tuesday, July 14, 2015

### RPi GPIO

Just a little documentation for easy access.

# Raspberry Pi GPIO Pinout

### Raspberry Pi GPIO Pinout

NOTE1: The Raspberry Pi is a 3.3V device
NOTE2: The GPIO pins are unbuffered and unprotected, so if you short something out, you could fry your whole Pi, so be careful!
As with Revision 2 of the Rasberry Pi, there are some changes to the GPIO connector. Make sure you use the correct diagram for your board

#### Raspberry Pi B+

For full details see http://elinux.org/Rpi_Low-level_peripherals

Also see:
http://computoman.blogspot.com/2013/08/simple-io-for-raspberry-pi.html
http://computoman.blogspot.com/2013/09/rpi-gpio-update.html

http://computoman.blogspot.com/2014/11/turn-on-led-in-low-voltage-circuit.html

## Monday, July 13, 2015

### Yet another randomizer.

Many months ago I introduced a batch file called Oracle. The one incentive I had was to separate the data from the code and make the code was flexible and reusable. In this case the author keeps the code and the data in the same file. of course that makes it seemingly more portable.Coding is both a science and an art. How you do it is up to you.

$./8ball.sh Outlook good 8ball.sh [code] #!/bin/bash # start data answers=( "It is certain" "It is decidedly so" "Without a doubt" "Yes – definitely" "You may rely on it" "As I see it, yes" "Most likely" "Outlook good" "Yes" "Signs point to yes" "Reply hazy, try again" "Ask again later" "Better not tell you now" "Cannot predict now" "Concentrate and ask again" "Don't count on it" "My reply is no" "My sources say no" "Outlook not so good" "Very doubtful" ) # end data num=$((RANDOM%20))
echo ${answers[$num]}
[/code]

## Saturday, July 11, 2015

### Text in batch files.

Saw this pic and thought it was an interesting login. Using ., ", d, Y, and P on the corners was certainly inventive;

To make it easier to duplicate the printout we split the text into two lines into two lines.

    888  888    888         d8888                  888
888  888    888        d88888                  888
88888888888888 888       d88 888                  888
888  888    888      d88  888 8888888 .d8888b  88888b.
888  888    888     d88   888 8888"  d88P"     888 "88b
88888888888888 YOP    d88    888 888    888       888  888b
888  888          d8888888888 888    Y88b.     888  888b
888  888    888  d888     888 888     "Y8888P  888  888

888       d8b                   Y88b   d88P
888       YOP                    Y88b d88P
888                               Y88u88P
888       888 88888b.  888  888    Y888P
888       888 888 "88b 888  888    d888b
888       888 888  888 888  888   d88888b
888       888 888  888 Y88b 888  d88P Y88b
888888888 888 888  888  "Y88888 d888P  Y88b


If you copy one line at a time you can piece it back together. Here is yet another, but you can type it in.

Then there is snoopycal.sh. Invoke with ./snoopycal.sh
echo "           ,-~~-.___.                                         ---------"
echo "          / ()=(()   \\                                         $1$2"
echo "         (   (        0                                       ---------"
echo "          \\._\\, ,----'"
echo "     ##XXXxxxxxxx"
echo "            /  ---'~;"
echo "           /    /~|-"
echo "         =(   ~~  |"
echo "   /~~~~~~~~~~~~~~~~~~~~~\\"
echo "  /_______________________\\"
echo " /_________________________\\"
echo "/___________________________\\"
echo "   |____________________|"
echo "   |____________________|"
echo "   |____________________|"
echo "   |                    |"
echo ""
cal $1$2



$./snoopycal.sh 03 1982 ,-~~-.___. --------- / ()=(() \ 03 1982 ( ( 0 --------- \._\, ,----' ##XXXxxxxxxx / ---'~; / /~|- =( ~~ | /~~~~~~~~~~~~~~~~~~~~~\ /_______________________\ /_________________________\ /___________________________\ |____________________| |____________________| |____________________| | | March 1982 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31  Then there is the good old shark. The programs included with the GNU/Linux system are free software. The exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. ------------------------------------------------------------------------ /) o /' ) /' ( ,. __/' ) .' ; o _.-~~~~' ---..__ .' ; _.--' b) --...____.' .' ( _. )). -._ < \|\|\|\|)-.....___.- -. __...--'-.'. ---......____...---.___.'----... .' .; -  This machine is for the exclusive use of OE. Anyone attempting to gain, or gaining access other than as specifically authorized will be prosecuted under all applicable statutes plus all applicable civil rules for damages.  You can find lots of ascii graphics on the net. Note you may have to use \\ for \ symbols for the \ to show up. You can also convert current files to test with img2txt -w 80 -f ansi ./caca.png Original picture: Then converted with:$  img2txt -W 60 -f ansi foot.png

$img2txt -W 60 -f ansi foot.png > foot.txt$ cat foot.txt

Also look at jp2a.
$convert foot.png foot.jpg$ jp2a foot.jpg

You could also pipe this picture to a file.

## Thursday, July 9, 2015

### Remember Visicalc?

What if Software Arts had patented Visicalc, Visiword, and etc?  Would office365 and Libreoffice never have existed?   Picture is actual VC.com running in the dosbox emulator.

Per www.archive.org

VisiCalc was the first spreadsheet computer program, originally released for the Apple II. It is often considered the application that turned the microcomputer from a hobby for computer enthusiasts into a serious business tool. VisiCalc sold over 700,000 copies in six years.

Conceived by Dan Bricklin, refined by Bob Frankston, developed by their company Software Arts, and distributed by Personal Software in 1979 (later named VisiCorp) for the Apple II computer, it propelled the Apple from being a hobbyist's toy to a useful tool for business, two years before the introduction of the IBM PC.

VisiCalc was, in part, inspired by earlier "row and column" spreadsheet programs in widespread use on systems of several national timesharing companies. Notable among these products were Business Planning Language (BPL) from International Timesharing Corporation (ITS) and Foresight, from Foresight Systems. Dan Bricklin writes, "[W]ith the years of experience we had at the time we created VisiCalc, we were familiar with many row/column financial programs. In fact, Bob had worked since the 1960s at Interactive Data Corporation, a major timesharing utility that was used for some of them and I was exposed to some at Harvard Business School in one of the classes." However, these earlier timesharing spreadsheet programs were not completely interactive, nor did they run on personal computers.

According to Bricklin, he was watching a professor at Harvard Business School create a financial model on a blackboard. When the professor found an error or wanted to change a parameter, he had to erase and rewrite a number of sequential entries in the table. Bricklin realized that he could replicate the process on a computer using an "electronic spreadsheet" to view results of underlying formulae. The development of Visicalc took two months of work by Frankston and Bricklin during the winter of 1978–79.
Some references:

http://www.benlo.com/visicalc/visicalc2.html
http://www.bricklin.com/history/vcexecutable.htm

Of course many companies have copied it. Some people have developed and programmed their own spreadsheets.  An electronic spreadsheet is sort of a calculator and an accountants worksheet all built into one. Here is the original code that I found for an old cpm operating system (control process for microcomputers) written for the zbasic language interpreter.  Eventually converted it to qbasic and freebasic,

Original command set:

' lizzycalc version -1
'
' updated March 1995  for qbasic.
' last update: January 1996
'
' commands      : description
'---------------:-----------------------------------------------
' "/'/^text     : enter text in a current cell (left/right/middle just)
' =expression   : enter number or formula in a current cell
' \text         : repeat text up to cell width
' |fun          : static special functions i. e. time, date, file
'               : smv, or smh
' @func         : real-time special functions of above
' c             : change column width
' d             : numeric data file of certain cells
' f             : do file operations (load/save/new)
' h or ?        : show this help screen
' i             : insert row or column
' j             : toggle form feed after print flag
' p             : output results to file or printer without the border
' q             : quit
' r             : replicate a single cell multiple times
' s             : output data to file or printer"
' u             : toggle update screen flag
' arrow keys    : move cursor in indicated direction
' expressions   : numeric constant or cell id in form <col letter><row#>
'                 above items separated by operators +,-,*,^,|, or /
'                 evaluation is from left to right without operator
'                 preference.  expressions are evaluated on enter and
'                 on the u command.

Original code I typed and then added a bit.

[code]
1000 '
1010 ' lizzycalc .01
1020 '
1030 ' for zbasic but could be converted to other basics
1040 ' updated march 1993 by computoman
1050 '
1060 ' commands:
1070 ' "text" : enter text in a current cell
1080 ' =expression : enter number or formula in a current cell
1090 ' cxxx : evaluate expressions and update screen
1100 ' arrow keys : move cursor in indicated direction
1110 '
1120 ' expressions:
1130 ' numeric constant or cell id in form <col>
1140 ' above items separated by operators +,-,*, or /
1150 ' evaluation is from left to right without operator preference
1160 ' expressions are evaluated on entery and on the "C" command.
1170 '
1180 '
1190 DEFINT I,N,W,X,Y : KEY OFF
1200 SCRDEPTH = 20
1210 SCRWIDTH = 80
1220 COLWIDTH = 10
1230 MAXCOL=INT(SCRWIDTH/(COLWIDTH + 1))
1240 MAXROWS = SCRDEPTH
1250 DIM D(MAXCOL,MAXROWS)
1260 DIM D$(MAXCOL,MAXROWS) 1270 NUMOPS = 5 1280 DIM O$(NUMOPS)
1290 O$(1) = "=" : O$(2) = "+" : O$(3) = "-" : O$(4) = "*" : O$(5) = "/" 1300 ' 1310 '************* init ************ 1320 FOR X = 1 TO MAXCOL 1330 D$(X,0) = SPACE$(COLWIDTH - 1) + CHR$(X+ASC("A")-1)
1340 NEXT X
1350 FOR Y =1 TO MAXROWS
1360 D$(0,Y) = SPACE$(COLWIDTH-2)+RIGHT$(STR$(Y),2)
1370 NEXT Y
1380 GOSUB 1610
1390 CRSX = 1 : CRSY = 1 : GOSUB 1890
1400 COLOR 0,7 : LOCATE YLOC,XLOC : PRINT SPACE$(COLWIDTH); : COLOR 7,0 1410 ' 1420 ' command loop 1430 ' 1440 WHILE 0&lt;1 1450 LOCATE 23,1 : PRINT SPACE$(79);: IN$=&quot;&quot; : IK = 0 1460 LOCATE 23,1 : PRINT&quot;CMD: &quot;; 1470 WHILE IK 13 1480 I$= INKEY$: IF I$ = "" THEN 1480
1490 IK = ASC(I$) 1500 IF LEN(I$) = 2 THEN GOSUB 9000: GOSUB 2100:GOSUB 1720 ELSE IF IK = 8 THEN GOSUB 1940 ELSE IF IK 13 THEN PRINT I$;: IN$ = IN$+ I$
1510 WEND
1520 C$= LEFT$(IN$,1) 1530 LOCATE 24,1 : PRINT SPACE$(79);
1540 LOCATE 24,1 : PRINT IN$; 1550 IF C$ = CHR$(34) THEN GOSUB 1990 ELSE IF C$="=" THEN GOSUB 2050 ELSE IF C$="C" THEN GOSUB 2740 ELSE IF C$ = "F" THEN GOSUB 4000 ELSE ER$= "BAD INPUT: "+IN$: GOSUB 2660
1560 WEND
1570 '
1580 '
1590 '
1600 ' sub to print screen
1610 CLS : DD = 0 : TEMPY = CRSY : TEMPX = CRSX
1620 LOCATE 25,31: PRINT "LIZZYCALC .01" : LOCATE 1,1
1630 FOR CRSY = 0 TO MAXROWS
1640 FOR CRSX = 0 TO MAXCOL
1650 GOSUB 2100 : PRINT V$; 1660 NEXT CRSX 1670 NEXT CRSY 1680 CRSX = TEMPX : CRSY = TEMPY 1690 RETURN 1700 ' 1710 'sub to move cursor 1720 ON IK-71 GOSUB 1850,0,0,1790,0,1810,0,0,1830 1730 LOCATE YLOC,XLOC : PRINT V$;
1740 LOCATE 24,1 : PRINT SPACE$(79); 1750 LOCATE 24,1 : PRINT D$(CRSX,CRSY);
1760 GOSUB 2890
1770 LOCATE 23,LEN(IN$)+5 1780 RETURN 1790 ' move left 1800 IF CRSX &gt; 1 THEN CRSX = CRSX - 1 : RETURN ELSE RETURN 1810 'move right 1820 IF CRSX &lt; MAXCOL THEN CRSX = CRSX + 1 : RETURN ELSE RETURN 1830 ' move down 1840 IF CRSY 1 THEN CRSY = CRSY -1 : RETURN ELSE RETURN 1870 ' 1880 ' sub to compute screen postion 1890 XLOC = (COLWIDTH * CRSX)+1 1900 YLOC = CRSY + 1 1910 RETURN 1920 ' 1930 ' sub to process backspace on command line 1940 NEWLEN = LEN(IN$)-1
1950 IF NEWLEN &gt;=0 THEN PRINT CHR$(8);: IN$ = LEFT$(IN$,NEWLEN)
1960 RETURN
1970 '
1980 ' sub to formulate input
1990 D(CRSX,CRSY)=0:TEXTLEN=LEN(IN$)-1:IF TEXTLEN&lt;1 THEN TEXTLEN=1 2000 IF RIGHT$(IN$,1)=CHR$(34) THEN TEXTLEN = TEXTLEN-1
2010 D$(CRSX,CRSY) = LEFT$(MID$(IN$,2,TEXTLEN),COLWIDTH)
2015 GOSUB 2890
2020 RETURN
2030 '
2040 'sub to formula input
2050 V$= IN$ : GOSUB 2140
2060 IF ERRFLAG = 0 THEN D$(CRSX,CRSY) = IN$
2065 GOSUB 2890
2070 RETURN
2080 '
2090 'SUB TO PREPARE OUTPUT
2100 IF LEFT$(D$(CRSX,CRSY),1)=&quot;=&quot; THEN V$=RIGHT$(SPACE$(COLWIDTH)+STR$(D(CRSX,CRSY)),COLWIDTH) ELSE V$=LEFT$(D$(CRSX,CRSY)+SPACE$(COLWIDTH),COLWIDTH)
2110 RETURN
2120 '
2130 ' SUB TO EVALUATE EXPRESSION
2140 ERRFLAG = 0 : VI$= V$
2150 WHILE V$"" 2160 GOSUB 2310 2170 IF ERRFLAG 0 THEN ER$="BAD OPERATOR IN:"+VI$: GOSUB 2660 : RETURN 2180 GOSUB 2400 2190 IF ERRFLAG 0 THEN ER$="BAD FORMULA:"+VI$: GOSUB 2660: RETURN 2200 ON OPCODE GOSUB 2240,2250,2260,2270,2280 2210 WEND 2220 D(CRSX,CRSY) = VL 2230 RETURN 2240 VL = V : RETURN 2250 VL = VL + V : RETURN 2260 VL = VL - V : RETURN 2270 VL = VL * V : RETURN 2280 VL = VL / V : RETURN 2290 ' 2300 ' SUB TO DECODE OPERATOR 2310 OP$ = LEFT$(V$,1)
2320 OPCODE = 0
2330 FOR I = 1 TO NUMOPS
2340 IF OP$=O$(I) THEN OPCODE = I : I = NUMOPS:V$=MID$(V$,2) 2350 NEXT I 2360 IF OPCODE = 0 THEN ERRFLAG = 1 2370 RETURN 2380 ' 2390 'SUB TO DECODE OPERAND 2400 V = VAL(V$) : C$=LEFT$(V$,1) : ERRFLAG = 0 : T = 0 2410 IF V = 0 AND C$"0" THEN GOSUB 2530 ELSE GOSUB 2450
2420 RETURN
2430 '
2440 'SUB TO PROCESS AS A CONSTANT
2450 IX=1:IF C$="-" THEN C$="0"
2460 WHILE (C$&gt;="0" AND C$ 32 THEN C = C - 32
2540 IF C MAXCOL THEN ERRFLAG = 1 : RETURN
2550 XC=C : C = 0
2560 WHILE V$"" AND C&gt;=0 AND C&lt;=9 2570 V$=MID$(V$,2)
2580 IF V$"" THEN C=ASC(V$)-ASC("0") : IF C&gt;=0 AND C MAXROWS THEN ERRFLAG = 1 : RETURN
2610 YC = T
2620 V = D(XC,YC)
2630 RETURN
2640 '
2650 ' SUB TO GENERATE GENERAL ERROR REPORT
2660 LOCATE 24,1 : PRINT ER$+" "; 2670 BEEP 2680 WHILE INKEY$="" : WEND
2690 LOCATE 24,1 : PRINT SPACE$(79); 2700 LOCATE 24,1 : PRINT D$(CRSX,CRSY);
2710 RETURN
2720 '
2730 ' sub to update formula values
2740 LOCATE 24,1 : PRINT SPACE$(79); 2750 LOCATE 24,1 : PRINT"Caculating!"; 2760 TEMPY=CRSY: TEMPX = CRSX 2770 FOR CRSY = 1 TO MAXROWS 2780 FOR CRSX = 1 TO MAXCOL 2790 IF LEFT$(D$(CRSX,CRSY),1)="=" THEN V$=D$(CRSX,CRSY): GOSUB 2140 : GOSUB 1890 : LOCATE YLOC,XLOC: GOSUB 2100: PRINT V$;
2800 NEXT CRSX
2810 NEXT CRSY
2820 CRSX = TEMPX : CRSY = TEMPY : GOSUB 1890
2830 GOSUB 2890
2840 LOCATE 24,1 : PRINT STRING$(79," "); 2850 LOCATE 24,1 : PRINT D$(CRSX,CRSY);
2860 RETURN
2870 '
2880 ' sub to show current cell value
2890 GOSUB 1890 : GOSUB 2100 : COLOR 0,7
2900 LOCATE YLOC,XLOC: PRINT V$;: COLOR 7,0 2910 RETURN 4000 '-- 4001 ' (F)ile routine 4002 '-- 4010 LOCATE 23,1 : PRINT SPACE$(79);
4020 LOCATE 23,1 : INPUT"Enter (L)oad or (S)ave data: ",QQ$4030 LOCATE 24,1 : PRINT SPACE$(79);
4040 LOCATE 24,1 : INPUT"Enter file name: ",DATUM$4050 WHILE QQ$="L"
4060 OPEN DATUM$FOR INPUT AS #1 4070 FOR AY = 1 TO MAXROWS 4080 FOR AX = 1 TO MAXCOL 4090 INPUT#1,D(AX,AY),D$(AX,AY)
4100 NEXT AX
4110 NEXT AY
4120 CLOSE#1
4140 QQ$="" 4150 WEND 5050 WHILE QQ$="S"
5060 OPEN DATUM$FOR OUTPUT AS #1 5070 FOR AY = 1 TO MAXROWS 5080 FOR AX = 1 TO MAXCOL 5090 PRINT#1,D(AX,AY),D$(AX,AY)
5100 NEXT AX
5110 NEXT AY
5120 CLOSE#1
5140 QQ$="" 5150 WEND 9000 ' 9010 ' fix i$
9020 IK = ASC(RIGHT$(I$,1))
9030 RETURN
[/code]