Giter Site home page Giter Site logo

x16-hello's Introduction

Commander X16 Hello World!

This is a tutorial project to get started with programming for the Commander X16 8-bit computer, made by The 8-bit Guy. The project is made to be modular, so that you can create a multi-file project very easily, and make use of Assembly as well as C code.

The project is a simple test of output and input of text, using C and assembly simultaneously and simply making sure your toolchain is set-up correctly.

Setup

You need to install a toolchain to compile / assemble the project, and an emulator (or a real X16 system!) to execute it. Here is how to set it up: (TODO: other systems)

Windows

  1. Download the latest CC65 toolchain (Official website)
  2. Extract it to a folder you won't touch, like in C:\Program Files\cc65. You should have folders in it such as asminc, bin, etc. Add the full path to the bin folder to your Path environment variable.
  3. Open Command Prompt, type cc65.exe. You should see the output cc65.exe: No input files. If so, you have correctly set up your toolchain. If not, make sure the Path is correctly set, and you have reopened the Command Prompt after doing so.
  4. You will now need to install GNU make to build the project. I haven't found a good Windows binary hosting site for it, but right now, the best way is to install Mingw-w64 and you can copy mingw32-make.exe to CC65's bin folder and rename it to make.exe. Make sure it is also working.
  5. Download the Commander X16 emulator, extract it and also add the folder to your Path variable. Make sure it works by opening x16emu.exe and it should present a BASIC prompt.

Building

Open a Command Prompt window to this folder, and type make. It should compile the project and output hello.prg inside the build directory. This is the binary file that you will run.

Running

To make things easier, I've added a recipe to run the emulator from make.

You can run make run to launch the emulator, load and launch the ROM on startup.

If you want to run it manually, launch the emulator as so:

x16emu -prg build/hello.prg -run

Omit the -run argument to just load it into memory, and not execute.

References

x16-hello's People

Contributors

nb-programmer avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.