Writing Hp 41cx Programs

Posted By admin On 22.12.19
  1. Writing Hp 41cx Programs For Parents
  2. Hp 41cx Emulator For Windows 7
(Redirected from HP41)
  • HP-41CX Quick Reference Guide Contents The HP-41CX Keyboards Normal User A pha Alarm Catalog Stopwatch Text Editor How to Execute Functions Function Set.
  • Item 4 HP-41CX Hewlett Packard Calculator HP 41CX with Case - HP-41CX Hewlett Packard. HP41CX is great for writing short programs to solves engineering problems on.
  • System Review The HP-41C: A Literate Calculator? Brian P Hayes Scientific American 415 Madison Ave. Or precoded applications programs. The HP-41C alone costs about $300; a system including all three peripheral devices and. (or, in other words, those things that aid in writing pro grams and in interpreting their results).
  • Item 5 HP-41CX Hewlett Packard Calculator HP 41CX with. Item 6 Hewlett-Packard HP 41CX Scientific Calculator. Thousands of user-written programs are available.

A demonstration of how to load programs from a HP-IL Digital Cassette Drive, with a HP-IL printer in the loop. The DIR command was issued to check the availa. Jul 10, 2016  A brief description of how to enter a program on the HP 35s. There are much, much more advanced things that can be done but I would recommend looking at other programs or reading the manual to get. Downloadable HP-41 Programs Documentation These programs were loaded into an HP-41C via magnetic cards or bar codes and then uploaded. At this time, no one has taken the time to rewrite the documentation for these programs as HTML pages.

HP-41C series
HP-41CX with magnetic card reader and thermal printer
Type
Introduced1979
Discontinued1990
Calculator
Entry modeRPN
Display type
Programming
Programming language(s)RPN key stroke (fully merged, Turing complete)
Memory register63 . 319
Program steps441 . 2233
Interfaces
Portsfour vendor specific
Connects tomicro-cassette via:

floppy disk via:

PC via one of:

  • and RS-232
Other
Power supplyfour size N batteries or HP 82120A rechargeable battery pack

The HP-41C series are programmable, expandable, continuous memory handheld RPNcalculators made by Hewlett-Packard from 1979 to 1990. The original model, HP-41C, was the first of its kind to offer alphanumeric display capabilities. Later came the HP-41CV and HP-41CX, offering more memory and functionality.

  • 3Programming
  • 7Expandability

The alphanumeric 'revolution'[edit]

Php extension serial port. The alphanumericLCD screen of the HP-41C revolutionized the way a pocket calculator could be used, providing user friendliness (for its time) and expandability (keyboard-unassigned functions could be spelled out alphabetically). By using an alphanumeric display, the calculator could tell the user what was going on: it could display meaningful error messages ('ZERO DIVIDE') instead of simply a blinking zero; it could also specifically prompt the user for arguments ('ENTER RADIUS') instead of just displaying a question mark.

Earlier calculators needed a key, or key combination, for every available function. The HP-67 had three shift keys (gold 'f', blue 'g' and black 'h' prefix keys); the competing Texas Instruments calculators had two (2nd and INV) and close to 50 keys (the TI-59 had 45). Hewlett-Packard were constrained by their one byte only instruction format. The more flexible storage format for programs in the TI-59 allowed combining more keys into one instruction. The longest instruction required eleven keypresses, re-using the shift keys four times. The TI-59 also made use of the Op key followed by two digits to access another 40 different functions, but the user had to remember the codes for them. Clearly, a more convenient and flexible method of executing the calculator's instructions was needed. The HP-41C had a relatively small keyboard, and only one shift key, but provided hundreds of functions. Every function that was not assigned to a key could be invoked through the XEQ key (pronounced EXEQTE — 'execute') and spelled out in full, e.g. XEQ FACT for the factorial function.

The calculator had a special user mode where the user could assign any function to any key if the default assignments provided by HP were not suited to a specific application. For this mode, the HP-41C came with blank keyboard templates; i.e. plastic covers with holes for the keys, so the user could annotate customized keys. Hewlett-Packard even sold a version of the calculator where hardly any keys had function names printed on them, meant for users who would be using the HP-41C for custom calculations only (thus not needing the standard key layout at all); this version of the calculator was colloquially known, within HP's Corvallis calculator team, as a 'Blanknut' (because the development code name for the HP-41C's processor was known as the 'coconut').[1]

Alphanumeric display also greatly eased editing programs, as functions were spelled out in full. Numeric-only calculators displayed programming steps as a list of numbers, each number generally mapped to a key on the keyboard, often via row and column coordinates. Encoding functions to the corresponding numeric codes, and vice versa, was left to the user, having to look up the function–code combinations in a reference guide. The busy programmer quickly learned most of the codes, but having to learn the codes intimidated the beginners. In addition to this, the user had to mentally keep function codes separate from numeric constants in the program listing.

The HP-41C displayed each character in a block consisting of 14 segments that could be turned on or off; a so-called fourteen segment display (similar to the much more common seven segment displays, which can be used to display digits only). The HP-41C used a liquid-crystal display instead of the ubiquitous LED displays of the era, to reduce power consumption.

While this allowed the display of uppercase letters, digits, and a few punctuation characters, some designs needed to be twisted arbitrarily (e.g. to distinguish S from 5) and lowercase letters were unreadable (HP only provided display of lowercase letters a through e). HP's competitor Sharp, when introducing the PC-1211, used a dot matrix of 5×7 dots and displayed the characters in principle as we see them today on computer screens (and, in fact, many LCD screens on various embedded systems); this was later used by HP with the HP-71B handheld computer.

The HP-41CV and CX[edit]

Many users had used all four ports for memory expansion, leaving no room for other modules. HP designed the Quad Memory Module with four times the amount of memory, providing the maximum available memory and leaving three empty ports available. The HP-41CV (V being the Roman numeral for 5) included this memory module on the main board, thus providing five times the memory of the HP-41C, and four available slots.

The internal architecture prohibited the addition of more memory, so HP designed an extended memory module that could be seen as secondary storage. You could not access the data directly, but you could transfer it to and from main memory. To the calculator (and the user), data located in the extended memory looked like files on a modern hard disk do for a PC (user).

The final HP-41 model, the HP-41CX, included extended memory, a built-in time module, and extended functions. It was introduced in 1983 and discontinued in 1990.

Programming[edit]

HP magnetic card

The HP-41C is keystroke programmable, meaning that it can remember and later execute sequences of keystrokes to solve particular problems of interest to the user. These keystroke programs, in addition to performing any operation normally available on the keyboard, can also make use of conditional and unconditional branching and looping instructions, allowing programs to perform repetitive operations and make decisions.

The HP-41C still supports indirect addressing with which it is possible to implement a Universal Turing machine and therefore the programming model of the HP-41C can be considered Turing complete.

Programming example[edit]

Here is a sample program that computes the factorial of an integer number between 1 and 69 (70! needing an exponent greater than 99, the calculator's maximum), that integer being passed as a parameter via the X register. The program takes up 2 registers which is ≈14 bytes.

Synthetic programming[edit]

A large users' community was built around the HP-41C. Enthusiasts around the world found new ways of programming, created their own software (such as a codebreaking game,[2] and a version of Hunt the Wumpus[3]) and expansion modules, and sped up the clock (see overclocking). Most of these activities were coordinated by the PPC club and its president, Richard J. Nelson. The PPC club published the PPC Journal and produced the PPC ROM, a collection of highly optimized low-level programs for the HP-41C.

One of the discoveries of the community was that it was possible to exploit a bug in the program editor to assign strange functions to keys. The most important function was known as the byte jumper, a way to step partially through programming instructions and edit them in ways that were not otherwise allowed. The use of the resulting instructions was called synthetic programming.

Through synthetic instructions, a user could access memory and special status flags reserved for the operating system, and do very strange things, including completely locking the machine. It was possible to create sounds or display characters, and create animations not officially supported by the operating system. The system flags were also accessed as low-level shortcuts to boolean programming techniques. Hewlett-Packard did not officially support synthetic programming, but neither did it do anything to prevent it, and eventually even provided internal documentation to the user groups.

Reception[edit]

In its December 1980 issue, BYTE described the HP-41C as 'the most versatile machine ever'. The author praised HP's documentation as 'among the best in the industry', and reported that the calculator was 'much easier to program and debug' than the TI-59. Stating 'I found the HP-41C far more pleasurable to program and use than its predecessors' because of its alphanumeric display, the author concluded that it was 'maybe not quite' a pocket computer.[2] In the next issue, another author wrote that 'The HP-41C .. is among the programmable calculators that lie closest to the computer borderline. It comes close enough for the jargon of computers to be useful in describing it', and praised the simplicity and reliability of the card reader and compatibility with HP-67 and HP-97 software. The review criticized the inaccuracies in calculations from the lack of guard digits; 'There is something absurd about the world's fanciest calculator not being able to give results accurate to more than seven or eight decimal places'.[4] Hewlett-Packard responded that the alleged imprecision was inherent to arithmetic on any computer with finite precision.[5]

Use on the Space Shuttle[edit]

NASA HP-41CV with velcro to hold it in carrying case, 1983.

A HP-41C that flew on nine early Space Shuttle missions is on display in the Smithsonian Air and Space Museum in Washington, D.C. HP-41Cs with some special hardware configurations (the addition of Velcro strips, pre-production time module, and louder beeper, as well as the removal of parts whose outgassing could cause contamination) were carried on early Shuttle missions for the purpose of performing mundane but necessary calculations, such as calculating the change to the center of gravity due to fuel consumption. The HP-41C was also programmed to handle calculations usually performed by the main on-board computer, such as determining ignition times for re-entry, in the case of a main computer failure.[6][7]

Expandability[edit]

The functions of the calculator could be expanded by adding modules at the top of the machine. Four slots were available to add more memory, pre-programmed solution packs containing programs covering engineering, surveying, physics, math, finance, games, etc. As such, an HP-41 could in fact be tailored to the personal needs of the user. Hardware extensions included a thermal printer, a magnetic card reader (HP-67 compatible via converter software), and a barcode 'wand' (reader).

Extension modules could also add new instructions to the machine. The standard set of mathematical functions of the 41-series was somewhat limited when compared to the functionality of some contemporary HP calculators (notably the HP-34C and the HP-15C). Among others, the standard function set offered no integration or root-finding capabilities and lacked support for matrices and complex numbers; these extra functions could be added by an extension module.

Another module, known as the Interface Loop allowed for connection of more peripherals: larger printers, microcassette tape recorders, 3½-inch floppy disk drives, RS-232 communication interfaces, video display interfaces, etc. The Interface Loop could also be used with the HP-71B, HP-75 and HP-110 computers.

Extension slots of the HP-41CX

HP-41 extension (or expansion) modules allowed the user of a HP-41 programmable calculator to extend the functionality of the machine. The HP-41 had room for up to four expansion modules at the back of calculator.

The HP-41 was not the only calculator of its generation that allowed expansion modules. The TI-58 and TI-59 also had pluggable ROM modules. The HP-41 modules were however much more versatile.

Writing Hp 41cx Programs For Parents

Memory modules (HP-41C only)[edit]

HP 82106A memory module for HP-41C
HP 82170A QUAD memory module for HP-41C

Hp 41cx Emulator For Windows 7

Memory modules added RAM main memory to the calculator, allowing more programming steps and/or more data registers.

The original HP-41C had a main memory of 63 registers of 7 bytes each. Each register could hold either a number, a 6-character string, or up to 7 program steps in the Focal language (program steps used a variable number of bytes).

Each memory module added 64 registers, and the calculator could hold up to 4 of them, for a grand total of 319 registers. While this was considered huge for the time (a little more than 2 kilobytes,) all expansion slots were used. User groups found a way to merge two memory chips in a single module, thus freeing two expansion slots. HP designed a module holding all four in one slot, the so-called Quad Memory Module. The later HP-41CV had the quad module built-in.

Application pacs[edit]

The ROM-based application 'pac' modules added up to 4 kilobytes of read-only memory (some up to 8 kilobytes, but these were simply two independent 4K modules in the same box). Most modules held dozens of programs written in the HP-41C programming language, Focal.

Programs in the ROM modules could be called from a user program, using the ubiquitous XEQ function. In the program code, XEQ appeared as 'XROM' when it was used to call a ROM program.

82104A card reader[edit]

HP 82104A - card reader/writer

The card reader was a device able to read and write small rectangular plastic cards with two magnetic strips. The card reader could copy contents of memory onto magnetic cards, and later read back the data into memory.

As the HP-41C had permanent memory (user programs and data were not wiped out when power was off) there was no absolute need for a permanent storage device, so the card reader was optional.

Each card held two strips of 112 bytes each, that could hold 16 data registers or up to 112 program steps. This limited capacity resulted in typical programs requiring 5 or more magnetic cards to be saved. A full backup of the machine's 319 memory registers plus internal data required 11 magnetic cards (each card had to be inserted twice.)

The card reader could read magnetic cards from the earlier model HP-67. HP-67 programs were translated in HP-41C instructions, as the HP-67 and HP-41 share the same programming model and operation stack. Some instructions however were specific to the HP-67, and the card reader provided additional instructions to emulate the 67.

Magnetic cards could be write-protected, and programs saved as private: once loaded back, the source code for the program could not be displayed. This made magnetic cards an obvious choice for program distribution.

However, the electric motor put a heavy strain on the calculator batteries, and the price tag for blank cards put an even heavier strain on the user's wallet.

82182A time module[edit]

The time module added a real-time clock. The clock allowed use of real-world time in programs. The user could set alarms that triggered calls to user programs. The alarms were able to switch the calculator on, so it was possible to create programs that executed at some point during the day, then switch the calculator off until the next alarm. As the HP-41 was often used as a. BYTE: 244–262.

  • ^Librach, Hank (February 1981). 'Hunt the Wumpus with Your HP-41C'. BYTE: 230, 232. Retrieved 2013-10-18.
  • ^Hayes, Brian P. (January 1981). 'The HP-41C: A Literate Calculator?'. BYTE: 118. Retrieved 2013-10-18.
  • ^Abell, Steve (April 1981). 'Well-Rounded Machine'. BYTE: 16–17. Retrieved 2013-10-18.
  • ^'Hewlett-Packard HP-41C Calculator'. Smithsonian National Air and Space Museum. 1999-08-18. Archived from the original on 2000-12-10. Retrieved 2015-11-03.
  • ^Jarett, Keith (October–November 1984). 'HP 41 in Orbit'. Professional Computing. John Wiley & Sons. 1 (4): 50–54.
  • ^'SwissMicros.com'. Retrieved 2015-11-02.
  • ^ ab'SwissMicros DM15 Scientific Calculator'. JEPSPECTRO. 2017-12-22. Archived from the original on 2017-12-20. Retrieved 2018-01-04.Cite uses deprecated parameter dead-url= (help)
  • ^'SwissMicros'(PDF). SwissMicros. Archived(PDF) from the original on 2017-12-20. Retrieved 2018-01-04.Cite uses deprecated parameter dead-url= (help)
  • Further reading[edit]

    • HP-41C Operating Manual - A Guide for the Experienced User(PDF). Hewlett-Packard Company. June 1980. 00041-90259. Archived(PDF) from the original on 2018-01-04. Retrieved 2018-01-04.Cite uses deprecated parameter dead-url= (help)
    • Emery, Ken (1985). HP-41 MCode for Beginners. Berkeley, USA: Synthetix. ISBN0-9612174-7-2.
    • Mier-Jędrzejowicz, W. A. C. (1986). Extend Your HP-41. Berkeley, USA: Synthetix. ISBN0-9510733-0-3.
    • Oerttel, Burkhard; Hümpfner, Reinhold; Meier, Bernhard; Schilli, Michael; Weber, Andreas; Leissner, Frank; Kaiser, Axel; Strewinski, Reinhard; von Borries, Sebastian; Dalkowski, Heinz; Fegert, Stefan (2014) [1989]. Fegert, Stefan; Dalkowski, Heinz (eds.). Eine Programmsammlung für den HP-41 [A Program Collection for the HP-41] (PDF) (in German). Berlin, Germany: Heldermann Verlag [de]. ISBN3-88538-809-X. Archived(PDF) from the original on 2018-01-04. Retrieved 2018-01-04.Cite uses deprecated parameter dead-url= (help)
    • Wickes, William C. (1980). Synthetic Programming on the HP-41C. Corvallis, USA: Larken Publications. ISBN978-0962525803.

    External links[edit]

    Developer view of the 14 segment LCD Code of the HP41CX Calculator emulation.
    • hp41.org – A website (and domain) dedicated to the HP-41
    • i41CX+ HP-41CX Emulator for the iPhone and iPod touch
    • a41CV A HP41CV simulator for the Android platform
    • HP-41C, HP-41CV and HP-41CX on MyCalcDB (bilingual) (database about 1970s and 1980s pocket calculators)
    • Page of a HP-41CX user with photos, documents for download, printer, card reader..
    • C++ (linux, QT) Source-code project. Simulator HP41CX in a nearly natural look. Based on nsim-0.61 NUT Core by Eric Smith.
    • clonix41.org - A website (and domain) with some interesting enhancements for the HP-41
    Retrieved from 'https://en.wikipedia.org/w/index.php?title=HP-41C&oldid=894910983'