[comp.sys.hp] operating system for the hp-41 calculators

peraino@gmu90x.UUCP ( ) (03/23/88)

Greetings;

	For a few years now, I have been working on and off in my spare time
(of which there is not much) on an "operating system" for the hp41 line.
Since I do not belong to any user groups, I don't really know if anything
like it is already out there somewhere. I would like to briefly describe my
system, so that you may tell me if it sounds good, sounds bad, if I am
developing something worthwhile, or if I'm wasting my time.
	This "system" consists of an executive and runtime library that
remain in low memory, and a bunch of utility routines found on most
operating systems. The optimal system to run on would be an hp-41cx with
maximum extended memory. The executive treats x-mem as a ram-disk, and stores
all commands and utilities there. Most applications can run under the system,
if those applications follow some simple conventions. The system basically
manages memory and resources for you, the way an operating system should.
The system features a runtime library which applications may use for doing
standard system things, like writing into the system log, etc. The executive
takes commands you enter, and parses them, looks for the command in x-mem,
if found, adjusts the memory fence, loads and executes the program. Control
is returned to the executive after the command is finished. The system features
a binary log, in which it stores normal system things, like cards read/written,
system up and down, etc. The executive provides a consistent environment
through which you run applications. For example, to copy one file to another,
you would use the COPF command, for COPY_FILE. An abbreviation convention
is normally used, where a command is formed from the first three letters of
the first word, and the first letter from each addition word. To copy from
file A to file B, you would say  COPF,A,B.
The system also has a job which runs every 60 seconds to do cleanup operations
like check for low power. The following are a list of some commands already
developed:

command        long name            description
-------------------------------------------------------------------------
copf           copy_file            copy one file to another. (copf,a,b)
loaf           load_file            load command(s) from cards. (loaf,c1,c2...)
delf           delete_file          remove file(s) from system (delf,f1,f2...)
dumlf          dump_log_file        dump binary log. (dumlf,name)
disc           display_catalog      list of files or commands. (disc,c)
edif           edit_file            editor. better than ed. (edif,name)
ters           terminate_system     shut down executive.
fsck           file_system_check    UNIX-like fsck. (named for familiarity)

	The abbreviation convention comes from the abbreviation convention
used on Control Data's NOS/VE operating system. In addition to these commands
are any utilities you may write, which work within the system in the same
way. In addition to these commands, I want to develop the following in the
future:

ACCTNG- Accounting processor. Generate report from the binary log, reporting
        things like cards read/written, system up, system down, power failures,
        system failures, etc.

BACKUP- A utility allowing the dumping of ascii files to cards. As far as I
        know, one can only dump ascii files to digital tape. This utility
        will allow intelligent dumps to mag cards. By intelligent, I mean
        that a group of files can be dumped to one dump-set, and a dump-set
        listing can be retrieved from the card set, or a specific file could
        be loaded from the set. x-mem is the one thing WALL command ignores.
        this should take care of that, where data is concerned.

SUBMIT- The ability to run a batch job, like ms-dos.- Basically be able to run
        a file with commands in it.

CRON  - A facility like the UNIX crontab.- Be able to have jobs run at specific
        dates and times. This if course can be done with the real-time clock,
        which the system utilizes, but this system will allow those functions
        without interfering with the executive. What would you put in the
        cron? Maybe a daily account log processor, like the following
        hypothetical batch file:

           terl,tmp           ;Terminate log- put in file tmp.
           acctng,tmp,report  ;Run accounting, gen report file.
           delf,tmp           ;delete binary log file.


Overall, the system provides resource management. As you write personal
applications, they can be added to the system. So far, the existing commands
described along with the executive and run-time library are about 1000 lines
of code. This will grow as the new utilities and real applications are
developed. Believe it or not, this all fits into a 41cx quite well, with
plenty of room to spare. In addition, when you bring your system up, you
can simply load only the commands you are interested in.
	I whipped out this letter off the top of my head, so It probably
isn't too organized. This wasn't meant to be a detailed description, but
rather something to give you a feel for it. What are your thoughts on the
concept? Good? Bad? I would entertain questions. I can be reached at
{uunet}!pyrdc!gmu90x!peraino

but I would prefer either of the following:
bitnet:  peraino@gmuvax
internet: peraino@gmuvax.gmu.edu

Thank you for taking the time to read this, and hopefully, respond.

Jake_G_Schwartz@cup.portal.com (03/24/88)

1000 Lines of code? That is HP41 Machine Code? Where did you get your HPp41
machine code experience? The users groups have been distributing and 
developing HP41 Mcode for several years now, but had to discover how it worked
WITHOUT any help from Hewlett-Packard. These groups are PPC, CHHU and HPX.
Your work sounds interesting, but I fear that it may just be too late for the
machine, now that it is almost 9 years old. The latest rumors are that a new
top-of-the-line will see the light of day some time in 1989. Tell us more about
how you gained your knowledge without the users' clubs help.
                     Thanks,
                         Jake Schwartz

billw@hpcvra.HP.COM (Bill Wickes) (03/31/88)

"Synthetic Programming on the HP-41" is still in print. The publisher moved
with the author to Oregon in 1981.  You can obtain the book for $11
(add $1 if you want 1st class mail) from

Larken Publications
4517 NW Queens Ave.
Corvallis OR 97330

The book is also available from Educalc.

-Bill Wickes  HP Corvallis