<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.extremist.software/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=67.101.218.236</id>
	<title>Noisebridge - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.extremist.software/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=67.101.218.236"/>
	<link rel="alternate" type="text/html" href="https://wiki.extremist.software/wiki/Special:Contributions/67.101.218.236"/>
	<updated>2026-04-07T22:13:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.13</generator>
	<entry>
		<id>https://wiki.extremist.software/index.php?title=Linux101&amp;diff=26226</id>
		<title>Linux101</title>
		<link rel="alternate" type="text/html" href="https://wiki.extremist.software/index.php?title=Linux101&amp;diff=26226"/>
		<updated>2012-06-22T21:37:29Z</updated>

		<summary type="html">&lt;p&gt;67.101.218.236: /* Still Unsure? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:events]]&lt;br /&gt;
[[Image:101ascii.png|right|alt=&amp;quot;Got to Start Somewhere&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
==An Introduction to Linux==&lt;br /&gt;
We now offer a 101 class for anyone just getting into [[Linux]] for the first time!&lt;br /&gt;
No Experience Necessary, nor is it expected! &lt;br /&gt;
&lt;br /&gt;
* Learn how Linux is &#039;&#039;&#039;similar&#039;&#039;&#039; and &#039;&#039;&#039;different&#039;&#039;&#039; from Microsoft Windows and Macintosh OSX.&lt;br /&gt;
* Get hands-on experience using Linux and Open Source software on either your own, or our, computers!&lt;br /&gt;
* No software installation is necessary.&lt;br /&gt;
* All students and software will be given equal respect.&lt;br /&gt;
* &#039;&#039;&#039;No question is too stupid!&#039;&#039;&#039;&lt;br /&gt;
* We meet in the classroom reserved at the times &amp;amp; days listed.&lt;br /&gt;
* Full connectivity is available via wireless internet, hardwire internet, a projector, and whiteboards.&lt;br /&gt;
&lt;br /&gt;
We encourage &#039;&#039;&#039;new people of all user levels&#039;&#039;&#039; to join in.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Still Unsure?==&lt;br /&gt;
You most likely already use Open Source and Free Software without even knowing it.  [https://www.firefox.com Firefox], [https://developer.android.com Android],  and [https://www.libreoffice.org/ OpenOffice] are three very popular, commonly used Open Source applications.  Imagine if your entire computer could be run on that same level of free, high quality software  We&#039;ll show you how.&lt;br /&gt;
&lt;br /&gt;
==Meeting time and location==&lt;br /&gt;
===When===&lt;br /&gt;
When is this class? &lt;br /&gt;
On Tuesdays from 18:30 to 20:00&lt;br /&gt;
You are welcome to arrive early!&lt;br /&gt;
===Where===&lt;br /&gt;
At [[Getting Here|Noisebridge]],&lt;br /&gt;
in the [[Turing]] classroom.&lt;br /&gt;
===What===&lt;br /&gt;
For discussion and announcements, use the [https://www.noisebridge.net/wiki/Mailinglist Noisebridge-discuss]&lt;/div&gt;</summary>
		<author><name>67.101.218.236</name></author>
	</entry>
	<entry>
		<id>https://wiki.extremist.software/index.php?title=Linux101&amp;diff=26225</id>
		<title>Linux101</title>
		<link rel="alternate" type="text/html" href="https://wiki.extremist.software/index.php?title=Linux101&amp;diff=26225"/>
		<updated>2012-06-22T21:37:08Z</updated>

		<summary type="html">&lt;p&gt;67.101.218.236: /* Still Unsure? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:events]]&lt;br /&gt;
[[Image:101ascii.png|right|alt=&amp;quot;Got to Start Somewhere&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
==An Introduction to Linux==&lt;br /&gt;
We now offer a 101 class for anyone just getting into [[Linux]] for the first time!&lt;br /&gt;
No Experience Necessary, nor is it expected! &lt;br /&gt;
&lt;br /&gt;
* Learn how Linux is &#039;&#039;&#039;similar&#039;&#039;&#039; and &#039;&#039;&#039;different&#039;&#039;&#039; from Microsoft Windows and Macintosh OSX.&lt;br /&gt;
* Get hands-on experience using Linux and Open Source software on either your own, or our, computers!&lt;br /&gt;
* No software installation is necessary.&lt;br /&gt;
* All students and software will be given equal respect.&lt;br /&gt;
* &#039;&#039;&#039;No question is too stupid!&#039;&#039;&#039;&lt;br /&gt;
* We meet in the classroom reserved at the times &amp;amp; days listed.&lt;br /&gt;
* Full connectivity is available via wireless internet, hardwire internet, a projector, and whiteboards.&lt;br /&gt;
&lt;br /&gt;
We encourage &#039;&#039;&#039;new people of all user levels&#039;&#039;&#039; to join in.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Still Unsure?==&lt;br /&gt;
You most likely already use Open Source and Free Software without even knowing it.  [https://www.firefox.com Firefox], [https://developer.android.com Android],  and [https://www.libreoffice.org/ OpenOffice] are three very popular, commonly used Open Source applications  Imagine if your entire computer could be run on that same level of free, high quality software  We&#039;ll show you how.&lt;br /&gt;
&lt;br /&gt;
==Meeting time and location==&lt;br /&gt;
===When===&lt;br /&gt;
When is this class? &lt;br /&gt;
On Tuesdays from 18:30 to 20:00&lt;br /&gt;
You are welcome to arrive early!&lt;br /&gt;
===Where===&lt;br /&gt;
At [[Getting Here|Noisebridge]],&lt;br /&gt;
in the [[Turing]] classroom.&lt;br /&gt;
===What===&lt;br /&gt;
For discussion and announcements, use the [https://www.noisebridge.net/wiki/Mailinglist Noisebridge-discuss]&lt;/div&gt;</summary>
		<author><name>67.101.218.236</name></author>
	</entry>
	<entry>
		<id>https://wiki.extremist.software/index.php?title=Linux101&amp;diff=26224</id>
		<title>Linux101</title>
		<link rel="alternate" type="text/html" href="https://wiki.extremist.software/index.php?title=Linux101&amp;diff=26224"/>
		<updated>2012-06-22T21:36:33Z</updated>

		<summary type="html">&lt;p&gt;67.101.218.236: /* Still Unsure? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:events]]&lt;br /&gt;
[[Image:101ascii.png|right|alt=&amp;quot;Got to Start Somewhere&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
==An Introduction to Linux==&lt;br /&gt;
We now offer a 101 class for anyone just getting into [[Linux]] for the first time!&lt;br /&gt;
No Experience Necessary, nor is it expected! &lt;br /&gt;
&lt;br /&gt;
* Learn how Linux is &#039;&#039;&#039;similar&#039;&#039;&#039; and &#039;&#039;&#039;different&#039;&#039;&#039; from Microsoft Windows and Macintosh OSX.&lt;br /&gt;
* Get hands-on experience using Linux and Open Source software on either your own, or our, computers!&lt;br /&gt;
* No software installation is necessary.&lt;br /&gt;
* All students and software will be given equal respect.&lt;br /&gt;
* &#039;&#039;&#039;No question is too stupid!&#039;&#039;&#039;&lt;br /&gt;
* We meet in the classroom reserved at the times &amp;amp; days listed.&lt;br /&gt;
* Full connectivity is available via wireless internet, hardwire internet, a projector, and whiteboards.&lt;br /&gt;
&lt;br /&gt;
We encourage &#039;&#039;&#039;new people of all user levels&#039;&#039;&#039; to join in.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Still Unsure?==&lt;br /&gt;
You most likely already use Open Source and Free Software without even knowing it.  [https://www.firefox.com Firefox], [https://developer.android.com Android],  and [https://www.libreoffice.org/ OpenOffice] are two very popular, commonly used Open Source applications  Imagine if your entire computer could be run on that same level of free, high quality software  We&#039;ll show you how.&lt;br /&gt;
&lt;br /&gt;
==Meeting time and location==&lt;br /&gt;
===When===&lt;br /&gt;
When is this class? &lt;br /&gt;
On Tuesdays from 18:30 to 20:00&lt;br /&gt;
You are welcome to arrive early!&lt;br /&gt;
===Where===&lt;br /&gt;
At [[Getting Here|Noisebridge]],&lt;br /&gt;
in the [[Turing]] classroom.&lt;br /&gt;
===What===&lt;br /&gt;
For discussion and announcements, use the [https://www.noisebridge.net/wiki/Mailinglist Noisebridge-discuss]&lt;/div&gt;</summary>
		<author><name>67.101.218.236</name></author>
	</entry>
	<entry>
		<id>https://wiki.extremist.software/index.php?title=C_and_assembler_on_Linux&amp;diff=26223</id>
		<title>C and assembler on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.extremist.software/index.php?title=C_and_assembler_on_Linux&amp;diff=26223"/>
		<updated>2012-06-22T21:26:01Z</updated>

		<summary type="html">&lt;p&gt;67.101.218.236: Replaced content with &amp;#039;This is a page for the C and assembler on linux class, Tuesdays at 5:30 PM in Church.&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a page for the C and assembler on linux class, Tuesdays at 5:30 PM in Church.&lt;/div&gt;</summary>
		<author><name>67.101.218.236</name></author>
	</entry>
	<entry>
		<id>https://wiki.extremist.software/index.php?title=C_and_assembler_on_Linux&amp;diff=26222</id>
		<title>C and assembler on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.extremist.software/index.php?title=C_and_assembler_on_Linux&amp;diff=26222"/>
		<updated>2012-06-22T21:19:06Z</updated>

		<summary type="html">&lt;p&gt;67.101.218.236: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a page for the C and assembler on linux class, Tuesdays at 5:30 PM in Church.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a write up that covers the first half of&lt;br /&gt;
the first C on Linux class that I gave last Tuesday&lt;br /&gt;
20120619 in the Church classroom from 5:30 to 7 PM.&lt;br /&gt;
   I hope to write up the balance of last Tuesday&#039;s&lt;br /&gt;
class before the weekend&#039;s out.&lt;br /&gt;
   Note the To: list, please; if you know of anyone&lt;br /&gt;
who&#039;s missing, please let them and me know.&lt;br /&gt;
   Complaints, suggestions, sarcasms, all are welcome.&lt;br /&gt;
&lt;br /&gt;
jim&lt;br /&gt;
415 823 4590 my cellphone, call anytime&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Learning C programming on Linux&lt;br /&gt;
&lt;br /&gt;
* C programming language is a specification that defines keywords,&lt;br /&gt;
operators, and rules of syntax.&lt;br /&gt;
   This may sound stupidly obvious or useless knowledge, but you may,&lt;br /&gt;
if you really get into using C, find that it&#039;s a practical&lt;br /&gt;
concept--useful, intelligently obvious.&lt;br /&gt;
&lt;br /&gt;
* C compiler is a software program that implements the C specification:&lt;br /&gt;
parser, keywords, operators, syntax rules.&lt;br /&gt;
   The practical purpose of this idea is that there are different C&lt;br /&gt;
compilers for different machines and for different purposes. If you&#039;re&lt;br /&gt;
just starting to learn C, this idea will seem pretty nearly as useless&lt;br /&gt;
as the idea that C is a specification.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   The tools you use to write C programs include an editor and a C&lt;br /&gt;
compiler at minimum. There are a lot more tools available, such as&lt;br /&gt;
debuggers and profilers and more.&lt;br /&gt;
&lt;br /&gt;
   The process you follow is to use a text editor to write some ASCII&lt;br /&gt;
text that complies with the rules of the C language then use a C&lt;br /&gt;
compiler to read your ASCII file and create a new file that contains&lt;br /&gt;
executable machine code.&lt;br /&gt;
   Look for C compiler-generated error messages. If there are any, even&lt;br /&gt;
one, then the compiler does not make an executable file; you have to fix&lt;br /&gt;
all errors. You may see warning messages that indicate the compiler&lt;br /&gt;
found one or more things that are not perfect but let the compiler&lt;br /&gt;
continue. If you don&#039;t have too many warning messages, the compiler will&lt;br /&gt;
probably make the executable file.&lt;br /&gt;
   If you get an executable file, run it and see if it works as you&lt;br /&gt;
expect. If it does, you probably won&#039;t learn anything more from this&lt;br /&gt;
exercise. If it doesn&#039;t, you get to learn about runtime and logic&lt;br /&gt;
errors: you wrote a program that is correct according to the C language&lt;br /&gt;
but incorrect in terms of implementing what you hoped it would do.&lt;br /&gt;
&lt;br /&gt;
   The following commands exemplify the process using a bash shell:&lt;br /&gt;
$ vi myfile.c&lt;br /&gt;
$ gcc myfile.c&lt;br /&gt;
$ ls&lt;br /&gt;
a.out&lt;br /&gt;
$ chmod 755 a.out&lt;br /&gt;
$ ./a.out&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   You use a text editor such as vi to create a file of text that&lt;br /&gt;
conforms to the rules of the C specification.&lt;br /&gt;
&lt;br /&gt;
   You run the C compiler so that it reads what you wrote. The C&lt;br /&gt;
compiler sees your program file as an ASCII character stream that it&lt;br /&gt;
interprets as a token stream.&lt;br /&gt;
   So, what is a &amp;quot;token&amp;quot;? A token is one or more ASCII characters that&lt;br /&gt;
the compiler sees as a meaningful thing. To compare with the English&lt;br /&gt;
language, think of a token as a word or a word ending or punctuation or&lt;br /&gt;
some other element that&#039;s meaningful.&lt;br /&gt;
&lt;br /&gt;
   The C compiler is a software program that conforms to a particular&lt;br /&gt;
design: the design for interpreters and compilers. Generally, any&lt;br /&gt;
compiler or interpreter includes an input stage that parses the incoming&lt;br /&gt;
ASCII (token) stream and also has a set of keywords and operators that&lt;br /&gt;
are reserved ASCII character(s) and a set of rules that the compiler&lt;br /&gt;
applies to the tokens it reads.&lt;br /&gt;
   When the compiler begins, it sets itself to a neutral state, which&lt;br /&gt;
is to say that it will examine the first ASCII characters to verify that&lt;br /&gt;
it can parse it as a stream of tokens.&lt;br /&gt;
   When the compiler identifies the first token, it verifies that that&lt;br /&gt;
token is of a class that can be a first token and then resets its (the&lt;br /&gt;
compiler&#039;s) state so that the following token must be one of a limited&lt;br /&gt;
set of tokens. For example:&lt;br /&gt;
1+2&lt;br /&gt;
   The compiler reads the 1 and then the &#039;+&#039; character, at which point&lt;br /&gt;
it determines that it&lt;br /&gt;
has at least one valid token:1. The compiler continues reading and sees&lt;br /&gt;
the 2 and determines that it now has two tokens, 1 and &#039;+&#039;. The 1 token&lt;br /&gt;
is an integer type of data the value of which is 1. The &#039;+&#039; token,&lt;br /&gt;
because it occurs between the 1 and the 2 represents the addition&lt;br /&gt;
operator. The compiler continues reading to find only whitespace and&lt;br /&gt;
then is able to identify the ASCII stream as a set of three tokens--a&lt;br /&gt;
value, an operator, and a value--that together form an expression.&lt;br /&gt;
   An expression is at least one operand and zero or more operators&lt;br /&gt;
that must be resolved to a single value.&lt;br /&gt;
   The compiler resolves the expression 1+2 to be a single value of 3.&lt;br /&gt;
   If you know how to write a C program that is exactly 1+2 and nothing&lt;br /&gt;
else, it&#039;s very likely your compiler will generate an error message&lt;br /&gt;
(remember, a compiler implements the C programming language&lt;br /&gt;
specification, and does so in its own way--the C specification is&lt;br /&gt;
deliberately permissive in some aspects of implementation).&lt;br /&gt;
   If you get an error message, very likely it will be a complaint that&lt;br /&gt;
there&#039;s not a complete statement or there&#039;s a problem at the end of the&lt;br /&gt;
file or some such.&lt;br /&gt;
&lt;br /&gt;
   The C compiler is designed to read statements. A statement is a set&lt;br /&gt;
of valid tokens that follow the rules of the C programming language and&lt;br /&gt;
end with a statement termination character, which is the ; character.&lt;br /&gt;
   Try revising your program to read&lt;br /&gt;
1+2;&lt;br /&gt;
   The 1+2 is an expression: the C compiler sees 1 followed by +&lt;br /&gt;
followed by 2 and verifies that this is a valid sequence of tokens that&lt;br /&gt;
makes an expression. It interprets the ; character as a statement&lt;br /&gt;
terminator, which means the compiler creates the machine code for the&lt;br /&gt;
expression and resets itself to a neutral state, ready to read the next&lt;br /&gt;
statement (ASCII character stream of valid tokens).&lt;br /&gt;
   The compiler may compile the program with only warning messages. If&lt;br /&gt;
so, it will make a new file that is named a.out. It is not a loadable&lt;br /&gt;
program, nor is it executable. Very likely the entire contents is 3,&lt;br /&gt;
which means the compiler did the addition as it did the compiling. You&lt;br /&gt;
may think that the compiler would leave the 1+2 in the file as data and&lt;br /&gt;
machine instructions that the CPU runs to create the sum, 3. That the&lt;br /&gt;
compiler does the arithmetic before it is done is a matter of&lt;br /&gt;
optimization.&lt;br /&gt;
&lt;br /&gt;
   The C compiler generally runs in four different phases:&lt;br /&gt;
1 preprocessor&lt;br /&gt;
2 compiler&lt;br /&gt;
3 optimizer&lt;br /&gt;
4 linker&lt;br /&gt;
&lt;br /&gt;
   Consider the program:&lt;br /&gt;
1+2;&lt;br /&gt;
   The preprocessor runs and sees nothing to do.&lt;br /&gt;
   The compiler runs and translates the ASCII to data and machine code,&lt;br /&gt;
which properly is a set of 1 bits and 0 bits that represent integer 1,&lt;br /&gt;
integer 2, and the operation of addition.&lt;br /&gt;
   The optimizer recognizes that this expression can be resolved now&lt;br /&gt;
without doing any harm to any other parts of the program, so the&lt;br /&gt;
optimizer replaces the code with the integer value of 3.&lt;br /&gt;
   The linker runs and does nothing: there is no code to which to link&lt;br /&gt;
this module.&lt;br /&gt;
&lt;br /&gt;
   Consider the following program:&lt;br /&gt;
1+2&lt;br /&gt;
3 + 4 ;&lt;br /&gt;
   How many statements do you see? How many expressions? How many&lt;br /&gt;
tokens?&lt;br /&gt;
&lt;br /&gt;
   There is a single statement that has two expressions and a total of&lt;br /&gt;
seven tokens: 1, +, 2, 3, +, 4, and ; (we&#039;re not counting the space&lt;br /&gt;
characters or the newline characters).&lt;br /&gt;
   Note that the C compiler sees 1+2 and 3 + 4 identically: two&lt;br /&gt;
expressions that add two integer values together. Very likely the&lt;br /&gt;
resulting program will effectively be 3 7 after the optimizer pass does&lt;br /&gt;
its thing.&lt;br /&gt;
   Note that the 3 and the 7 are there in the program but the program&lt;br /&gt;
does nothing with them.&lt;br /&gt;
   Now it may be that the optimizer of your compiler detects that there&lt;br /&gt;
are no machine operations for the CPU and the optimizer might eliminate&lt;br /&gt;
the data itself. I doubt it, as it&#039;s possible that you may want to make&lt;br /&gt;
a file that contains only data and link it to one or more other programs&lt;br /&gt;
that you&#039;ll write at some time.&lt;br /&gt;
&lt;br /&gt;
   The discussion so far includes the terms ASCII stream, token stream,&lt;br /&gt;
values, operands, operators, expressions, statements, and the four&lt;br /&gt;
compiler passes: preprocessor, compiler, optimizer, and linker.&lt;/div&gt;</summary>
		<author><name>67.101.218.236</name></author>
	</entry>
	<entry>
		<id>https://wiki.extremist.software/index.php?title=C_and_assembler_on_Linux&amp;diff=26221</id>
		<title>C and assembler on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.extremist.software/index.php?title=C_and_assembler_on_Linux&amp;diff=26221"/>
		<updated>2012-06-22T21:17:34Z</updated>

		<summary type="html">&lt;p&gt;67.101.218.236: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a page for the C and assembler on linux class, Tuesdays at 5:30 PM in Church.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Here&#039;s a write up that covers the first half of&lt;br /&gt;
the first C on Linux class that I gave last Tuesday&lt;br /&gt;
20120619 in the Church classroom from 5:30 to 7 PM.&#039;&#039;&#039;&#039;&#039;Italic text&#039;&#039;&lt;br /&gt;
   I hope to write up the balance of last Tuesday&#039;s&lt;br /&gt;
class before the weekend&#039;s out.&lt;br /&gt;
   Note the To: list, please; if you know of anyone&lt;br /&gt;
who&#039;s missing, please let them and me know.&lt;br /&gt;
   Complaints, suggestions, sarcasms, all are welcome.&lt;br /&gt;
&lt;br /&gt;
jim&lt;br /&gt;
415 823 4590 my cellphone, call anytime&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Learning C programming on Linux&lt;br /&gt;
&lt;br /&gt;
* C programming language is a specification that defines keywords,&lt;br /&gt;
operators, and rules of syntax.&lt;br /&gt;
   This may sound stupidly obvious or useless knowledge, but you may,&lt;br /&gt;
if you really get into using C, find that it&#039;s a practical&lt;br /&gt;
concept--useful, intelligently obvious.&lt;br /&gt;
&lt;br /&gt;
* C compiler is a software program that implements the C specification:&lt;br /&gt;
parser, keywords, operators, syntax rules.&lt;br /&gt;
   The practical purpose of this idea is that there are different C&lt;br /&gt;
compilers for different machines and for different purposes. If you&#039;re&lt;br /&gt;
just starting to learn C, this idea will seem pretty nearly as useless&lt;br /&gt;
as the idea that C is a specification.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   The tools you use to write C programs include an editor and a C&lt;br /&gt;
compiler at minimum. There are a lot more tools available, such as&lt;br /&gt;
debuggers and profilers and more.&lt;br /&gt;
&lt;br /&gt;
   The process you follow is to use a text editor to write some ASCII&lt;br /&gt;
text that complies with the rules of the C language then use a C&lt;br /&gt;
compiler to read your ASCII file and create a new file that contains&lt;br /&gt;
executable machine code.&lt;br /&gt;
   Look for C compiler-generated error messages. If there are any, even&lt;br /&gt;
one, then the compiler does not make an executable file; you have to fix&lt;br /&gt;
all errors. You may see warning messages that indicate the compiler&lt;br /&gt;
found one or more things that are not perfect but let the compiler&lt;br /&gt;
continue. If you don&#039;t have too many warning messages, the compiler will&lt;br /&gt;
probably make the executable file.&lt;br /&gt;
   If you get an executable file, run it and see if it works as you&lt;br /&gt;
expect. If it does, you probably won&#039;t learn anything more from this&lt;br /&gt;
exercise. If it doesn&#039;t, you get to learn about runtime and logic&lt;br /&gt;
errors: you wrote a program that is correct according to the C language&lt;br /&gt;
but incorrect in terms of implementing what you hoped it would do.&lt;br /&gt;
&lt;br /&gt;
   The following commands exemplify the process using a bash shell:&lt;br /&gt;
$ vi myfile.c&lt;br /&gt;
$ gcc myfile.c&lt;br /&gt;
$ ls&lt;br /&gt;
a.out&lt;br /&gt;
$ chmod 755 a.out&lt;br /&gt;
$ ./a.out&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   You use a text editor such as vi to create a file of text that&lt;br /&gt;
conforms to the rules of the C specification.&lt;br /&gt;
&lt;br /&gt;
   You run the C compiler so that it reads what you wrote. The C&lt;br /&gt;
compiler sees your program file as an ASCII character stream that it&lt;br /&gt;
interprets as a token stream.&lt;br /&gt;
   So, what is a &amp;quot;token&amp;quot;? A token is one or more ASCII characters that&lt;br /&gt;
the compiler sees as a meaningful thing. To compare with the English&lt;br /&gt;
language, think of a token as a word or a word ending or punctuation or&lt;br /&gt;
some other element that&#039;s meaningful.&lt;br /&gt;
&lt;br /&gt;
   The C compiler is a software program that conforms to a particular&lt;br /&gt;
design: the design for interpreters and compilers. Generally, any&lt;br /&gt;
compiler or interpreter includes an input stage that parses the incoming&lt;br /&gt;
ASCII (token) stream and also has a set of keywords and operators that&lt;br /&gt;
are reserved ASCII character(s) and a set of rules that the compiler&lt;br /&gt;
applies to the tokens it reads.&lt;br /&gt;
   When the compiler begins, it sets itself to a neutral state, which&lt;br /&gt;
is to say that it will examine the first ASCII characters to verify that&lt;br /&gt;
it can parse it as a stream of tokens.&lt;br /&gt;
   When the compiler identifies the first token, it verifies that that&lt;br /&gt;
token is of a class that can be a first token and then resets its (the&lt;br /&gt;
compiler&#039;s) state so that the following token must be one of a limited&lt;br /&gt;
set of tokens. For example:&lt;br /&gt;
1+2&lt;br /&gt;
   The compiler reads the 1 and then the &#039;+&#039; character, at which point&lt;br /&gt;
it determines that it&lt;br /&gt;
has at least one valid token:1. The compiler continues reading and sees&lt;br /&gt;
the 2 and determines that it now has two tokens, 1 and &#039;+&#039;. The 1 token&lt;br /&gt;
is an integer type of data the value of which is 1. The &#039;+&#039; token,&lt;br /&gt;
because it occurs between the 1 and the 2 represents the addition&lt;br /&gt;
operator. The compiler continues reading to find only whitespace and&lt;br /&gt;
then is able to identify the ASCII stream as a set of three tokens--a&lt;br /&gt;
value, an operator, and a value--that together form an expression.&lt;br /&gt;
   An expression is at least one operand and zero or more operators&lt;br /&gt;
that must be resolved to a single value.&lt;br /&gt;
   The compiler resolves the expression 1+2 to be a single value of 3.&lt;br /&gt;
   If you know how to write a C program that is exactly 1+2 and nothing&lt;br /&gt;
else, it&#039;s very likely your compiler will generate an error message&lt;br /&gt;
(remember, a compiler implements the C programming language&lt;br /&gt;
specification, and does so in its own way--the C specification is&lt;br /&gt;
deliberately permissive in some aspects of implementation).&lt;br /&gt;
   If you get an error message, very likely it will be a complaint that&lt;br /&gt;
there&#039;s not a complete statement or there&#039;s a problem at the end of the&lt;br /&gt;
file or some such.&lt;br /&gt;
&lt;br /&gt;
   The C compiler is designed to read statements. A statement is a set&lt;br /&gt;
of valid tokens that follow the rules of the C programming language and&lt;br /&gt;
end with a statement termination character, which is the ; character.&lt;br /&gt;
   Try revising your program to read&lt;br /&gt;
1+2;&lt;br /&gt;
   The 1+2 is an expression: the C compiler sees 1 followed by +&lt;br /&gt;
followed by 2 and verifies that this is a valid sequence of tokens that&lt;br /&gt;
makes an expression. It interprets the ; character as a statement&lt;br /&gt;
terminator, which means the compiler creates the machine code for the&lt;br /&gt;
expression and resets itself to a neutral state, ready to read the next&lt;br /&gt;
statement (ASCII character stream of valid tokens).&lt;br /&gt;
   The compiler may compile the program with only warning messages. If&lt;br /&gt;
so, it will make a new file that is named a.out. It is not a loadable&lt;br /&gt;
program, nor is it executable. Very likely the entire contents is 3,&lt;br /&gt;
which means the compiler did the addition as it did the compiling. You&lt;br /&gt;
may think that the compiler would leave the 1+2 in the file as data and&lt;br /&gt;
machine instructions that the CPU runs to create the sum, 3. That the&lt;br /&gt;
compiler does the arithmetic before it is done is a matter of&lt;br /&gt;
optimization.&lt;br /&gt;
&lt;br /&gt;
   The C compiler generally runs in four different phases:&lt;br /&gt;
1 preprocessor&lt;br /&gt;
2 compiler&lt;br /&gt;
3 optimizer&lt;br /&gt;
4 linker&lt;br /&gt;
&lt;br /&gt;
   Consider the program:&lt;br /&gt;
1+2;&lt;br /&gt;
   The preprocessor runs and sees nothing to do.&lt;br /&gt;
   The compiler runs and translates the ASCII to data and machine code,&lt;br /&gt;
which properly is a set of 1 bits and 0 bits that represent integer 1,&lt;br /&gt;
integer 2, and the operation of addition.&lt;br /&gt;
   The optimizer recognizes that this expression can be resolved now&lt;br /&gt;
without doing any harm to any other parts of the program, so the&lt;br /&gt;
optimizer replaces the code with the integer value of 3.&lt;br /&gt;
   The linker runs and does nothing: there is no code to which to link&lt;br /&gt;
this module.&lt;br /&gt;
&lt;br /&gt;
   Consider the following program:&lt;br /&gt;
1+2&lt;br /&gt;
3 + 4 ;&lt;br /&gt;
   How many statements do you see? How many expressions? How many&lt;br /&gt;
tokens?&lt;br /&gt;
&lt;br /&gt;
   There is a single statement that has two expressions and a total of&lt;br /&gt;
seven tokens: 1, +, 2, 3, +, 4, and ; (we&#039;re not counting the space&lt;br /&gt;
characters or the newline characters).&lt;br /&gt;
   Note that the C compiler sees 1+2 and 3 + 4 identically: two&lt;br /&gt;
expressions that add two integer values together. Very likely the&lt;br /&gt;
resulting program will effectively be 3 7 after the optimizer pass does&lt;br /&gt;
its thing.&lt;br /&gt;
   Note that the 3 and the 7 are there in the program but the program&lt;br /&gt;
does nothing with them.&lt;br /&gt;
   Now it may be that the optimizer of your compiler detects that there&lt;br /&gt;
are no machine operations for the CPU and the optimizer might eliminate&lt;br /&gt;
the data itself. I doubt it, as it&#039;s possible that you may want to make&lt;br /&gt;
a file that contains only data and link it to one or more other programs&lt;br /&gt;
that you&#039;ll write at some time.&lt;br /&gt;
&lt;br /&gt;
   The discussion so far includes the terms ASCII stream, token stream,&lt;br /&gt;
values, operands, operators, expressions, statements, and the four&lt;br /&gt;
compiler passes: preprocessor, compiler, optimizer, and linker.&lt;/div&gt;</summary>
		<author><name>67.101.218.236</name></author>
	</entry>
</feed>