HP 16C: Программируемый калькулятор для программистов
HP-16C
HP 16C: программируемый калькулятор Hewlett Packard для программистов (1982-1989). Поддержка HEX, BIN, OCT, DEC. Уникальный инструмент для отладки кода.
Сравнивайте с английским: нажмите на абзац — оригинал откроется в окне. Кнопка EN под абзацем показывает его прямо в тексте.
Содержание
Введение
Программируемый калькулятор, выпускавшийся компанией Hewlett Packard.
Programmable calculator produce by Hewlett Packard
HP 16C Computer Scientist – это программируемый карманный калькулятор, производившийся компанией Hewlett Packard с 1982 по 1989 год. Он был специально разработан для использования программистами и помощи в отладке программ. Он относится к серии программируемых калькуляторов HP Voyager. Это был единственный калькулятор, специально предназначенный для программистов, выпущенный HP, хотя многие последующие модели HP включили в себя большинство функций 16C.
The HP 16C Computer Scientist is a programmable pocket calculator that was produced by Hewlett Packard between 1982 and 1989. It was specifically designed for use by computer programmers, to assist in debugging. It is a member of the HP Voyager series of programmable calculators. It was the only programmer's calculator ever produced by HP, though many later HP calculators have incorporated most of the 16C's functions.
Особенности
16C может отображать целые числа в шестнадцатеричной, десятичной, восьмеричной и двоичной системах счисления, а также преобразовывать числа из одной системы счисления в другую. Он также работает с числами с плавающей запятой. Для размещения длинных целых чисел дисплей можно прокручивать влево и вправо. Для обеспечения совместимости с компьютером, с которым работает программист, размер слова может быть установлен в диапазоне от 1 до 64 бит. Бинарные арифметические операции могут выполняться как с беззнаковыми числами, так и с использованием представления в дополнительном коде единиц или дополнительном коде двойки. Это позволяет калькулятору эмулировать компьютер программиста. Для помощи программисту предусмотрен ряд специализированных функций, включая сдвиг влево и вправо, циклический сдвиг влево и вправо, маскирование и побитовые логические операции. Помимо функций для программистов, возможности калькулятора ограничены базовыми арифметическими операциями (а также вычислением обратной величины и квадратного корня), что означало, что обычные пользователи также использовали бы обычный научный калькулятор. Числа с плавающей запятой поддерживаются только для десятичной системы счисления. Однако он все равно значительно мощнее (хотя и намного дороже), чем современные конкуренты, такие как не программируемый компьютерный математический калькулятор Casio CM 100 или TI LCD Programmer или Programmer II. На задней панели 16C имеется печатная справочная таблица для многих его функций. Калькулятор использует проприетарный процессор HP Nut, изготовленный по технологии массового CMOS-процесса, и оснащен постоянной памятью, благодаря которой содержимое памяти сохраняется при выключении калькулятора. Хотя сейчас это обычная практика, в начале 1980-х годов это было заметным преимуществом и является причиной появления буквы "C" в названии модели.
The 16C can display integers in hexadecimal, decimal, octal and binary, and convert numbers from one number base to another. It also deals with floating point decimal numbers. To accommodate long integers, the display can be 'windowed' by shifting it left and right. For consistency with the computer the programmer is working with, the word size can be set to different values from 1 to 64 bits. Binary arithmetic operations can be performed as unsigned, ones' complement, or two's complement operations. This allows the calculator to emulate the programmer's computer. A number of specialized functions are provided to assist the programmer, including left and right shifting, left and right rotating, masking, and bitwise logical operations. Apart from programmer functions, the calculator's abilities are limited to basic arithmetic (and reciprocal and square root), which meant that typical users would also make use of a general scientific calculator. Floating point numbers are only supported for base 10. However, it is still far more powerful (though also much more expensive) than contemporary competitors such as the non programmable computer math calculator Casio CM 100 or the TI , LCD Programmer or Programmer II. The back of the 16C features a printed reference chart for many of its functions. The calculator uses the proprietary HP Nut processor produced in a bulk CMOS process and featured continuous memory, whereby the contents of memory are preserved while the calculator is turned off. Though commonplace now, this was still notable in the early 1980s, and is the origin of the "C" in the model name.
Программирование
16С, как и все остальные модели серии Voyager, является программируемым. Используется программирование нажатием клавиш. Доступно до 203 шагов программы и до 16 меток/шагов программы. Каждый шаг и метка занимают один байт, что потребляет 7 байт регистровой памяти. Вот пример программы, вычисляющей факториал целого числа от 2 до 69. Программа занимает 9 байт. Коды, отображаемые при вводе программы, обычно соответствуют координатам строки/столбца клавиш на клавиатуре.
The 16C, like all other members of the Voyager series, is itself programmable. Keystroke programming is used. Up to 203 program steps are available, and up to 16 program/step labels. Each step and label uses one byte, which consumes register space in 7 byte increments. Here is a sample program that computes the factorial of an integer number from 2 to 69. The program takes up 9 bytes. The codes displayed while entering the program generally correspond to the keypad row/column coordinates of the keys pressed. Step Keystrokes(shift keys not shown) Displayed code Comment 001 43,22, F Define label F (mnemonic for "factorial") 002 42 22 Store x in register I 003 1 Store 1 in x 004 43,22, 0 Define label 0 005 45 32 Recall register I into x 006 20 Multiply x and y 007 43 23 Decrement register I and if not zero 008 22 0 go back to label 0 009 43 21 Stop program result displayed in x
To run the program, enter the argument onto the stack, then press the keystrokes The result is displayed when the program terminates.
Шаг Нажатия клавиш (модификаторы не показаны) Отображаемый код Комментарий
001 43,22, F Определить метку F (мнемоническое обозначение для "факториал")
002 42 22 Сохранить x в регистр I
003 1 Сохранить 1 в x
004 43,22, 0 Определить метку 0
005 45 32 Извлечь из регистра I в x
006 20 Умножить x на y
007 43 23 Уменьшить регистр I и, если не ноль,
008 22 0 вернуться к метке 0
009 43 21 Остановить программу – результат отображается в x
The 16C, like all other members of the Voyager series, is itself programmable. Keystroke programming is used. Up to 203 program steps are available, and up to 16 program/step labels. Each step and label uses one byte, which consumes register space in 7 byte increments. Here is a sample program that computes the factorial of an integer number from 2 to 69. The program takes up 9 bytes. The codes displayed while entering the program generally correspond to the keypad row/column coordinates of the keys pressed. Step Keystrokes(shift keys not shown) Displayed code Comment 001 43,22, F Define label F (mnemonic for "factorial") 002 42 22 Store x in register I 003 1 Store 1 in x 004 43,22, 0 Define label 0 005 45 32 Recall register I into x 006 20 Multiply x and y 007 43 23 Decrement register I and if not zero 008 22 0 go back to label 0 009 43 21 Stop program result displayed in x
To run the program, enter the argument onto the stack, then press the keystrokes The result is displayed when the program terminates.
Для запуска программы введите аргумент в стек, затем выполните последовательность нажатий клавиш. Результат отображается после завершения программы.
The 16C, like all other members of the Voyager series, is itself programmable. Keystroke programming is used. Up to 203 program steps are available, and up to 16 program/step labels. Each step and label uses one byte, which consumes register space in 7 byte increments. Here is a sample program that computes the factorial of an integer number from 2 to 69. The program takes up 9 bytes. The codes displayed while entering the program generally correspond to the keypad row/column coordinates of the keys pressed. Step Keystrokes(shift keys not shown) Displayed code Comment 001 43,22, F Define label F (mnemonic for "factorial") 002 42 22 Store x in register I 003 1 Store 1 in x 004 43,22, 0 Define label 0 005 45 32 Recall register I into x 006 20 Multiply x and y 007 43 23 Decrement register I and if not zero 008 22 0 go back to label 0 009 43 21 Stop program result displayed in x
To run the program, enter the argument onto the stack, then press the keystrokes The result is displayed when the program terminates.
Наследие
HP никогда не выпускала другой калькулятор, специально предназначенный для программистов. Доступно несколько эмуляторов для настольных компьютеров, веб-браузеров, смартфонов и других калькуляторов. В 2012 году SwissMicros (также известная как RPN Calc) представила миниатюрный клон DM 16CC, размеры которого приближены к размеру кредитной карты ID 1 (88 мм × 59 мм × 7 мм). Он точно эмулирует функциональность оригинального HP 16C, запуская исходный образ ROM в эмуляторе на процессоре ARM Cortex M0, основанном на NXP LPC1114. Новые модели DM16 оснащены улучшенной клавиатурой и большим объемом оперативной памяти (LPC1115). Также доступно серебряное издание DM16 в титановом корпусе в трех цветовых вариантах (металлик, коричневый, синий). Отклоняясь от оригинала, эти калькуляторы оснащены точечно-матричным дисплеем, переключаемыми шрифтами и тактовыми частотами, а благодаря чипу-преобразователю Silicon Labs CP2102 они имеют последовательный интерфейс USB (Mini B) для обмена данными с ПК и т. д. с целью создания резервных копий (и, возможно, для связи с приложениями, такими как эмуляторы HP 16C для ПК) или обновления прошивки. В декабре 2015 года SwissMicros представила DM16L – версию калькулятора, размеры которой примерно соответствуют оригинальному HP 16C. Он по-прежнему оснащен разъемом USB Mini B. Питание через USB не поддерживается. В июле 2023 года лицензиаты HP Development Company, L. P. – Moravia Consulting spol. s r. o. и Royal Consumer Information Products, Inc. – представили коллекционное издание hp 15C, которое также включает в себя неопубликованный режим эмуляции HP 16C. Исходная прошивка содержала ошибку, из-за которой числа, чье шестнадцатеричное представление заканчивается на E или F, отображались некорректно в десятичном режиме, которая была исправлена усилиями сообщества в октябре 2023 года.
HP has never made another calculator specifically for programmers, Several emulators are available for desktop computers, web browsers, smartphones and other calculators. In 2012, SwissMicros (aka RPN Calc) introduced a miniature clone named DM 16CC approximating the size of an ID 1 credit card (88 mm × 59 mm × 7 mm). It closely emulates the functionality of the original HP 16C by running the original ROM image in an emulator on an ARM Cortex M0 based NXP LPC1114 processor. Newer DM16 models feature a better keyboard and more RAM (LPC1115). A DM16 Silver Edition in a titanium case is available as well in three color variants (metal, brown, blue). Deviating from the original, these calculators feature a dot matrix display, switchable fonts and clock speeds, and, based on a Silicon Labs CP2102 converter chip, they come with a USB (Mini B) serial interface to exchange data with a PC etc. for backup purposes (and possibly to communicate with applications like PC based HP 16C emulators) or to update the firmware. In December 2015, SwissMicros introduced the DM16L, a version of the calculator about the same size as the original HP 16C. It still comes with a USB Mini B connector. Powering via USB is not supported. In July 2023, the HP Development Company, L. P.'s licensees Moravia Consulting spol. s r. o. and Royal Consumer Information Products, Inc. introduced the hp 15C Collector's Edition, which comes with an undocumented mode to emulate the HP 16C as well. The original firmware still had a bug where numbers whose hexadecimal representation ends in E or F are displayed incorrectly in decimal mode, which was fixed by a community effort in October 2023.