maly / 6809js Goto Github PK
View Code? Open in Web Editor NEWMotorola 6809 emulator in JavaScript
License: Other
Motorola 6809 emulator in JavaScript
License: Other
there is an error on line 826:
if (cc & F_ENTIRE) {
cc
should be uppercase
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Steps to reproduce:
Assemble and run the following code:
LDA #$91
ADD #$91
DAA
What happened?
Carry was reset.
When similar code was used for multi-byte decimal addition, it yielded incorrect results.
What was expected?
Carry should be set. DAA keeps the carry flag set if it was set beforehand, see the mc6809 emulator sources for comparison: https://github.com/spc476/mc6809/blob/master/mc6809.c#L420 or the official Programming Manual: https://archive.org/details/bitsavers_motorola68_13419254/page/n83/mode/2up
C โ Set if a carry is generated or if the carry bit was set before the operation; cleared otherwise.
After some research, I noticed that this is a common bug in many 6809 emulators.
First - Thank you for this great piece of work; it has allowed me to mock-up a system very quickly.
There is a bug in the NEG op, however, where the carry flag isn't set correctly - a quick fix (Not tested completely) has got it working for me (YMMV):
if(b === 0) { CC |= F_ZERO; } else { CC |= F_CARRY; } if(b & 0x80) { CC |= F_NEGATIVE; }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.