| |
Sasq
Registered: Apr 2004 Posts: 155 |
Badass - New 6502 Assembler
The last couple of months I've created a new 6502 Assembler called bass (or Badass).
The basic idea is for it to be as advanced as Kickassembler, but with a less complex, more unified syntax.
And it also has unit tests in an internal emulator.
You can find it at https://github.com/sasq64/bass
I've started a tutorial here: http://apone.org/bass/part1.html
Here is an example C64 source http://apone.org/bass/example.asm.html |
|
... 106 posts hidden. Click here to view all posts.... |
| |
Sasq
Registered: Apr 2004 Posts: 155 |
Ok now this:
Sections form a tree. Only leaf sections may contain data.
You can not "open up" sections, only add a section to a
parent section.
Root sections usually have fixed size and fixed start.
After an assembly pass, go through the tree and place all sections sequentially in their parent.
Now all sections will have a fixed start address.
If any section was moved, we need to do another pass.
; Root sections
!section "RAM" start=$0000 size=64*1024 NoStore
!section "ZP" start=$00 size=256 NoStore
; Non-leaf section
!section "text" in="RAM" NoStore Last
; Leaf section
!section "code" in="RAM", start=$801 {
; Basic start and such
; Another leaf section, defined recursively
!section in="text" {
name: !text "name"
}
lda name,x
}
|
| |
JackAsser
Registered: Jun 2002 Posts: 1989 |
What does NoStore mean in a parent section actually? |
| |
Sasq
Registered: Apr 2004 Posts: 155 |
Well NoStore should be implied in any non-leaf section now.
It means it will not be any data in the section. |
| |
JackAsser
Registered: Jun 2002 Posts: 1989 |
Quote: Well NoStore should be implied in any non-leaf section now.
It means it will not be any data in the section.
Yup, I guessed as much. You really need output directives to root sections also, i.e. to what file they should be emitted. |
| |
Sasq
Registered: Apr 2004 Posts: 155 |
Sure, that already works. Although I need to allow file ouput section to overlap I guess. |
| |
Sasq
Registered: Apr 2004 Posts: 155 |
Here is the new Section documentation (and other meta commands):
https://github.com/sasq64/bass/blob/new-sections/docs/META.md |
| |
Sasq
Registered: Apr 2004 Posts: 155 |
Beta4 update. Changes include:
* Indexed labels, for accessing labels inside macros and rept statements
* New section system, child sections etc
* Unicode strings
* !check for runtime asserts in 6502 code
* Better error reporting
https://github.com/sasq64/bass/releases |
| |
Frantic
Registered: Mar 2003 Posts: 1627 |
Good work there, sir! I didn't manage to build bass on my MacOS 10.13 system though, due to various errors when compiling. Too bad. |
| |
Sasq
Registered: Apr 2004 Posts: 155 |
Yes Apples clang still lacks many C++17 features. I'll see what I can do... |
| |
Boogaloo
Registered: Aug 2019 Posts: 21 |
I'm following this with great interest. I'll try it out soonish. Great work so far!
(And I agree with JackAsser about the clean C++ code.) |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 - Next |