Family BASIC

Family BASIC is an accessory for the Family Computer (Famicom) created by Hudson Soft and Sharp Corporation. It allowed users to create programs in the BASIC programming language. This accessory came with a special designed cartridge, keyboard, and the Data Recorder, similar in function to that of a Commodore computer of that era.

The keyboard plugs into a 15-pin expansion port on the front of the Famicom and the Data Recorder plugs into the back of the keyboard labeled SAVE and LOAD. If one does not have the Data Recorder or spare cassette tape (or finds cassette tape technology too inconvenient), one can just use the microphone and headphone jacks of a computer or similar device to record the analog signal coming from the keyboard with their preferred audio recording program and then play it back when the game is requesting data to be loaded.

Three games are compatible with the Data Recorder:
 * Excitebike
 * Mach Rider
 * Wrecking Crew

This accessory features the cameo appearances of Mario and Pauline when the Family BASIC cartridge is being played.

Features
Family BASIC was developed in cooperation with Hudson Soft and is similar to the BASIC that Hudson had developed for the Sharp MZ81 personal computer. Its command set is derived from Microsoft BASIC.

Variables
Family BASIC supports two variable types, string and numeric. Numeric variables and constants are integer-only, as such the allowed range is -32767 to +32768 and floating point calculations are not supported. Variable names are alphanumeric and significant only to two characters. The only provided mathematical functions are ABS and SGN; however, Family BASIC also supports the MOD (modulus) operator for division. The SWAP statement is also provided to exchange the contents of two variables. String variables and arrays work as in Microsoft BASIC.

Input/output
The INPUT, PRINT, and LINPUT (LINE INPUT) statements are included for getting data and displaying it, these work as in Microsoft BASIC. The STICK and STRIG functions are used to read the game pads. The CLEAR statement can be used to reserve a piece of memory for machine language routines which are executed via the CALL statement.

Graphics and sound
Several commands are provided for defining sprites, moving them around, and defining background graphics. These include the SPRITE, DEF SPRITE, and MOVE statements. The PLAY statement can be used to play a sequence of musical notes.

Version 3 of Family BASIC adds a number of new features including commands for collision detection, error trapping, program editing, and the INSTR function for string handling.