Home » Archimedes archive » Acorn User » AU 1994-09.adf » !Extras_Extras » c/Prog1

c/Prog1

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1994-09.adf » !Extras_Extras
Filename: c/Prog1
Read OK:
File size: 00FB bytes
Load address: 0000
Exec address: 0000
File contents
/* Program 1 */

main()
{                     /* Set up the variables used */
  int i,j;

  for(i=1; i<10; i++) /* Start the loop            */
  { j = j+i;          /* Only one instruction      */
  }                   /* End the loop              */
00000000  2f 2a 20 50 72 6f 67 72  61 6d 20 31 20 2a 2f 0a  |/* Program 1 */.|
00000010  0a 6d 61 69 6e 28 29 0a  7b 20 20 20 20 20 20 20  |.main().{       |
00000020  20 20 20 20 20 20 20 20  20 20 20 20 20 20 2f 2a  |              /*|
00000030  20 53 65 74 20 75 70 20  74 68 65 20 76 61 72 69  | Set up the vari|
00000040  61 62 6c 65 73 20 75 73  65 64 20 2a 2f 0a 20 20  |ables used */.  |
00000050  69 6e 74 20 69 2c 6a 3b  0a 0a 20 20 66 6f 72 28  |int i,j;..  for(|
00000060  69 3d 31 3b 20 69 3c 31  30 3b 20 69 2b 2b 29 20  |i=1; i<10; i++) |
00000070  2f 2a 20 53 74 61 72 74  20 74 68 65 20 6c 6f 6f  |/* Start the loo|
00000080  70 20 20 20 20 20 20 20  20 20 20 20 20 2a 2f 0a  |p            */.|
00000090  20 20 7b 20 6a 20 3d 20  6a 2b 69 3b 20 20 20 20  |  { j = j+i;    |
000000a0  20 20 20 20 20 20 2f 2a  20 4f 6e 6c 79 20 6f 6e  |      /* Only on|
000000b0  65 20 69 6e 73 74 72 75  63 74 69 6f 6e 20 20 20  |e instruction   |
000000c0  20 20 20 2a 2f 0a 20 20  7d 20 20 20 20 20 20 20  |   */.  }       |
000000d0  20 20 20 20 20 20 20 20  20 20 20 20 2f 2a 20 45  |            /* E|
000000e0  6e 64 20 74 68 65 20 6c  6f 6f 70 20 20 20 20 20  |nd the loop     |
000000f0  20 20 20 20 20 20 20 20  20 2a 2f                 |         */|
000000fb