Giter Club home page Giter Club logo

int64-for-c64's Introduction

int64 for C64

64-bit integer support in 6502 assembly language for Commodore 64

Methods implemented

  • int64_zero - initialize with zero
  • int64_arg1 - set first argument value
  • int64_adc - 64-bit addition (with carry)
  • int64_sbc - 64-bit subtraction (with carry)
  • int64_compare - compare 64-bit numbers (sets Z, C)
  • int64_negate - toggle negative/positive 64-bit number
  • int64_mul - 64-bit multication result is 128-bit
  • int128_div - 128-bit number divided by 64-bit, 128-bit result and remainder
  • int64_tostring - convert int64 value to string (decimal, binary, octal, or hex)
  • int128_tostring - convert int128 value to string (decimal, binary, octal, or hex)

Methods yet to be implemented

  • int64_fromstring

Limitations

  • build script requires Bash shell or equivalent (to do: add a batch file)
  • division ignoring signed values, assuming unsigned for now (note: work in progress)
  • tostring methods missing support for negative values
  • 128-bit support is unsymmetrical, especially division
  • recommend add full 8-bit/16-bit/32-bit/64-bit/128-bit support with mix
  • adding macros for iterative low level operations could simplify code
  • compare ignoring signed values, assuming unsigned for now
  • missing implementation for initializing from string (decimal, hex, binary)
  • flags may not be correct for overflow, negative, etc.
  • doesn't unroll loops, not focused on maximum speed performance
  • tostring methods are slow based on repetitive division of 128bits by 128bits, could be optimized

BASIC demo test

Video

int64-for-c64's People

Contributors

davervw 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.