Version 15.01 of Spitbol Now Available: Supports 64-bit Unix.

This version adds support for x86-64, so that both 32-bit and 64-bit versions of Spitbol are now available.

Downloads in the traditional form are no longer directly supported, since both “Google Code” and “Github” no longer provide downloads built by the project.

Spitbol is now available only from its home at github.com/hardbol/spitbol.

If you wish to use git to work with the probject, use:

$ git clone http://github.com/hardbol/spitbol

If you just want to use the system, then select “Download ZIP” from the project home page, and extract the files from that.

The binaries for 32-bit and 64-bit versions can be found in ./bin/spitbol.m32 and ./bin/spitbol.m64, respectively.

This 64-bit version is built by default, as 32-bit processors are no longer widely used.

Three tools are needed to build Spitbol:

  1. A C compiler
  2. A C runtime library
  3. An assembler

Previous versions used gcc and glibc for the compiler and runtime support, and the nasm assembler.

This version uses tcc for the compiler, musl for the runtime support, and continues the use of nasm.

The make file makefile now uses tcc and musl to build (only) the 64-bit version. To build the 32-bit version and/or to use gcc, use makefile.gcc.

This version rescinds the support for Unicode added in version 13.05. (This caused enough problems that it was deemed best to abandon this experiment.)

Known problems:

  • The SAVE function doesn’t work. (This loss of function occurred whilst adding 64-bit support).
    Note that SAVE mode was mainly of interest back in the day when Spitbol was proprietary,
    so that one could distribute a program written in Spitbol without having to disclose the source.
Advertisements

11 Comments

  1. Posted January 15, 2015 at 14:01 | Permalink | Reply

    Dear David,

    good work, thank you., However: The latest versin which distinguishes between “makefile” and “makefile.gcc” does not work with Gnu-gcc any more. Using gcc and its assembler, the compile results inm repeated error messages of the kind:
    “s.s:305: error: label or instruction expected at start of line”

    In fact, it affects the s.s line numbers 305 to 326 all alike, and assembly stops.

    In the s.s file there are stars with the translator message “source line syntax error”. This did not happen before this (i.e. before until ca. 4 days ago), and ot does not happen with tcc and its assembler. It does, however, happen with all makefiles ather than “makefile”, regardless of wether this is 32 or 64 bit.
    Best wishes

    Burkhard Meissner

  2. Burkhard Meissner
    Posted January 15, 2015 at 14:33 | Permalink | Reply

    Using makefile.gcc (and WS=32 AND WS=64) results in an aborton of the compile. Error message:
    s.s:305: error: label or instruction expected at start of line

    s.s:326: error: label or instruction expected at start of line
    (all lines affected. There is a translaton error in s.s, which shows only stars and error messages at its end:

    * *???* end
    * source line syntax error
    * *???* end
    * source line syntax error
    * *???* end
    * source line syntax error
    * *???* end
    * source line syntax error
    * *???* end
    * source line syntax error
    * *???* end
    * source line syntax error
    * *???* end
    * source line syntax error
    * *???* end
    * source line syntax error
    * *???* end
    * source line syntax error
    * *???* end
    * source line syntax error
    * *???* end
    * source line syntax error

    (all lines bbefore 326 in s.s).

    This also happens with makefile.m32, but not with makefile. I.e.: With gcc itis now broken, but not with tcc. This is so since about 4 or 5 days.

    Burkhard Meissner

  3. Burkhard Meissner
    Posted January 15, 2015 at 14:42 | Permalink | Reply

    Close scrutiny revealed that it may have to do with the makefiles:
    makefile has -u unix_64 (or unix_32) as parameter to the asm.spt program
    makefile.gcc and makefile.m32 have -u 64 (or 32).
    The latter seems the old version. When changed to “unix_64” the thing works

    • Posted January 15, 2015 at 15:32 | Permalink | Reply

      Burkhard,

      Thanks for the note.

      I’m sure you’re right. I’m in the midst of porting to osx right now, and will attend to that when the port is. (I think I’m close to having it done).

      • Burkhard Meissner
        Posted January 16, 2015 at 05:07 | Permalink

        Dear Dave,

        makefile.gcc has improved. It works for WS=64 now, but with WS=32 it gives “s.s:2413: error: impossible combination of address sizes” messages. Somehow, 32 and 64 seem to be still mixed up somewhere.

        Do you have Mark Emmers original versions or sketches of a “callef” (resp. now “callextfun”) function to make calls to .dll / .so external functions. I could think about the layout of such an interface.

        Burkhard

      • Posted January 16, 2015 at 08:30 | Permalink

        Burkhard,

        I’ve sent by email an invitation to join the SPITBOL group at slack.com. Let’s continue the discussion there.

        BTW, I had to fix gcc makefile last night whilst porting to Apple osx.

        thanks,dave

      • Posted January 16, 2015 at 10:59 | Permalink

        Burkhard,

        Please join the SPITBOL group/project at slack.com. We can continue the discussion there.

        dave

  4. Burkhard Meißner
    Posted January 16, 2015 at 07:55 | Permalink | Reply

    I am pasting the new makefile.gcc with corections in the assembly flags here:

    # begin file
    ###########################################################################

    # SPITBOL makefile using gcc

    ws?=64

    debug?=0
    EXECUTABLE=spitbol

    os?=unix

    OS=$(os)
    WS=$(ws)
    DEBUG=$(debug)
    TARGET=$(OS)_$(WS)

    ARCH=m$(WS)
    ARCHDEF=-D m$(WS)

    ifeq ($(OS),unix)
    CC=gcc
    # use llvm for osx bootstrap
    ELF=elf$(WS)
    else
    CC=llvm
    ELF=macho$(WS)
    endif

    # SPITBOL Version:
    MIN= s

    # Minimal source directory.
    MINPATH=./

    OSINT=./osint

    vpath %.c $(OSINT)

    ASM = nasm

    ifeq ($(DEBUG),0)
    CFLAGS= -D m$(WS) -m$(WS)
    else
    CFLAGS= -D m$(WS) -g -m$(WS)
    endif

    # Assembler info — Intel 32-bit syntax
    ifeq ($(DEBUG),0)
    ASMFLAGS = -f $(ELF) -d $(OS)_$(WS)
    else
    ASMFLAGS = -g -f $(ELF) -d $(OS)_$(WS)
    endif

    # Tools for processing Minimal source file.
    LEX= lex.spt
    COD= asm.spt
    ERR= err.spt
    BASEBOL = ./bin/spitbol.$(ARCH)

    # Implicit rule for building objects from C files.
    ./%.o: %.c
    #.c.o:
    $(CC) $(CFLAGS) -c -o$@ $(OSINT)/$*.c

    # Implicit rule for building objects from assembly language files.
    .s.o:
    $(ASM) $(ASMFLAGS) -l $*.lst -o$@ $*.s

    # C Headers common to all versions and all source files of SPITBOL:
    CHDRS = $(OSINT)/osint.h $(OSINT)/port.h $(OSINT)/sproto.h $(OSINT)/spitio.h $(OSINT)/spitblks.h $(OSINT)/globals.h

    # C Headers unique to this version of SPITBOL:
    UHDRS= $(OSINT)/systype.h $(OSINT)/extern32.h $(OSINT)/blocks32.h $(OSINT)/system.h

    # Headers common to all C files.
    HDRS= $(CHDRS) $(UHDRS)

    # Headers for Minimal source translation:
    VHDRS= m.hdr

    # OSINT objects:
    SYSOBJS=sysax.o sysbs.o sysbx.o syscm.o sysdc.o sysdt.o sysea.o \
    sysef.o sysej.o sysem.o sysen.o sysep.o sysex.o sysfc.o \
    sysgc.o syshs.o sysid.o sysif.o sysil.o sysin.o sysio.o \
    sysld.o sysmm.o sysmx.o sysou.o syspl.o syspp.o sysrw.o \
    sysst.o sysstdio.o systm.o systty.o sysul.o sysxi.o

    # Other C objects:
    COBJS = break.o checkfpu.o compress.o cpys2sc.o \
    doset.o dosys.o fakexit.o float.o flush.o gethost.o getshell.o \
    int.o lenfnm.o math.o optfile.o osclose.o \
    osopen.o ospipe.o osread.o oswait.o oswrite.o prompt.o rdenv.o \
    st2d.o stubs.o swcinp.o swcoup.o syslinux.o testty.o\
    trypath.o wrtaout.o zz.o

    # Assembly langauge objects common to all versions:
    # CAOBJS is for gas, NAOBJS for nasm
    CAOBJS =
    NAOBJS = m.o err.o

    # Objects for SPITBOL’s HOST function:
    #HOBJS= hostrs6.o scops.o kbops.o vmode.o
    HOBJS=

    # Objects for SPITBOL’s LOAD function. AIX 4 has dlxxx function library.
    #LOBJS= load.o
    #LOBJS= dlfcn.o load.o
    LOBJS=

    # main objects:
    MOBJS= getargs.o main.o

    # All assembly language objects
    AOBJS = $(CAOBJS)

    # Minimal source object file:
    VOBJS = s.o

    # All objects:
    OBJS= $(AOBJS) $(COBJS) $(HOBJS) $(LOBJS) $(SYSOBJS) $(VOBJS) $(MOBJS) $(NAOBJS)

    # link spitbol with static linking
    spitbol: $(OBJS)
    ifeq ($(WS),32)
    $(CC) $(CFLAGS) $(OBJS) -static -lm -o$(EXECUTABLE) -Wl,-M,-Map,$(EXECUTABLE).map
    endif
    ifeq ($(WS),64)
    $(CC) $(CFLAGS) $(OBJS) -static -lm -ospitbol -Wl,-M,-Map,spitbol.map
    endif

    # link spitbol with static linking without checking objs (for bootstrapping)
    bootbol:
    ifeq ($(WS),32)
    $(CC) $(CFLAGS) $(OBJS) -lm -o$(EXECUTABLE)
    endif
    ifeq ($(WS),64)
    $(CC) $(CFLAGS) $(OBJS) -lm -ospitbol
    endif

    # link spitbol with dynamic linking
    spitbol-dynamic: $(OBJS)
    ifeq ($(WS),32)
    $(CC) $(CFLAGS) $(OBJS) -lm -ospitbol -Wl,-M,-Map,$(EXECUTABLE).map
    endif
    ifeq ($(WS),64)
    $(CC) $(CFLAGS) $(OBJS) -lm -ospitbol -Wl,-M,-Map,$(EXECUTABLE).map
    endif

    # Assembly language dependencies:
    err.o: err.s
    s.o: s.s

    err.o: err.s

    # SPITBOL Minimal source
    s.go: s.lex go.spt
    $(BASEBOL) -u i32 go.spt

    s.s: s.lex $(VHDRS) $(COD)
    $(BASEBOL) -u $(TARGET) $(COD)

    s.lex: $(MINPATH)$(MIN).min $(MIN).cnd $(LEX)
    # $(BASEBOL) -u $(WS) $(LEX)
    $(BASEBOL) -u $(TARGET) $(LEX)

    s.err: s.s

    err.s: $(MIN).cnd $(ERR) s.s
    $(BASEBOL) -1=s.err -2=err.s $(ERR)

    # make osint objects
    cobjs: $(COBJS)

    # C language header dependencies:
    $(COBJS): $(HDRS)
    $(MOBJS): $(HDRS)
    $(SYSOBJS): $(HDRS)
    main.o: $(OSINT)/save.h
    sysgc.o: $(OSINT)/save.h
    sysxi.o: $(OSINT)/save.h
    dlfcn.o: dlfcn.h

    # install binaries from ./bin as the system spitbol compilers
    install:
    sudo cp ./bin/spitbol /usr/local/bin
    clean:
    rm -f $(OBJS) *.o *.lst *.map *.err s.lex s.tmp s.s err.s s.S s.t ./spitbol

    z:
    nm -n s.o >s.nm
    spitbol map-$(WS).spt s.dic
    spitbol z.spt ae

    sclean:
    # clean up after sanity-check
    make clean
    rm tbol*

    ###########################################################################
    # end file

  5. Burkhard Meissner
    Posted January 17, 2015 at 05:03 | Permalink | Reply

    Dar Dave,

    no e-mail whatsoever. Could you give me the address – I do no know how to join.

    • Posted January 17, 2015 at 17:10 | Permalink | Reply

      I sent emails to address wordpress shows for you: bmissne@hsu… but they bounced.

  6. Burkhard Meissner
    Posted January 17, 2015 at 17:01 | Permalink | Reply

    I would like to join the group – but do not kno, how

    The most recebt changes lead to “undefined symbol ia ” in all 32 bit compiles – something must becoe mixed up between 64 and 32 bit

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

  • Pages

  • January 2015
    M T W T F S S
    « Jan   Feb »
     1234
    567891011
    12131415161718
    19202122232425
    262728293031  
  • RSS The Wayward Word Press

  • Recent Comments

    russurquhart1 on SPITBOL for OSX is now av…
    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…
  • Archives

  • Blog Stats

  • Top Posts

  • Top Rated

  • Recent Posts

  • Archives

  • Top Rated

  • %d bloggers like this: