Category Archives: post

On Porting SPITBOL to the Raspberry Pi

In a recent e-mail Craig Wright asked:

Finally, I am thinking of attempting to port your Spitbol implementation so that it can be run on a Raspberry Pi 3. I assume there would be significant effort required. I would like your thoughts on this?

After resonding to Craig, I realized others might be interested, so here is what I said.


Thanks for the man page! I just checked it into spitbol/x32 and spitbol/x64

Re OSX, the latest is at github/spitbol/x64.

I’ll look at the problem with underline you mentioned.

Re port to PI 3.

Native port would be a lot of work.

Quick workaround would be use to use a DOS emulator to run the Windows version (spitbol/windows-nt) on the PI. A quick search for ‘run dos on PI ‘ turned up, for example

Run DOS on the Raspberry Pi – Use rpix86 to turn your Pi into a 1980s super-computer.

By the way, the Windows version is the same as the Unix version, except its only 32-bit, while we have 32 and 54 bit versions for x86-64. It also has some other features such as graphics support, ability to load assembly language functions, ability to load modules, that have yet to be ported to any other version.
Only problem is that it has upper case as the default, while Unix version uses lower case as the default.

I think the next step would be to port gobol to the PI and complete the port.

Gobol,, is a prototype with a MINIMAL interpreter written in Go.

The next step would be to flesh out the OSINT (OS interface) part of SPITBOL with one written in Go.

The current one is written in C. It was great stuff when it was put together in the 80’s, but I now find it a bit crufty, since it shows the wear and tear of having been adapted so it can be compiled on five or so different architectures (ancient MAC, Solaris, MIPS, Windows, …)

Once we have an OSINT written in GO, we would have a great teaching tool. By the way, the Go OSINT needn’t have all the capabilities of the C version, at least not at the start. Not much is needed to get simple file i/o, time, date, and such up and running.

SPITBOL for teaching is to me the main point. If people want performance they can always use the Windows or UNIX (Linux, OSX) versions.

Given OSINT in Go, then could then attempt translator to direct ARM code, getting rid of the Minimal interpreter written in go.

Note that the version with interpreter and OSINT both in Go could be ported anywhere Go runs, and that seems to be almost everywhere these days.

Thanks again for you interest in, and help on, SPITBOL


Using VirtualBox to Run SPITBOL on OSX

I just resumed work on maintaining SPITBOL since the release of the OSX version in June 2015.

Turns out that was more than enough time for Apple to change the basic C-compiler/library tool chain so SPITBOL can no longer be built.

Though I will try to fix this as time permits, in the interim I suggest OSX users try VirtualBox, which supports running Linux on OSX. For example, I was able to install Linux Mint, my preferred Linux distort, on OSX in a short time, with no glitches. I was also able to compile the latest version of SPITBOL with fixes for DATE() and the elapsed time function (systm.c)


PS: I also tried Parallels Desktop for Mac. It works, but offers only limited graphics resolution for OSX. VirtualBox does a much better job, and it is free, while Parallels Desktop isn’t.




FRIBBLE wins two games against expert player

I just used the FRIBBLE program to play two games of words with friends against an expert player, my friend Phil.

Fribble won one by a score of 428 to 381, the other by one point, 477 to 476.

That FRIBBLE was able to score more than 400 points in each game is also good news.

Can you tell which moves were made by Fribble, and which were not?

SPITBOL Featured in “This 70-Year-Old Programmer Is Preserving an Ancient Coding Language on GitHub”

Jordan Pearson has written an article for Vice’s Motherboard site about my work on SPITBOL:
“This 70-Year-Old Programmer Is Preserving an Ancient Coding Language on GitHub”

It makes reference to an article about SPITBOL that appeared on Hacker News a couple of weeks ago: Hacker News.

SPITBOL 360 Now Available

The original implementation of SPITBOL, for the IBM 360, has been available in source form under the GPL license since 2001, from

The SPITBOL Project has just republished these files in a GIT repository:

With the publication of this version, the source for implementations of SPITBOL produced over a period of over forty years, for the IBM/360 mainframe, MS-DOS for 8088 through Pentium chips, unix for i386, and unix and osx for x64 (amd64), are all now available from

SPITBOL 88 Now Available in Binary and Source Form

Mark Emmer kindly provided the source for SPITBOL 88 soon after we posted SPITBOL 88 in binary form, so both forms are now available:


SPITBOL 88 Binary Distribution, executable binaries, along with documentation,  test and demonstration programs,


SPITBOL 88 Source Distribution, executable binaries, along with documentation,  test and demonstration programs, This version also includes all source files needed to build the system.

SPITBOL file suffix .sbl now allowed: In Memory of Anthony P. “Tony” McCann

The original version of Macro SPITBOL, created in the early 1970’s, was the joint work of Robert B. K. Dewar and Anthony P. “Tony” McCann.

At Robert’s suggestion, I spent two weeks in March 1976 in Leeds, England, where Tony was a professor at the University of Leeds, to learn more about Macro SPITBOL, mainly to see if we could apply some its technology to help in porting SETL to new machines. I was accompanied by my wife Karin and daughter Alison.

Tony and his wife Olga were wonderful hosts.

Working with Tony was a memorable experience. He was a very modest and soft-spoken gentleman.

As long as I can remember, the default extension for SPITBOL source files has been “spt,” pronounced, as one might guess, as “spit.”

Tony preferred the extension “sbl”, pronounced like the name “sibyl.” (I just looked up the meaning of ‘sybil’ and learned that it means “a woman in ancient times supposed to utter the oracles and prophecies of a god.”

Soon after I started working on SPITBOL in 2009, I was able to track down Tony’s email address, and received the following letter in reply in May, 2009:

Hi dave,

I am still living where I was when you visited Leeds all those years ago, when SPITBOL was still a new and needy product! However Olga my wife died from a heart attack 6 weeks ago so I am planning to sell and move next summer to the nearby village of Menston where two of my daughters and their families live.

I have been retired for 7 or 8 years from the software company with which I worked after leaving Leeds University in 1988 – I wanted to program for the last part of my working career rather than be a senior departmental administrator and it all turned out very well.

I hope you are well and presume that you may have reached retirement or thereabouts.

All the best

I learned not long after from Tony’s son that Tony had passed away.

He was a wonderful man, just wonderful.

I have just extended SPITBOL so that the suffix ‘sbl’ can also be used for SPITBOL source files.

From now on, whenever I run an existing SPITBOL program, or write a new one with the suffix “sbl,” I hope that will remind me of Tony.

If you have read this post, I hope you will be so reminded.

Anthony P. “Tony” McCann: May his Memory be a Blessing.”

Preprocessor in Fifty Lines of SPITBOL

As part of the conversion of SPITBOl to generate gnu assembler (gas) instead of NASM format, I learned that the GAS assembler is less powerful than that of NASM. For example, in NASM I could
use ‘define’ to map a register name to ‘eax’ in 32-bit mode, or ‘rax’ in 64-bit mode.

No problemo … SPITBOL to the rescue.

Here is the simple preprocessor I wrote in about twenty minutes:

*	rename registers according to word size

	target = host(0)
	target break('_') . os "_" rem . ws

	prefix = (eq(ws,32) '%e', '%r')

	word = (eq(ws,32) 'dword','qword')
	defines = 'M_WORD ' word ' '
	defines = defines 'D_WORD' ' ' (eq(ws,32) '.long', '.quad') ' '

	define('a(ref)')			:(a.end)
a	ident(os,"osx")				:s(a.err)
	a = '[' ref ']' 			:(return)

	define('m(ref)')			:(m.end)
m	ident(os,"osx")				:s(m.err)
	m = (eq(ws,32) 'd', 'q') 'word ptr ' ref ']' :(return)

	rmap = table(20)

	s = 'XLsiXRdiXSspXTsiWAcxWBbxWCdxW0axIAbp'
rinit	s len(2) . min  len(2) . reg = 		:f(rdone)
	rmap[min] = reg				:(rinit)
	rpat =  'IA' | ('X' any('LRST')) | ('W' any('ABC0')) 

	line = input				:f(end)

aloop	line breakx('A') . first 'A(' bal . ref ')' rem . last = first a(ref) last	:s(mloop)
	defs = defines

	defs break(' ') . key ' ' break(' ') . val ' ' =	:f(mloop)
dloop.1	line key = val				:s(dloop.1)f(dloop)

mloop	line breakx('M') . first 'M(' bal . ref ')' rem . last = first m(ref) last	:s(mloop)

rloop 	line rpat . reg = prefix rmap[reg]	:s(rloop)
	output = line				:(next)
err	output = 'error '
  • Pages

  • February 2017
    M T W T F S S
    « Jan    
  • RSS The Wayward Word Press

  • Recent Comments

    dave porter on On being the maintainer, sole…
    daveshields on On being the maintainer, sole…
    Paul Tallett on On being the maintainer, sole…
    mrrdev on On being the maintainer, sole…
    KT on On being the maintainer, sole…
  • Archives

  • Blog Stats

  • Top Posts

  • Top Rated

  • Recent Posts

  • Archives

  • Top Rated