This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program The_Revenge_of_the_Snafux_for_IBMs; | |
uses crt,graph; | |
type | |
what = (play,enem,bloc,empt); | |
loc = record bx,by : integer end; | |
var | |
gr,gd,x,y,px,py,opy,opx,ex,ey,oex,oey,lvl,dif : integer; | |
killed,win,quit : boolean; | |
grid : array[0..29,0..15] of what; | |
blok : array[1..100] of loc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Wires, Electron Tails, and Heads. | |
W.E.T.H. | |
A cellular automaton written in response to an article | |
in the Computer Recreation section of Scientific American. | |
Cellular automatons are rule based systems which include | |
the now famous game of LIFE, and its ancestors. | |
In WETH there are four different types of cells. | |
Electron Head |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* M I C . H | |
Header file for the type declarations used in the various | |
MIC??? programs. */ | |
/* defines for accessing the registers with these names. */ | |
#define PC 0 | |
#define AC 1 | |
#define SP 2 | |
#define IR 3 | |
#define TIR 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;-----------------------------------------------------------------------; | |
; XLAT and XLATB ; | |
; What are they? ; | |
;-----------------------------------------------------------------------; | |
.MODEL SMALL | |
.STACK ; Allocate space for a stack, 1K | |
.DATA | |
DIGIT_TABLE DB '0123456789ABCDEF' ; Hex digit table | |
JUMP_TABLE DB 1 ; Table of jumps, array of pointers | |
DB 9 ; They folow the sequence |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ARC File Viewer */ | |
#include <stdio.h> | |
/* The header portion of an ARChive file is as follows. */ | |
typedef struct { | |
char headerflag; /* This flag is always 0x1a. */ | |
char compresstype; /* In range 1..9 identifies the compression type. */ | |
char filename[13]; /* ASCIIZ format for the filename. */ | |
long int cfilesize; /* The compressed file's size. */ | |
unsigned day : 5; /* Day of creation. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* A "window" unit in C. */ | |
#include <stdio.h> | |
#include <conio.h> | |
#include <string.h> | |
#define HOME 1,1,80,25 | |
#define MAX_WIN 10 | |
#define ACTIVATE 219 | |
#define SINGLE 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* analyze the FAT */ | |
#include <stdio.h> | |
#include <dos.h> | |
#include <ctype.h> | |
#define ReadOnly 0x01 | |
#define Hidden 0x02 | |
#define System 0x04 | |
#define Volume 0x08 | |
#define Directory 0x10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <math.h> | |
#include <gl.h> | |
#include <device.h> | |
#define GRAVITY (double)(978.032) /* centimeters/second^2 */ | |
#define PI (double)(3.141592653589) /* good enough approximation */ | |
#define DELTAT (double)(0.00025) /* a very small delta time */ | |
#define PRECISION (double)(0.00001) /* some level of precision */ | |
/* a macro used to calculate the volume of a sphere given its diameter. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Statistics | |
*/ | |
#include <stdio.h> | |
#include <math.h> | |
#include "statisti.h" | |
main(argc,argv) | |
int argc; | |
char *argv[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Wolfram One-Dimensional Cellular Automata | |
Fast | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include "graphics.h" | |
#include "conio.h" |
OlderNewer