Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Badass - New 6502 Assembler
2020-06-28 17:47
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....
 
2020-07-02 13:56
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
}

2020-07-02 14:41
JackAsser

Registered: Jun 2002
Posts: 1989
What does NoStore mean in a parent section actually?
2020-07-02 14:57
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.
2020-07-03 08:53
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.
2020-07-03 11:03
Sasq

Registered: Apr 2004
Posts: 155
Sure, that already works. Although I need to allow file ouput section to overlap I guess.
2020-07-03 12:10
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
2020-07-23 22:59
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
2020-07-23 23:45
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.
2020-07-24 08:53
Sasq

Registered: Apr 2004
Posts: 155
Yes Apples clang still lacks many C++17 features. I'll see what I can do...
2020-07-24 09:42
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
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Fungus/Nostalgia
Nordischsound/Hokuto..
Guests online: 143
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Fullscreen Graphicians
1 Carrion  (9.8)
2 Joe  (9.8)
3 Duce  (9.8)
4 Mirage  (9.7)
5 Facet  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.042 sec.