Giter Club home page Giter Club logo

benspicmacros's Introduction

bens PIC macros

Working with PIC assembly can be pretty fun, but sometimes making up names for loop/condition labels and keeping track is just a pain. So I wrote this macro library that lets you write nested IF blocks, just like C or other languages.

Turns into (the nops are actually the 2nd word of GOTOs)

About

This is a runtime if macro library. It compiles into real run-time evaluated nested if blocks. I use it for just about everything and I hope you will too.

I tried to use nomenclature similar to mchips ie ifzf - check for z in f, not iffz - check f for z

the skipping instructions have an 'if' eqivelent ie btfss gains an 'if' but loses a 'skip' to become ifbtfs or simply ifbtf but remember that:

  • btfss skips if true
  • 'if' doesnt skip if true

Code legend

Code Description
if if stuff
z zero
c carry bit
dc digit carry (carrry for low nibble)
n not
f file register
bt test that a bit is set
eq equal
ne not equal (short form)
gt greater than
ge greater than or equal
lt less than
le less than or equal

benspicmacros's People

Contributors

simap avatar

Watchers

James Cloos 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.