# Deving The XGameStation/Printable version

The current, editable version of this book is available in Wikibooks, the open-content textbooks collection, at
https://en.wikibooks.org/wiki/Deving_The_XGameStation

# Your First Program

Welcome to the first software development chapter of the book! To start this exercise you must have at least the following equipment:
* An XGameStation
* A Home PC
* The XGameStation Development Toolchain
The Development Toolchain can be found at http://www.xgamestation.com/ under the downloads section. The XGameStation itself costs $199, and you're on your own as to a Home PC. I myself have no experience with the Linux version created by a user - (Someone enter information on it here).
First of all, plug your XGS unit up to the power adaptor and into the wall. Then use the parallel cable provided with it and connect it to LPT1 of your computer. Finally, start the XGS IDE.
In this exercise we will create the most simple program possible that will give immediate feedback. First, Wire an LED up. It should be connected between rb.0 and ground. Be sure to check the datasheet for your LED so that you have it properly biased, as putting it in backwards won't work! Also, make sure to put a 330ohm resistor in series with it to limit current. Not doing that will result in a burned out LED or even damaging a battery in some cases! Let's start by entering this simple program into the IDE:
Now, hit the 'Assemble and Run' button on the Toolbar. If everything is connected correctly and you typed the program in correctly, it should say 'Programming Successful'. Now turn on your XGS and switch the SYSMODE switch to 'RUN'. Hit the Reset button. You LED should light up!

# Edit Guide

This editing guide is to help guide those wishing to add to the book "Deving The XGameStation".

## How to Edit this book
### Links

First of all, the links used in this book are in the form of:
[[Deving_The_XGameStation/Your_Page_Here|Link Text]]
Which appears as:
Link Text
Important: Do not create that page or click on that link! Notice that we use the book name as the main directory and that we replace spaces with underscores ("_").

### Inserting Code

To insert code in book text, enclose it in <code></code> and make sure that every line starts with a space. Doing so correctly will result in something that looks like this:

### Signatures

Signatures are used to tell people who wrote what, or to mark something as their text. They should not, however, be found in the general text. This is a community effort, and there is no need to clutter text with signatures. You should only use your signature for opinionated areas, pages you created (use it once, to show yourself as 'controller' of that page, as most of the knowleadge should have come from you).
To place a signature, you must first be logged in. Although you can create and edit pages without an account, it is highly recommend you create one. Without an account you cannot place signatures.
Simply insert --~~~~ where you want your signature or click on the signature button above the textarea, 2nd button from the right. A signature looks like this:
--Cjmovie 22:10, 12 August 2005 (UTC)

## Major Contributions

If you do a Major Contribution to this book, such as adding a complete section, please add your 'signature' to the list of Major Contributors as linked to on the main page.

## Editing Rules

There are a few rules that must be followed to make this book work. Without rules, there would be chaos. Being the starter of the book I have assumed responsibility for it's upkeep and therefore will organize it and set it's guidelines. Not to say that someone else couldn't help me! These are the rules for editing this book:
* Creating A Page
** Don't create a page you're not going to fill it in yourself
** Never expect someone else to check behind you. Check your work!
** Pages you create are not your page. It may be edited, changed, even completely removed if needed
** A page should really be a 'Chapter', meaning it should be organized and sectioned
* Other Rules
** Anything with opinion to it should be marked with your signature. Please login and use an account while editing this book
--Cjmovie 21:46, 12 August 2005 (UTC)

# Contributors
## Page/Information Contributions

--Cjmovie 11:29, 12 August 2005 (UTC)
* Book Creation
* 'Creating Your First Program' Section 1
* 'How to Edit' Original Sections
* Misc. Fixes, Organization, etc.
--Ashmantle 01:09, 13 August 2005 (UTC)
* (Insert Contributions Here)