• Please review our updated Terms and Rules here

HP's UCSD Pascal for MS-DOS?

Martin Hepperle

Experienced Member
Joined
Nov 10, 2014
Messages
135
I am trying to identify a Version of Pascal for MS-DOS.

It seems to be a variant of UCSD Pascal, but I am not sure. Maybe the following details ring a bell somewhere...

HP obviously used this system to develop software for the HP 150 as well as for the HP Vectra - MS-DOS 2.x and 3.x systems.
Some programs for these systems were adapted to the systems screen size and I/O drivers but were essentially identical (programs of the HP Drawing/Charting Gallery series).

Another example is the emulator for the HP-12C financial calculator.

The whole program package consists of several files:
28 bytes CALC.BAT
33280 bytes CALCTOR
12544 bytes CALCTOR.12C
6144 bytes CALCTOR.12M
4096 bytes CALCTOR.CSV
8704 bytes CALCTOR.MSG
7680 bytes RUN.EXE
2816 bytes SYSLIB.MSG
44800 bytes SYSLIB.PAS


The program is started by this command line in the batch file CALC.BAT:

RUN CALCTOR;LIB=SYSLIB.PAS


The main file "CALCTOR" contains (besides binary data) these strings:
FILE_MGR
XLIBTRAP
P_STRLTRIM
DOSREAD
XARITRAP
P_STRRTRIM
GETMESSAGEFILE
DOSWRITE
P_STR
QUIT
P___ASSERT
DOSOPEN
CURRENT_DISK
GETMESSAGE
SETDEFAULTDISK
PTERMINATE
P_STRAPPEND
CURRENT_DIR
INSERTMSGCHARS
CHDIR
P_STRPOS
P_STRRPT
CREAT
P_DIV32I
INTERNATIONAL
IOCTL
P_MUL32I
SYNCH
CTRLCOFF
P_GET_PP_LABEL
AIOS
DOSCLOSE
TABLE
0,1
""
VECTORS
0,
""
TUPLES
0,1
""
DATA
0,0
""
-1,0
BOT
-1,0
EOD


The starter program "RUN.EXE" contains (besides binary data) these strings:

integer overflow
integer divide by 0
control-c interrupt
fatal disk error
program disc not in drive
fatal error
out of (program) memory
intersegment control stack overflow
can't position program file
can't read program file
attempt to call unresolved external
Hit return to terminate
Memory manager version 23
Can't read Can't open Parser error--job aborted.
No program file.
Expected ';' or ','--line =
Unknown keyword--line =
Expected '='--line =
Expected ';'--line =
Expected quote--line =
Expected filename--line =
Unknown record--file
Not program file--file
Unexpected EOF--file
Undefined externals:
Program has no outer block

PRELOAD
INFO
LIB
IGNORE
DEBUG
P_MMGR_VERS
GET_ENV_PTR
P_SET_INTS
P_RESET_INTS
P_FREE_MEMORY
P_POP_ICS2
P_POP_ICS
P_IS_GOTO
P_GET_PP_LABEL
P_PP_CALL
LOCK_SEGMENT
UNLOCK_SEGMENT
UNLOCK_ALL
P_GET_HVARS
P_GET_IOLIB
P_GET_SYSLIB
P_GET_MATHLIB
XARITRAP
XLIBTRAP
P_CAUSE_ARITRAP
P_CAUSE_LIBTRAP
ENABLE_PROFILE
PROFILE_EXIT
GET_INFO
UNLOCK_ALL
P_GET_HVARS
P_GET_IOLIB
P_GET_SYSLIB
P_GET_MATHLIB
XARITRAP
XLIBTRAP
P_CAUSE_ARITRAP
P_CAUSE_LIBTRAP
ENABLE_PROFILE
PROFILE_EXIT
GET_INFO



Finally, the binary library file "SYSLIB.PAS" seems to be the runtime library of this Pascal.
It seems to be extended for HP's MS-DOS computers (110, 150) because it contains some HP-specific function names.
It includes (besides binary data) these strings, likely the directory of exported functions:

AIOS <- probably HP specific I/O functions
GIOS <- probably HP specific graphical BIOS functions
AGIOS <- probably HP specific alphanumeric BIOS functions
DOSCLOSE
INTERNATIONAL
RUN
DEALLOC
CURRENT_DISK
UNLINK
DOSREAD
GETDATE
FINDNEXT
FLUSHTYPEAHEAD
WAIT
SETDATE
PREP
GETFIRST
DOSWRITE
CHMOD
ALLOC
CHDIR
GETDEVAVAIL
CREAT
CURRENT_DIR
GETTIME
LSEEK
QUIT
SYSERR
SETDEVAVAIL
MKDIR
GETVERSION
CTRLCON
SETTIME
GTMOD
DOSOPEN
RMDIR
IOCTL
SYNCH
GETDMA
MEMAVAIL
GETFREESPACE
FINDFIRST
RENAME
GETSWITCHCHAR
SETDEFAULTDISK
CTRLCSTAT
SETDMA
CTRLCOFF
GETVECTOR
GETNEXT
SETBLOCK
SETSWITCHCHAR
DUP
KEEPPROCESS
LOAD
DUP2
P_GOTO
P_PP_HELPER
FILE_MGR <- UCSD Pascal like file manager?
P___SETCONFIGS
P_DOSCALL
P___RANGE_ERROR
P___ASSERT
P___CHECKHI
P___CHECKLI
P___CHECKLHI
INSERTMSGCHARS
GETMESSAGEFILE
INSERTMSGNUMBER
GETMESSAGENUM
GETMESSAGE
P_ADJ
P_SLO
P_SHI
P_STR
P_STRAPPEND
P_STRCONCAT
P_STRDELETE
P_STRINSERT
P_STRLTRIM
P_STRMOVE
P_STRPOS
P_STRRPT
P_STRRTRIM
P_STRWRITEBOOL
P_STRWRITESTR
P_STRWRITELONG
P_STRWRITEREAL
P_STRWRITEINT
P_STRWRITESINT
P_STRWRITECHR
P_STRREADSTR
P_STRREADBOOL
P_STRREADSCALAR
P_STRREADPACU
P_STRREADLONGF
P_STRREADREAL
P_STRREADINTV
P_STRREADSINT
P_STRREADCHR
STRERR
P_MARKHEAP_MAGI
P_RLSEHEAP_MAGI
RTNHEAP
GETHEAP
P_DISPHEAP_MAGIN
P_NEWHEAP_MAGIC
P_ARCTAN_32F
P_ARCTAN_64F
P_COS_32F
P_COS_64F
P_SIN_32F
P_SIN_64F
P_ADD64F
P_COM64F
P_REM64F
P_DIV64F
P_SUB64F
P_MUL64F
P_16I_CONV_32F
P_32F_CONV_64F
P_32I_CONV_64F
P_16I_CONV_64F
P_32I_CHOP_32F
P_64F_CHOP_32F
P_32F_CHOP_32I
P_32F_CHOP_16I
P_64F_CHOP_32I
P_64F_CHOP_16I
P_32I_RND_32F
P_64F_RND_32F
P_32F_RND_32I
P_32F_RND_16I
P_64F_RND_32I
P_64F_RND_16I
P_CONVERT_STRING
P_32FASC
P_32IASC
P_64FASC
P_16IASC
P_GET_ATTRIBS
P_ASC32F
P_ASC32I
P_ASC64F
P_ASC16I
REAL_TO_FLOAT
REAL_TO_EXP
P_MOD32I
P_DIV32I
P_MUL32I
P_ADD32F
P_DIV32F
P_SUB32F
P_MUL32F
P_COM32F
P_ARCCOS_32F
P_ARCCOS_64F
P_ARCSIN_32F
P_ARCSIN_64F
P_EXP_32F
P_EXP_64F
P_LN_32F
P_LN_64F
P_LOG_32F
P_LOG_64F
P_SQRT_32F
P_SQRT_64F
P_TAN_32F
P_TAN_64F
P_READLN
P_WRITEREAL
P_APPEND
P_WRITE
P_READBOOL
P_LINEPOS
P_READPAC
P_READLONG
PTERMINATE
P_REWRITE
P_WRITELN
P_SEEK
PGET
P_PUT
P_WRITEBOOL
P_WRITESTR
PREAD
P_WRITELONG
P_EOLN
P_READCHR
P_OPEN
P_READSINT
P_FNUM
P_WRITECHR
P_BUFACCESS
P_READINT
P_FSETUP
P_WRITESINT
P_EOF
P_OVERPRINT
P_READREAL
P_PROMPT
P_POSITION
P_RESET
P_WRITEINT
P_READSCALAR
P_PAGE
P_READSTR
PCLOSE
PFERR
P_MAXPOS
P_CLOSE
P_LIB_VERSION
P_FREE_MEMORY
P_POP_ICS
P_GET_IOLIB
P_CAUSE_LIBTRAP
P_CAUSE_ARITRAPP_GET_HVARS
P_POP_ICS
GET_ENV_PTR
 
This is very interesting, but it's not a UCSD Pascal.

SYSLIB looks suspicious, but nothing else there really "smells" of a UCSD system, to be honest.
 
The HP Museum in Australia only shows two Pascal compilers for DOS systems. The first is Microsoft Pascal for the 150. The other is Pascal for the Vectra that requires a 68000 board to run HP 200 programs. I highly doubt a program for 150 used a 68000 board.

Note that the HP 150 has its own file manager and the manual for the financial calculator spends page 23 describing how to switch to the file manager.
 
Thank you for looking - this is still a mystery.

It is hard to believe, that HP would roll their own Pascal development system for the MS-DOS systems and not offer it for sale. Or at least write something about it in their Journal.

I am well aware of HP Pascal for HP 9000 systems. Pascal obviously was a language of choice in some divisions of HP at the time. The HP 9000 Pascal was derived from UCSD Pascal. It retained the menu structure and modules, but was not using the pCode approach, translating directly to machine code.

I probably have to try finding people actually being worling at HP with the MS-DOS systems in those years.
 
I can't place it, but I do remember some reference to an internal Pascal in the Journal. I don't know if it was about the Pascal, about someone who worked on the Pascal, or what. But I distinctly recall a reference to it.
 
Back
Top