Skip to content

Original Source Code for the Acorn Cmos Basic (version 4) (in MASM format)

Notifications You must be signed in to change notification settings

stardot/AcornCmosBasic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction
============

This repository contains the original source code for Acorn Cmos Basic.

The structure of the repository is as follows:

    original_sources.zip
              - a copy of the original Cmos Basic source files,
                with the original <cr> line endings.

    adfs/     - disk images in ADFS (adl and dat) formats;
                these are generated by the make_disk_images.sh script
                which uses COEUS's AcornFsUtils package.

    dfs/      - disk images in DFS (ssd and dsd) formats;
                these are generated by the make_disk_images.sh script
                which uses SWEH's Perl mmb_utils.

    src/      - the Cmos Basic source files (with unix line endings)

    tools/    - binaries for MASM (both DFS and non-DFS versions)

Assembling the Basic Source Code
================================

An "ordinary" 6502 Co Processor is needed to assemble the Cmos Basic
sources.

The source code is in Acorn MASM format, and a copy of the "Normal"
version of MASM is included in the disk images.

Using ADFS:
===========

The disk organization on ADFS involves a single disk image containing
the tools (MASM), build scripts, source code, and sufficient free
space for the build process.

In the adfs/ directory are the following versions:

   AcornCmosBasic.adl - this is a 640KB interleaved disk image, suitable
   for writing to a floppy disk.

   AcornCmosBasic.dat - this is a 640KB non-interleaved disk image,
   suitable for using with BeebSCSI (e.g. rename it to scsi0.dat).

Transfer one of these disk images onto your physical hardware.

To assemble the sources, you just need to boot the disk (it contains
an appropriate !BOOT file)

The Basic binary is generated in directory X:

X.CBasObj
    (this has a MD5SUM of 4b484a2011596dca83167a1feffbd6d7)

Using DFS:
==========

(or MMFS)

The disk organization on DFS involves two disk images:
- drive 0: Tools (MASM) and Working files
- drive 2: Cmos Basic sources

In the dfs/ directory are following versions:

Two seperate single sided disk images:
    ssd/AcornCmosBasic_disk0.ssd
    ssd/AcornCmosBasic_disk2.ssd

One double-sided disk image:
    dsd/AcornCmosBasic_disk02.dsd

Transfer one of these disk image sets onto your physical hardware.

To assemble the sources, you just need to boot disk 0 (it contains an
appropriate !BOOT file)

The Basic binary is generated on DRIVE 0:

$.CBasObj
    (this has a MD5SUM of 4b484a2011596dca83167a1feffbd6d7)

Notes
=====

So, exactly which version of BBC Basic is this?

The copyright string is (C) 1984 and the Version is 04. This matches
Basic 4 from the Master MOS 3.20 Mega ROM. However, the binary is
different.

If you compare the two binaries, the difference turns out to be minor:
a one-line addition to CBAS04 (line 469):

SMULB ASL IACCL
 ROL IACCM
 BCS NOTGO   ;; <<<<<<<<<<< Added after Basic 4 released
 LDA WORK+8
 ORA WORK+9
 BNE SMULA
 ASSERT :MSB: SMULA = :MSB: .
 STY IACCL
 STX IACCM
 RTS
NOTGO BRK
 = &0A
 = "Bad ",TDIM
 BRK

This looks like the DIM fix talked about here:
http://beebwiki.mdfs.net/DIM_Basic432

If you comment this line out, then the generated binary matches Basic
4. So this effectively is the source to Basic 4.

Acknowledgements:
=================

Many thanks to Paul Fellows (ex Acornsoft) for discovering these
long-lost sources and making them available to the Acorn community.

About

Original Source Code for the Acorn Cmos Basic (version 4) (in MASM format)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages