Giter Site home page Giter Site logo

x16's Introduction

Commander X16 Explorations

C Code

Makefile Shenanigans

I have included a Makefile that may be instructive:

CC = cl65
TARGET_ARCH = -t cx16

The important things are setting the CC and TARGET_ARCH Other than this, everything should behave the normal way make does things. The rest of this section is a poor review of how make works.

If you have a single source file test.c and you add:

all: test

It will build that source file into test -- the all target is just for convenience if you add more targets, as make will by default build the first target.

You can do something more complicated like:

all: test

test.o: helper.h

test.prg: test.o helper.o

So if you have another C source file helper.c with an associated include file helper.h that's used by test.c, this will make sure that test.o is built if helper.h changes. Implicitly, test.o will still build if test.c changes also.

Loading the Final Output File

The final output file will be in the PRG format and is compatible with the LOAD command. You can load and run it when firing up x16emu:

x16emu -prg /path/to/test -run

x16's People

Contributors

bcr avatar

Watchers

 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.