Valentin Albillo's HP Collection

Back Home

Sharp Pocket Computers

Sharp Programs

Here, for the historical record and in order to preserve my earliest unreleased efforts in the wonderful world of programmable calculators and so-called "pocket computers", you'll find a selection of SHARP programs I wrote for various SHARP pocket computers, mainly for the flagship PC-1211, which was given to me by the CEO of Microsoft, a small Spanish company (!) which later shortened its name to just SOFT in order to avoid conflict with the much larger US company you all know and love (or not).

I must say I was extremely pleased with this beautiful and elegant machine and proceeded to very quickly create about 100 programs for it (all of them fit in a single C-60 cassette tape), just to get acquainted with its capabilities and learn what it could do. You can read all about it in my article Know Thy Foe: A New Contender, which compares it vs. the HP-41C and extensively describes its capabilities.

Many of the programs (but not all) are quite simple, barebones affairs for the most part, written just for practice, never intended for release. Back in 1980 I was still learning programming techniques and these portable machines were slow and had little RAM and resources, so bear with me and don't expect any sophisticated or fool-proof programming. That said, I think they're still quite enjoyable and fun to check and even convert to run on other devices.

Last but not least, all PC-1211 programs will also run on both PC-1212 and PC-1210 (memory permitting), and programs for other more advanced SHARP models (PC-1350/PC-1360 ...) will be featured here as well. Stay tuned !

P.S.: All titles ending in (Full Scan) are part of my Project HAM.

PDF SHARP Program VA005 - PC-1211 - Finding Roots of Equations

2-page paper featuring a 3-line BASIC program to find roots of an arbitrary user-supplied equation f(x)=0 using Newton’s method and a user-provided initial guess. Two worked examples included.

PDF SHARP Program VA026 - PC-1211 - 3-point Gaussian Integration

2-page paper featuring a 5-line BASIC program to evaluate the definite integral between given limits of an arbitrary user-supplied function f(x) using the 3-point Gauss-Legendre quadrature formula applied over a number of subintervals. Two worked examples included.

PDF SHARP Program VA038 - PC-1211 - Multiprecision Factorial

2-page paper featuring a 5-line BASIC program to compute the exact multiprecision value of N! for a given N. Two worked examples included.

PDF SHARP Program VA044 - PC-1211 - NxN Matrix Inversion

2-page paper featuring a 5-line BASIC program to compute the inverse of a given NxN matrix, up to 13x13. Two worked examples included.

PDF SHARP Program VA046 - PC-1211 Multiprecision E

2-page paper featuring a 6-line BASIC program to compute up to 572 digits of Euler's constant e (=2.71828+). Two worked sample runs included.

PDF SHARP Program VA061 - PC-1211 Mate w King Bishop Knight Practice

7-page, 13-diagram paper featuring a 43-line BASIC program for the SHARP PC-1211 pocket computer (will also run as-is in the SHARP PC-1212 and compatible models). The program is intended to help the user practice in order to achieve the difficult basic checkmate of King, Bishop and Knight (controlled by the user) vs. King alone (controlled by the program) within a specified number of moves. The user must try and checkmate before the allotted moves elapse while the program does its best to avoid being checkmated.

Two worked examples included, one of them against the world-class chess engine Stockfish 9 (released in 2018 and rated at more than 3,300 ELO), the other against a human user.

PDF SHARP Program VA071 - PC-1211 Truth Tables Generator

3 page paper featuring an 8-line BASIC program to help generate truth tables for logical expressions having 3 or 4 logical variables, recognizing tautologies and contradictions. Three worked examples included.

PDF SHARP Program VA135 - PC-1350 Producing Digits of Pi one at a time

2-page paper featuring a 7-line BASIC program for the SHARP PC-1350/1360 pocket computers and compatibles as a proof-of-concept example of implementing a spigot algorithm to produce digits of Pi one at a time. It will also run in most any BASIC version with minimal changes.

PDF SHARP Program VA160 - PC-1350 An Othello Game Playing Program

12-page paper featuring a medium-sized, 112-line BASIC program I wrote in 2002 for the SHARP PC-1350/1360 pocket computers to play Othello (aka Reversi) vs. the user. As you may already know, since I wrote my first Othello program for the HP-41C when it was released some 40 years ago (as of 2019) I always welcome the chance to write a version of it for every capable machine I may lay my hands on, which proves very useful to assess the various machines' capabilities and ease of use and programming.

That said, this is the version for said SHARP models and compatibles, which takes full advantage of their excellent extended BASIC language, large RAM and big graphics display to become the best version of Othello among all the ones I've created so far as it uses the large graphics screen to display a virtual playing board, which makes unnecessary having to use either a physical board (thus saving lots of hassle) or a printer (thus saving tons of costly paper and time to print the board after every move) and the user can select moves either by using a graphic cursor or else by entering the numeric coordinates.

At the very start the program displays an Options Menu where the user can select who moves first (the user or the program), how to input moves (via graphic cursor or coordinates), the type of opening (Diagonal or Parallel), enable/disable sounds and the type of strategy the program will use (fixed or selectively randomized).

This 12-page PDF document includes a detailed description of the game's rules, full usage instructions, a very extensively commented program listing (more than 60 lines of comments interspersed with the code), a table enumerating and describing all the variables used and a sample game to check correct loading and functionality. The document also includes one picture of my physical SHARP PC-1350 running the program and 8 figures, plus Notes and References.

These articles, programs, pictures, their descriptions and other materials created by me are (c) Valentin Albillo, and can be used freely for non-profit purposes as long as (1) the contents aren't modified in any way and (2) the copyright is acknowledged. In plain words, you can download them and use them for non-profit purposes but do not include them in any media and/or site for which you're asking money, do not tamper with their contents and do not say or imply that you created them or that you don't know who created them, you must always give due credit to me.