Coder Social home page Coder Social logo

brickpool / hp35s Goto Github PK

View Code? Open in Web Editor NEW
5.0 0.0 0.0 814 KB

HP 35s scientific calculator

Home Page: https://github.com/brickpool/hp35s/wiki

License: MIT License

Perl 85.17% HTML 12.57% Raku 2.26%
calculator rpn-calculator rpn hewlett-packard hp

hp35s's Introduction

HP-35s scientific calculator

An Assembler asm2hpc.pl prepares the programs for HP-35s. Assembler programs (*.asm) benefit from the symbolic resolution of labels, named constants and simple macro functions.

Perl (*.pl or *.pm) is used as the implementation language for the Assembler.

The machine code is not directly available, a well-formatted, ready-to-use format (*.txt option -p or *.35s option -u) with all numbered lines, all labels and jump labels (option -j) will be generated by the Assembler.

The associated key strokes can optionally be output as a comment by the Assembler (option -s).

It can be very helpful to import the programs by using the Emulator Macro funnction to test the program logic (AppData/Marcos/*.mac option -e).

Install

To install the HP Calculator Parser module for the Assembler type the following:

perl Makefile.PL
make
make install

Usage

The assembler directives, symbols and error messages are described in the wiki.

The Perl script asm2hcp.pl converts an assembler program to HP35s native program code (Reverse Polish Notation).

asm2hpc.pl --help
USAGE:
  c:> type <asm-file> | perl asm2hpc.pl [options] 1> outfile.35s 2> outfile.err

VERSION: v0.4.0
  Web: http://www.brickpool.de/

OPTIONS:
  -h, --help          Print this text
  -v, --version       Prints version
  -j, --jumpmark      Prints an asterisk (*) at the jump target
  -c, --clear         Prints keystrokes to delete the program memory
  -p, --plain         Output as Plain text (7-bit ASCII)
  -m, --markdown      Output as Markdown (inline HTML 5)
  -u, --unicode       Output as Unicode (UTF-8)
  -s, --shortcut      Output shortcut keys as comment
  -e, --encoded       Output key codes as Macros (UU Encoding)
  --debug             Show debug information on STDERR

  --file=<asm-file>:
    Location of asm-file (Default is STDIN)

This script converts an assembler program to HP35s native program code
The output will be sent to STDOUT

Examples

The examples/ directory has a few simple examples of what you can do with the Assembler syntax:

perl -Ilib asm2hpc.pl --file=examples/C/C.asm > examples/C/C.txt
perl -Ilib asm2hpc.pl --plain --file=examples/C/C.asm > examples/C/C.raw
perl -Ilib asm2hpc.pl --unicode --shortcut --file=examples/C/C.asm > examples/C/C.35s
perl -Ilib asm2hpc.pl -c -e -f examples\J\J.asm | extras\tools\uudecode.pl

Each example has a ready-to-use emulation file (AppData/*.ep) to load the program directly to your PC version of the HP 35s calculator.

hp35s's People

Contributors

brickpool avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.