Skip to content

Two languages, one alphabet

You can read English. That is enough to start. This site teaches Assembly and Fortran as two real languages, with words, grammar and sentences. A small retro game, playable in this browser, is the goal at the end.

Start here →

A side: speed = speed + boost
mov ax, [speed]
add ax, [boost]
mov [speed], ax
B side: speed = speed + boost
speed = speed + boost

The lens: parts of speech

Each language has verbs, nouns, adjectives and idioms, as English has. The numbers show how many words of each part are in our A-side and B-side dictionaries.

Part of speechA side: AssemblyB side: Fortran
Verb
An action word.
An instruction: one step that the processor does, for example MOV or ADD. 51 wordsA statement that does something, for example PRINT, CALL or ALLOCATE. 17 words
Noun
A thing with a name.
A register, a flag, a port or a place in memory, for example AX. 23 wordsA kind of value (a type), for example INTEGER or REAL. 6 words
Adjective
A word that describes a noun.
A size word, for example BYTE (8 bits) or WORD (16 bits). 2 wordsAn attribute, for example ALLOCATABLE or PARAMETER. 15 words
Adverb
A word that changes how a verb acts.
A prefix, for example REP: do the next verb again, CX times. 1 wordsA word that changes a loop, for example CONCURRENT in DO CONCURRENT. 1 words
Idiom
A ready-made phrase with a fixed meaning.
A BIOS or DOS service call, for example INT 21h with AH=09h: show a line of text. 7 wordsA built-in function or subroutine, for example SQRT or MATMUL. 32 words
Grammar mark
Punctuation and signs that join words into a sentence.
Commas between operands, [square brackets] for memory, a colon after a label. 5 wordsMaths signs (+ - * / **), the = sign, and (:) for part of an array. 18 words
Note to the translator
A word for the translator only. The processor never sees it.
An assembler directive, for example ORG, DB or %macro. 12 wordsA structure word, for example PROGRAM, MODULE or CONTAINS. 10 words

The segments

A segment is one job that a language must be able to say. Each segment has an A page and a B page.

Keeping values
How do you tell the machine to remember a number?
Doing arithmetic
How do you tell the machine to calculate?
Making choices and repeating
How do you say "if" and "again"?
Working with many values
How do you do one thing to a long list of values?
Organizing a program
How do you divide a long text into parts with names?
Showing text and reading keys
How does the program talk to the person at the keyboard?
Controlling the hardware
How do you talk to the screen, the keyboard chip and the clock directly?

More