EhBASIC requirements

Minimum requirements

  • 6502 processor.
  • 10k ROM or RAM for the interpreter code.
  • 1K of RAM from $0000.
  • RS232 I/O.

Preferred requirements

  • 6502 or better processor (65c02, CCU3000, M38xx).
  • 10k ROM or RAM for the interpreter code.
  • RAM from $0000 to $BFFF (more with changes).
  • Any character based I/O (e.g. RS232, LCD/keyboard etc).

Update EhBASIC

New Version 2.xx is here!…

7th April 2005.

Lots of changes, some small, some large. How BASIC handles functions internally has changed significantly with some major advantages for me, the code is far more easy to manage, and speed advantages for the user, about seventy cycles per value fetched. This doesn’t sound a lot but means about 140 cycles saved for any function that requires a value, and that’s most of them.

The RND() function has been changed and now uses the Galois method to generate the sequence and, as a consequence, this series has now been extended to a maximal length 32 bit series. This is about as good as any 32 bit pseudo ramdom generator can get without using more bits, or more time, and quite a lot of work went into addressing the shortcommings of other generators. It is no co-incidence that this generator now generates exactly the same sequence of numbers as that used in the 680×0 version of EhBASIC.

Some undocumented features were removed and the USR() function has been changed slightly.

Included with the source for EhBASIC is a minimal monitor to allow you to run EhBASIC on Michal Kowalski’s 6502 simulator. This also serves as an example of the minimal support code needed to run EhBASIC on other systems.

Version number is now 2.09 (2009), 2.22 (2013)

Has it really been nearly a year since the last update? Doesn’t seem like it. Most of this time has been taken with developing EhBASIC for the Mitsubishi 740 family, a 65C02 compatable cored microcontroller, and a port for the 680×0 processor. As it’s been so long a couple of version numbers have been skipped, these were never released.

The biggest change is that all keyword handling is now done with a dictionary instead of a simple list. The advantage to this is that line parsing and listing are much faster, in some cases nearly 100 times faster, and changes to keywords are now easier to do.

Another change is the way the FOR … NEXT loop operates internally. It no longer looks for current loops with the same loop variable when a FOR is executed. The advantage is faster code in a lot of places, the disadvantage is that if you jump out of a loop the stack space is never recovered. Since that’s a no-no anyway I’ve chosen to leave it like that.

Finally EhBASIC now announces the version number at startup. Any other changes are minor and are to improve speed, function or size.

Version number is now 1.10

25th July 2002.
Just a small update. The addresses where values for HEX$() or BIN$() have been changed. This frees up two bytes in page zero and is this …

nums_1		= $E0		; number to bin/hex string convert MSB
nums_2		= nums_1+1	; number to bin/hex string convert
nums_3		= nums_1+2	; number to bin/hex string convert LSB

… becomes …

nums_1		= Itempl	; number to bin/hex string convert MSB
nums_2		= nums_1+1	; number to bin/hex string convert
nums_3		= nums_1+2	; number to bin/hex string convert LSB

This is done in version 1.05
8th July 2002.
This is a re-write of the BIN$()and HEX$() functions. This frees up 8 bytes from page zero as well as being a little quicker. The downside is code length which is up slightly to 9600 bytes ($2580 bytes).

Examples of the speed increase are ..

Cycle times for HEX$(57005) and BIN$(57005)
Function Before After Saving
HEX$() 686 cycles 465 cycles 221 cycles (110uS @ 2MHz – 32%)
BIN$() 1700 cycles 1079 cycles 621 cycles (310uS @ 2MHz – 37%)

The other change is that both binary and Motorola hex versions are also available for download.

post

Enhanced 6502 BASIC

Enhanced BASIC is a BASIC interpreter for the 6502 and compatible microprocessors. It is constructed to be quick and powerful and easily ported to most 6502 systems. It requires few resources to run and includes instructions to facilitate easy low level handling of hardware devices. It also retains most of the powerful high level instructions from similar BASICs.

EhBASIC represents hundreds of hours work over nearly three years, lots of frustration, lots of joy and the occasional twinge from RSI induced tendonitis.

EhBASIC is free but not copyright free. For non commercial use there is only one restriction, any derivative work should include, in any binary image distributed, the string “Derived from EhBASIC” and in any distribution that includes human readable files a file that includes the above string in a human readable form e.g. not as a comment in

With the change to v2.xx a lot of the details for the use and internal working of EhBASIC have changed!

post

Mitsubishi 740 boards

The SuprDupr and SuprChip V are controller boards from DIVA Automation based on the Mitsubishi 38067 microcontroller (740 series family).

This chip is 6502 based and includes a host of onboard I/O, timers and even A to D and D to A convertors.

Software

  • Enhanced BASIC interpreter EhBASIC74
  • Port driver for the AT keyboard
  • Port driver for the LCD
  • For the SuprChip V an 8 Bit ISA bus slot
  • For the SuprChip V a network interface

SYM-1 BASIC – more nostalgia

The SYM 1 is a 6502 based SBC and was the ‘big brother’ to the KIM 1. Largely backward compatible with the KIM-1 it offered more memory, a faster tape interface, more ports etc.

SYM BASIC
This came later and is a full featured floating point BASIC with strings and arrays. It didn’t use the built in keypad and LED display but was run from an RS232 terminal device.

The version presented here is V1.1. This version did not have built in SIN(), COS(),TAN() or ATN() but did have the hooks for them to be added by an expansion ROM. These missing trig functions were common in early BASICs and manny still had the string “WANT SIN/COS/TAN/ATN”, or something similar, embedded in them long after these functions were external.

Available here is a binary image of the V1.1 8k ROM (V1.0 was allegedly in two 4k ROMs) and a fully (almost, some bits I never finished) commented disassembled listing that assembles back into that ROM using Tass 1.31.

post

The Computerist

http://retro.hansotten.nl/6502-sbc/the-computerist/

post

The Computerist Hardware

The Computerist was a company founded by Robert M. Tripp.

  • Distributor of software like  Microchess, this is where my copy originated from (via Ing Bureau Koopmans in The Netherlands).
  • MICRO: the 6502 Journal was a 6502 dedicated magazine published by Robert M. Tripp.
  • Producer of hardware like the PLUS series
  • Software like the PLEASE package

On this page information on the PLUS hardware for KIM-1, AIM 65, SYM-1.. Updated April 2022 with contributions by Friedrich Hofmann.

Memory PLus van Dirk Dral, met 8K Basic in EPROM.

MICRO the 6502 Journal

Archive of the magazine Micro here.

From apple2history.org description of MICRO 6502 Journal:
Robert M. Tripp got his start with computers in 1960 as an undergraduate in an unrelated field. He found the computer programming so interesting that he became a programmer in 1969, and started with the 6502 microprocessor in 1976, initially with the KIM-1 trainer sold by MOS Technology. He started a business, “The COMPUTERIST”, and sold the KIM-1 computers, as well as software and accessories for it. He started a magazine under the umbrella of his business, and named it Micro. It began publication in October of 1977, and was released on a bimonthly basis initially, going monthly in February of 1979. The first three issues were printed using his KIM-1 and he did the paste-up for the magazine on his kitchen table. He later began to use a local publishing company to create the magazine. By early 1980 the publisher name had changed to MICRO-INK, Inc.

The magazine covered the 6502 microprocessor (and later the 6809) in all the various computers that used it, including the KIM-1, the AIM-65, the C1P, the Commodore PET, the Ohio Scientific, the Atari 800, and, of course, the Apple II. It was an excellent source for machine level code for the 6502, eventually including more and more articles that applied specifically to the Apple II. Ultimately, about half of the articles in each issue dealt with the Apple II.

Many general-purpose machine language articles appeared in its pages, such as “Improved nth Precision” (code optimization for the 6502), “Precision Programming”, and “Computer Assisted Translation Of Programs From 6502 to 6809″. They also carried do-it-yourself hardware articles, such as “C1P To Epson MX-80 Printer Interface”, “PET/CBM IEEE 448 To Parallel Printer Interface”, and “Apple II Digital Storage Oscilloscope”.

PLEASE Package

PLEASE is a very small package for a standard KIM-1. It has a tiny monitor, command interpreter and many handy subroutines.

PLEASE INSTRUCTIONS
PLEASE LISTING

Hardware by The Computerist

The Computerist, led by Robert Tripp, not only sold software like MicroChess,  published the Micro Magazine, also designed and sold hardware and software.

The Dutch company, Ing. Bureau Koopmans (a one man company, active in the early years with KIM-1, OSI Scientific and such) represented The Computerist in the Netherlands, and he showed me in 1979 some of the Plus hardware series for the KIM-1, SYM-1 and AIM-65 systems:
– MEMORY PLUS: 8K RAM, 8K ROM, VIA 6522, 2716 EPROM programmer
– Proto Plus, a DIY board
– VIDEO PLUS, a glass teletype video card

I did a review of the Memory Plus in May 1979, see also the dutch magazine Radio Bulletin page.

PLUS Hardware

A range of hardware was developed and sold by the Computerist, under the brandname PLUS.

 

 

Motherboard Plus

A backplane for KIM-1/SYM-1/AIM 65. Accepts the Plus boards described below.

Memory Plus

The MEMORY PLUS board is a RAM/ROM expansion board for  KIM-1, SYM-1 or AIM65. Made by the The Computerist.

With up to 8k of RAM, 8k of (EP)ROM and the ability to program EPROMs (2716) this was quite the must have upgrade for anyone who could afford it.

Here The Manual in HTML format, original OCRed by Lee Davison, corrected and enhanced with Appendix A Circuit Diagram and Application Note #1 by Hans Otten.

Scanned by Dirk Dral, high quality scan.

And here the MEMORY PLUS manual in PDF format, Appendix A, the circuit diagrams  foldout Application Note #1 is now included, added by Hans Otten.

How to decode the 8K RAM in 4K space, an article from Micro July 1979, for AIM 65 and SYM-1 

Video Plus

VIDEO PLUS is designed to work with the KIM-1, SYM-1 and the AIM 65 computers. It offers:

  • Up to 4K  display RAM and 2K Programmable Character generator
  • 2K EPROM
  • 6845 CRT controller
  • ASCII keyboard interface
  • Composite monochrome video PAL or NTSC

The following documents are available:

Video PLUS II

Video PLUS II is an updated Video PLUS, a Versatiel Video Expansion Board, with:

  • Programmable Screen format
  • PRogrammable Character Generator
  • Uo to 4K Display Memeory
  • Supports ASCII Keyboard
  • Stand-Alone Option
  • AIM/SYM/KIM Software
  • 6845 video controller, 6522 VIA, RS232

The following documents are available:

PROTO PLUS II

The PROTO PLUS II is a board to interface digital logic to a KIM-1, SYM-1 or AIM 65. A large breadboard area is available.

The board has the standard KIM-1 44 pin edge connector. A power regulator for 8V to + 5V is on the board.

The board has  address, data bus and signal bus buffering and address decoding for tom select a 8K page in memory and kIM-1 8K decoding. 3 gates of a 74LS32 is available for general use.

Here the PROTO PLUS II manual, with circuit diagram.

 

 

DRAM Plus

DRAM Plus is a Multi-purpose Expansion Board for AIM 65/SYM-1/KIM-1 with

  • 16/32K dynamic RAM
  • 8/16K EPROM 2716/2516/2732/2532/2332
  • I/O Ports and Timers VIA 2x 6522
  • Prototyping Area
  • EPROM Programmer

DRAM PLUS manual, includes circuit diagram and software

 

 

K-1002 8 bits DAC
An 8 bits DAC. For the PET userport, easily adapted for other 6502 systems.
Hardware K-1002 manual includes circuit diagram

Files for the VIDEO and PROTO PLUS: Thanks to Dave Colglazier at Original Woodworks.

Video PLUS II and DRAM PLUS: thanks to Friedrich Hofmann

K-1008

http://www.6502.org/users/sjgray/projects/microuk101/

PBC for the UK101 project by Grant Searle.

post

OSI 300 page restored

Somehow during the migration I managed to loose the OSI Model 300 trainer page.

Restored and with some additions!

 

Micro-KIM

The Micro-KIM is a SBC designed and built by Vince Briel. First sold in 2007 and alas not available anymore.

Update 2025: Vince Briel has released all design documents on his Retrotink website.
I have duplicated the contents below.

Based upon the ideas of Ruud Baltissen how to replace the 6530 with a 6532, it was the first KIM-1 clone that was running the unmodified KIM-1 ROM.

Manuals, circuit diagrams, single step fix, tape devices, support Cd images
Photos
Videos


Specifications

  • 6502 CPU running at 1Mhz
  • 2K EPROM replacing built in ROM on 6530s
  • 5K RAM using the KIM-1 memory map
  • RS232 interface made to work with TIM built in KIM-1
  • Single-Step mode for debugging
  • debounced RESET and STEP switches
  • 40 pin header for future expansion
  • Expansion board for expansion connector with four slots available
  • 32K RAM card
  • Second 6532 board
  • The I/O of the 6 digit display and keyboard are memory mapped exactly like the KIM-1 for full program compatibility

See the KIM-1 page for more KIM-1 info and programs.

First impressions

  • It really feels like a KIM-1. Smaller, but just as simple to operate. Easy to connect a serial RS232 (USB) cable and connect to a terminal program. Minicom on Linux, Realterm on Windows e.g., no high demands on terminal emulation, just plain simple teletype at 9600 baud or less and the ability to capture output to a textfile or send a text file via the terminal
  • No cassette port. This means the programs with real nostalgic value like the editor/assembler Micro Ade will not have much sense.
  • Second 6532 is an option(though the 6530-002 and 003 ROM is present!).
  • 32K RAM extension option. Yes, this makes the machine worthwhile! Now you can run KB9 Microsoft Basic or otehr KIM-1 software.
  • Some small mistakes are on the version 1 Rev 0 board, fixed in the later version rev 1, this needs three hardware fixes to be made, so I have to get the soldering iron into action. Simple fixes, see below.
  • Loading programs via the serial interface by sending a text file in papertape format is slow. But it works! Fun to test all those KIM-1 programs. KIMTAPE and KIMPAPER help a lot here also look at the 8 bit hex file conversion program there.

Tested programs

Most of the First Book of KIM programs work. Some require the presence of the second 6530 (6532 here).
See the KIM-1 software and manual pages. Also see the photos section for TinyBasic and KB 9 Basic.

See the PC utilities page for papertape and other conversion utilities.

Memory map

Micro-KIM KIM-1
$0000-$03FF 1024 Bytes of RAM $0000-$03FF 1024 Bytes of RAM
$0400-$07FF 1024 Bytes of RAM $0400-$07FF Optional Memory Area
$0800-$0BFF 1024 Bytes of RAM $0800-$0BFF Optional Memory Area
$0C00-$0FFF 1024 Bytes of RAM $0C00-$0CFF Optional Memory Area
$1000-$13FF 1024 Bytes of RAM $1000-$13FF Optional Memory Area
$1400-$16FF Optional Memory Area $1400-$16FF Optional Memory Area
$1700-$173F Optional 2nd 6532 I/O, Timer $1700-$173F 6530-002 I/O, Timer
$1740-$177F 6532 I/O and Timer $1740-$177F 6530-003 I/O, Timer
$1780-$17BF 64 Bytes RAM from 6532 $1780-$17BF 64 Bytes from 6530-003
$17C0-$17FF 64 Bytes RAM from 6532 * $17C0-$17FF 64 Bytes from 6530-002
$1800-$1BFF 1024 Bytes of EPROM $1800-$1BFF 1024 Bytes of ROM in 6530-003
$1C00-$1FFF 1024 Bytes of EPROM $1C00-$1FFF 1024 Bytes of ROM in 6530-002
$2000-$FFFF Unused memory $2000-$FFFF Unused memory or 32K RAM baord

* The 6532 has 128 bytes of RAM vs. only 64 bytes on the 6530. The Micro-KIM utilizes all 128 bytes from
the single onboard 6532 so all original memory locations are available.

Manuals, circuit diagrams, notes and support Cd images

Micro-KIM Design files, build your own Micro-KIM
Vince Briel has released all design documents on his Retrotink website.
Micro-KIM setup and Users Manual July 2007 Rev 0 Ed 1
Micro-KIM setup and Users Manual September 2007 Rev 1 Ed 2
Circuit diagram Micro-KIM rev 0, has serious errors
Circuit diagram Micro-KIM Rev 1
Support Cd contents Rev 0 July 2007
Support Cd contents Rev 1 September 2007
Fix for Micro-KIM Rev 0 for second 6532
Aart Bik’s programming the Micro-KIM, see also his KIM page

Extensions and audio interface solutions

65C02 Single step fix by Timali

My Micro-KIM shipped with a 65C02, and apparently there is a timing issue which prevents single-step from working with the 65C02. I tried an original NMOS 6502, and single-step worked ok with it, but not with any of my 65C02s. I did some debugging with my scope and determined that there is a small timing difference causing the SST signal to be erroneously asserted (pulled low) for 100-200 ns during EEPROM accesses with the 65C02, which is just enough to cause a problem. The easiest way I could think of to fix this was to delay the SYNC signal briefly with a small RC circuit, which prevents the glitch in the SST signal. I cut a trace on the back side of the board and added a small resistor and capacitor, and single-step is now working correctly with my 65C02’s. It still works with the original 6502, also. Click on the image to see a larger picture.

Photos

Tiny Basic

Microsoft Basic KB9



Videos















https://www.youtube.com/watch?v=R_zD5T_khKs