LoginLogin

6502 Assembler and Interpreter

Root / Talk About Programs / [.]

NateDogg1232Created:
Good news everybody! I'm working on a 6502 assembler and interpreter. What is a 6502 The 6502 is a processor by MOS technologies and was the processor in many 8-bit machines such as the NES, most of the 8-bit Commodores, and the Atari 8-bit line, along with many other machines both old and new. Why are you calling it an interpreter? That's stupid! I don't call it an emulator because I'm not being either cycle accurate nor am I emulating any certain machine. I'm indeed using my own architecture built around SMILEBasic's capabilities and to be expandable. Why is this cool? Although I'm not making an emulator of any sort of machine, this does open up opportunities to create emulators based on the design on my interpreter. So what's the name, then? Right now, it's pretty basic, but it's called "The 6502 Assembler and Interpreter Project" or T6AIP for short. It will be licensed under the MIT license. I will keep this updated as it goes forward. GitHub page here: https://github.com/NateDogg1232/T6AIP Update 1:
Spoiler This goes along with the first post: - Made a system to where I can get and set individual bytes (not ints) from an array. This makes the array 4x compressed (4 bytes per 32 bit integer) and makes it easier to make sure everything is kept within the original limitations of the 6502. This will, sadly, affect speed and if requested, can be taken out for favor of a different method I have in mind. - I have an architecture mostly planned out and I will be posting all the code I have so far on GitHub soon, including all the documentation I have so far. - I have some basic assembler directives (or directive: . define) already done and have planned the syntax of the assembler and the method the assembler will use.
Update 2:
SpoilerJust a quick update: I'm gonna push some stuff later tonight to the repo. All I did was rename some things and further implement the byte arrays. I think I may end up making the byte array system into a separate library and release that too. I believe it'd be useful.

Are you even allowed to choose the license your code goes under? Every project is bound by the SmileBASIC terms of service.

Are you even allowed to choose the license your code goes under? Every project is bound by the SmileBASIC terms of service.
I actually don't know. I'll need to check that

Are you even allowed to choose the license your code goes under? Every project is bound by the SmileBASIC terms of service.
I actually don't know. I'll need to check that
So, I have read through a bunch of legal mumbo jumbo and it seems like there's nothing keeping me from releasing a project with a license. The only thing it says is user agreements to basically don't do stupid stuff with the projects you put up.

-snip- So, I have read through a bunch of legal mumbo jumbo and it seems like there's nothing keeping me from releasing a project with a license. The only thing it says is user agreements to basically don't do stupid stuff with the projects you put up.
That's very interesting. So basically I could release a project under MIT license then.

If you're interested in other people's approaches to 6502 assemblers I'd check this one out: https://github.com/Tegmen/6502-Assembler It goes with an emulator written in another kiddie programming language called Scratch.

Are you even allowed to choose the license your code goes under? Every project is bound by the SmileBASIC terms of service.
I actually don't know. I'll need to check that
So, I have read through a bunch of legal mumbo jumbo and it seems like there's nothing keeping me from releasing a project with a license. The only thing it says is user agreements to basically don't do stupid stuff with the projects you put up.
That's very interesting. So basically I could release a project under MIT license then.
I do believe so.
If you're interested in other people's approaches to 6502 assemblers I'd check this one out: https://github.com/Tegmen/6502-Assembler It goes with an emulator written in another kiddie programming language called Scratch.
Wow that's cool that somebody made an emulator in Scratch... That's impresive

Just a quick update: I'm gonna push some stuff later tonight to the repo. All I did was rename some things and further implement the byte arrays. I think I may end up making the byte array system into a separate library and release that too. I believe it'd be useful.

Just a quick update: I'm gonna push some stuff later tonight to the repo. All I did was rename some things and further implement the byte arrays. I think I may end up making the byte array system into a separate library and release that too. I believe it'd be useful.
Libraries for SB are always welcomed! :D I think we have a severe lack of usable libraries for this language.

The only thing it says is user agreements to basically don't do stupid stuff with the projects you put up.
That's very interesting. So basically I could release a project under MIT license then.
The specific terms are listed here: http://smilebasic.com/en/e-manual/manual13/ It includes:
  • A warning not to upload content that infringes on other's property rights, includes personal information, or includes offensive materials
  • A warning that publishing is agreement to allow third-party use of the materials
  • A warning that offending projects can be taken down by SmileBoom without notice.

HELLO This project is not dead. I actually did quite a bit since the last one and it's all been pushed to the github page (I'm not gonna be using keys until at least the assembler is in a completely working state.) So I added more to the framework of the byte arrays concept and added the ability to add words (in little-endian, because the 6502 is in little-endian). I am working on adding some opcodes (I have added ADC, AND, ASL, and am working on BCC). I am thinking of ways to handle labels, and I've come up with using a do-fix table, but I don't quite know how I'm gonna I'mplement it. It's coming along pretty well. I want to work on one part at a time, so that's why I've only been working on the assembler (Plus it's the much easier one to do)