XXIIVV
Acorn BBC Micro Logo on Famicom picture
14F06 — Acorn BBC Micro Logo on Famicom

A collection of notes on programming languages.

We use software because we have goals to achieve and things to do. The software we use is coded by programmers who have their own goals, sometimes these goals overlap with ours, over time these will diverge. The tools we depend on grow features we don't use or understand, introducing bugs that will prevent us from reaching our goals.

We have the choice of trying to understand the code and fix it, we have the choice of trying another program, and we have the choice of coding the software ourselves. All but the last path mean endless seeking, evaluating and further deviation from our goals.

code it yourself manifesto

Software freedom is the freedom to run the program as you wish, for any purpose, to study how the program works, and change it, to redistribute copies and your modified versions so you can help others.

 

assembly

6502 Assembly is the language used to program the Famicom, BBC Micro and Commodore 64 computers.

Assembly is any low-level programming language in which there is a very strong correspondence between the instructions in the language and the architecture's machine code instructions. An assembler translates the assembly language syntax into their numerical equivalents.

 
—Валерия, Красная палатка

This page focuses on the assembly language for the 6502 processor, targetting the Famicom. Prior to learning assembly, I would recommend learning the basics of binary numbers. To explore a system with minimal instructions set, try the Gyo virtual machine. To see a simple example of a complete 6502 assembly project, see Spacetime.

 

forth

Forth is a programming language that uses two stacks and a dictionary of words.

A Forth environment combines the compiler with an interactive shell, where the user defines and runs subroutines called words. Words can be tested, redefined, and debugged as the source is entered without recompiling or restarting the whole program.

Forth programmers enjoy the immediacy of an interpreter while at the same time the performance and efficiency of a compiler. Forth is used in space applications such as the Philae spacecraft.

 
—Forth Programming Aesthetics

I use a custom version of the lbforth.c REPL, modified to work on Plan9 ARM which can be downloaded here. To experiment with a subset of Forth in the terminal, have a look at Firth, for a graphical exploration try Postscript which also follows the Reverse Polish Notation.

scheme

Scheme is a minimalist dialect of the Lisp family consisting of a small core for language extension.

Scheme follows the “Prefix Notation”, where operations use the format (* 5 5) instead of (5 * 5). For example, if we wanted to add a lot of numbers together, we conventionally do 2 + 3 + 4 + 6 + 11, in Scheme we would instead write (+ 2 3 4 6 11), which is much more concise.

pascal

Pascal is an imperative and procedural programming language designed for teaching students structured programming.

My main interest in the language is building little macintosh applications such as graf3dscene, and exploring the THINK Pascal 4.0.2 environment. I have saved many example files in the Macintosh Cookbook repository.

THINK Pascal is a development system for the Macintosh, released by Think Technologies in 1986 as Lightspeed Pascal. Think Technologies was bought by Symantec, and the name was changed to Think Pascal. The last official update came 1992, and the product was officially discontinued in 1997.

ansi c

C is the native language of Unix. It has come to dominate systems programming in the computer industry.

Work on the first official C standard began in 1983. The major functional additions to the language were settled by the end of 1986, at which point it became common for programmers to distinguish between "K&R C" and ANSI C.

One good reason to learn C, even if your programming needs are satisfied by a higher-level language, is that it can help you learn to think at hardware-architecture level. For notes specific to the Plan9's C compiler, see Plan9 C.

postscript

Postscript is a programming language that was designed to specify the layout of the printed page.

The Postscript language uses a postfix syntax similar to Forth. The Dotgrid language was designed to be a subset of the Postscript toolkit.

hypertalk

Hypertalk is the programming language used in the mac software Hypercard.

Hypertalk can be emulated easily using a Macintosh emulator, the default Hypercard canvas size is 512x342.

For most basic operations including mathematical computations, HyperTalk favored natural-language ordering of predicates over the ordering used in mathematical notation. For example, in HyperTalk's put assignment command, the variable was placed at the end of the statement:

put 5 * 4 into theResult

unix

Unix is a family of computer operating systems that derive from the original Unix from Bell Labs.

This is the Unix philosophy: Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface.

Expect the output of every program to become the input to another, as yet unknown, program. Don't clutter output with extraneous information. Avoid stringently columnar or binary input formats. Don't insist on interactive input.

jargon

incoming(2): language assembly

Last update on 14F06, edited 2 times. +4/9fh ----|-