This programming language may be used to instruct a computer to perform a task.
|Execution method:||Compiled (machine code)|
|Parameter passing methods:||By value|
If you know Cowgol, please write code for some of the tasks not implemented in Cowgol.
Cowgol is a procedural, imperative, stackless programming language with Ada-style syntax, meant for use on very small systems such as 8-bit micros. Cowgol is also the name of the premier (and so far only) implementation, which is itself written in Cowgol and self-hosting, and which is small enough to run on several 8-bit micros. Cowgol was developed by David Given.
Because most of the processors Cowgol targets do not support stack frames efficiently, Cowgol was designed not to use them. Instead, every variable in the program is statically assigned a single location in memory. (The official implementation overlaps variables it can prove aren't in scope at the same time.) Recursion is forbidden.
Aside from this, Cowgol has most of the features one would expect of a modern-ish procedural language. Cowgol has strict type checking, type aliases, records with inheritance, and arbitarily nested subroutines. Cowgol also has system programming features such as pointers and inline assembly, and it allows the programmer to explicitly define the layout in memory of a record.
Cowgol currently supports MS-DOS (on the 8086), CP/M (on the 8080 and Z80), the BBC Micro (6502), as well as others; modern Linux (x86 or PowerPC) is also supported. The Cowgol compiler is written to make it easy to add other back-ends.
Pages in category "Cowgol"
The following 145 pages are in this category, out of 145 total.
- Nested function
- Numbers divisible by their individual digits, but not by the product of their digits.
- Numbers in base 10 that are palindromic in bases 2, 4, and 16
- Numbers in base-16 representation that cannot be written with decimal digits
- Numbers which binary and ternary digit sum are prime
- Numbers with equal rises and falls
- Numbers with same digit set in base 10 and base 16
- Sequence: smallest number with exactly n divisors
- Shoelace formula for polygonal area
- Show ASCII table
- Sierpinski triangle
- Sieve of Eratosthenes
- Smallest square that begins with n
- Smith numbers
- Sort three variables
- Sorting algorithms/Bubble sort
- Sorting algorithms/Quicksort
- Special divisors
- Split a character string based on change of character
- Square but not cube
- Stern-Brocot sequence
- Strange numbers
- Strange plus numbers
- Sum digits of an integer
- Sum multiples of 3 and 5
- Sum of divisors
- Sum of first n cubes
- Sum of squares
- Sum of the digits of n is substring of n