Giter VIP home page Giter VIP logo

sbasm_patches's Introduction

sbasm patches

Bugs fixed in sbasm 3.03.06:

  • Allow assembled output files > 64 KB
  • Allow whitespace in expressions

Bugfix #1:

The out-of-the-box default for sbasm is that it will produce a warning if you try to assemble files that generate code/data past the $FFFF address.

(For example, you are trying to create a disk image.)

That is, this assembly ...

    .or $FFFF
    .db 1, 2

... will produce this bogus warning:

*** Warning: Target program memory full

The patch in cr6502.py increases the limit to 32 MB (the maximum size for a ProDOS volume.)

Unfortunately, there is no command line switch or directive to turn this warning off.

Bugfix #2:

Imagine for a second if Mathematicians decided that these two expressions were NOT equivalent:

a = 1+2
b = 1 + 2

You would say this is utterly stupid / insane as both a and b have same the value 3. That is, whitespace does NOT change semantics! Now, normally, you would be correct -- unless you are using the broken 6502 assembler sbasm:

a = 1+2     ; 3
b = 1 + 2   ; 1 !?!?

Ironically, sbasm, is written in Python, which DOES parses the above correctly.

i.e.

        .or $FE
        .db 256 - * ; supposed to be FE: 02

The patch in assem.py fixes the bug where whitespaces in an expression cause sbasm to ignore the rest of the line. The heart of the function EvalExpr() was literally re-written from scratch. Guess who didn't fail their 301 Compilers and Interpreters class. :-)

Thanks

  • Nox Archaist for the > 64 KB file size patch

sbasm_patches's People

Contributors

michaelangel007 avatar

Stargazers

 avatar  avatar  avatar

Watchers

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