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

c/Prog2

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/Prog2
Read OK:
File size: 0129 bytes
Load address: 0000
Exec address: 0000
File contents
/* Program 2 */
#include <stdio.h>

main()
{                           /* Set up the variables used */
  char i

  for(i=32; i<127; i++)      /* Start the loop            */
  { printf("%c",i);          /* Only one instruction      */
  }                          /* End the loop              */
}
00000000  2f 2a 20 50 72 6f 67 72  61 6d 20 32 20 2a 2f 0a  |/* Program 2 */.|
00000010  23 69 6e 63 6c 75 64 65  20 3c 73 74 64 69 6f 2e  |#include <stdio.|
00000020  68 3e 0a 0a 6d 61 69 6e  28 29 0a 7b 20 20 20 20  |h>..main().{    |
00000030  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000040  20 20 20 20 20 20 20 2f  2a 20 53 65 74 20 75 70  |       /* Set up|
00000050  20 74 68 65 20 76 61 72  69 61 62 6c 65 73 20 75  | the variables u|
00000060  73 65 64 20 2a 2f 0a 20  20 63 68 61 72 20 69 0a  |sed */.  char i.|
00000070  0a 20 20 66 6f 72 28 69  3d 33 32 3b 20 69 3c 31  |.  for(i=32; i<1|
00000080  32 37 3b 20 69 2b 2b 29  20 20 20 20 20 20 2f 2a  |27; i++)      /*|
00000090  20 53 74 61 72 74 20 74  68 65 20 6c 6f 6f 70 20  | Start the loop |
000000a0  20 20 20 20 20 20 20 20  20 20 20 2a 2f 0a 20 20  |           */.  |
000000b0  7b 20 70 72 69 6e 74 66  28 22 25 63 22 2c 69 29  |{ printf("%c",i)|
000000c0  3b 20 20 20 20 20 20 20  20 20 20 2f 2a 20 4f 6e  |;          /* On|
000000d0  6c 79 20 6f 6e 65 20 69  6e 73 74 72 75 63 74 69  |ly one instructi|
000000e0  6f 6e 20 20 20 20 20 20  2a 2f 0a 20 20 7d 20 20  |on      */.  }  |
000000f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000100  20 20 20 20 20 20 20 20  2f 2a 20 45 6e 64 20 74  |        /* End t|
00000110  68 65 20 6c 6f 6f 70 20  20 20 20 20 20 20 20 20  |he loop         |
00000120  20 20 20 20 20 2a 2f 0a  7d                       |     */.}|
00000129