Installing CC65: Difference between revisions
Veinassolay (talk | contribs) (Installing on a Mac OS X with Homebrew) |
(→Building CC65 on Ubuntu (Linux): Working instructions to build from git) |
||
Line 35: | Line 35: | ||
== Building CC65 on Ubuntu (Linux) == | == Building CC65 on Ubuntu (Linux) == | ||
=== Binary from trikaliotis.net === | |||
Absolute easiest method: | Absolute easiest method: | ||
Line 42: | Line 43: | ||
Using software sources and import the gpg key. | Using software sources and import the gpg key. | ||
or | or | ||
add: | add this to your software sources list: | ||
<pre> | |||
deb http://debian.trikaliotis.net/ stable contrib | deb http://debian.trikaliotis.net/ stable contrib | ||
</pre> | |||
Download: [http://www.trikaliotis.net/spiro.pgp KeyFile] | Download: [http://www.trikaliotis.net/spiro.pgp KeyFile] | ||
Line 50: | Line 52: | ||
Then: | Then: | ||
sudo apt-get install cc65 | <pre>sudo apt-get install cc65</pre> | ||
=== Building from git === | |||
/ | On Debian or Ubuntu, open a terminal and enter the following commands. | ||
On Fedora, CentOS, and their descendants, the <code>apt</code> command will need to be changed. | |||
<pre> | |||
sudo apt install build-essential git | |||
mkdir -p ~/develop | |||
cd ~/develop | |||
git clone https://github.com/cc65/cc65.git | |||
cd cc65 | |||
nice make -j2 | |||
make install PREFIX=~/.local | |||
which cc65 | |||
</pre> | |||
If your account has been configured to run applications built from source and installed for one user, the last step should show <code>/home/<username>/.local/bin/cc65</code>. | |||
If it does not, add <code>~/.local/bin</code> to your <code>PATH</code> environment variable: | |||
<pre> | |||
nano ~/.bashrc | |||
# and add the following at the end of the file | |||
if [ -d "$HOME/.local/bin" ] ; then | |||
PATH="$HOME/.local/bin:$PATH" | |||
fi | |||
</pre> | |||
Press Ctrl+O Enter to save, then Ctrl+X to quit, and the change to <code>PATH</code> will take effect the next time you log in. | |||
$ | |||
== Installing CC65 on Mac OS X == | == Installing CC65 on Mac OS X == | ||
Using Homebrew: On computer with Homebrew installed, open Terminal and type "brew install cc65". Everything else should be automatic. | Using Homebrew: On computer with Homebrew installed, open Terminal and type "brew install cc65". Everything else should be automatic. |
Revision as of 02:36, 23 October 2017
An assembler is a program that translates assembly language source code into machine code. A commonly used assembler that produces machine code for 6502 CPUs is CA65, which is distributed as part of the CC65 package. These instructions tell how to install and run CA65 on Windows 2000 or Windows XP.
Configuring Windows
Windows is shipped with file name extensions hidden in Windows Explorer. This misfeature was originally intended to make Windows 95 look more like Mac OS 7.5, which did not use file name extensions. But hiding makes it easier to accidentally create a file name with two extensions. Worse yet, destructive software such as the ILOVEYOU worm (Wikipedia article) has shipped with two extensions: one to indicate to the operating system that the file is executable and one to fool the user into thinking that the file is not executable (and thus safe). The first thing we will do is turn on the display of file name extensions in Windows Explorer:
- Open Control Panel. (This may be in Start > Control Panel or Start > Settings > Control Panel.)
- In Windows XP, if "Pick a category" shows up at top center of the window, click "Switch to Classic View".
- Open Folder Options and activate the View pane.
- In the scrolling list of Advanced Options, turn make sure that "Hide extensions for known file types" is not checked.
- Press OK to put the change into effect.
Configuring 7-Zip
Windows 2000 does not come with software to extract files from PKZIP archives.
Windows XP comes with a bare-bones archiver called Compressed Folders that can only handle PKZIP archives (.zip
), not rar or 7z or tar or gz or bz2 files.
The 7-Zip package can extract files from all of them, as well as add files to PKZIP and 7-Zip archives.
Downloading CC65
- Read the front page of CC65's web site.
- Scroll down to "Download". At the bottom of this section is a list of mirrors.
- Enter one of the mirrors, and download the
cc65-win32-#####.zip
andcc65-doc-#####.zip
packages to your computer. (The ##### represents a version number, such as 2.11.0-1, which may change before you read this.) Thecc65-win32
contains the CC65 package compiled for Windows, andcc65-doc
contains the manual. - Extract
cc65-win32-#####.zip
to a new folder. - Open this folder and run the
install.vbs
file as an administrator to copy it to Program Files. - Delete this folder.
Log out and log in to complete installation.
Building CC65 on Ubuntu (Linux)
Binary from trikaliotis.net
Absolute easiest method:
Set up you repository there as it says on the homepage. Using software sources and import the gpg key. or add this to your software sources list:
deb http://debian.trikaliotis.net/ stable contrib
Download: KeyFile add to authentication sources.
Then:
sudo apt-get install cc65
Building from git
On Debian or Ubuntu, open a terminal and enter the following commands.
On Fedora, CentOS, and their descendants, the apt
command will need to be changed.
sudo apt install build-essential git mkdir -p ~/develop cd ~/develop git clone https://github.com/cc65/cc65.git cd cc65 nice make -j2 make install PREFIX=~/.local which cc65
If your account has been configured to run applications built from source and installed for one user, the last step should show /home/<username>/.local/bin/cc65
.
If it does not, add ~/.local/bin
to your PATH
environment variable:
nano ~/.bashrc # and add the following at the end of the file if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" fi
Press Ctrl+O Enter to save, then Ctrl+X to quit, and the change to PATH
will take effect the next time you log in.
Installing CC65 on Mac OS X
Using Homebrew: On computer with Homebrew installed, open Terminal and type "brew install cc65". Everything else should be automatic.