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-06-29 10:34
Frantic

Registered: Mar 2003
Posts: 1626
Sounds good I think. Regarding "* ReadOnly - Intended to go into ROM. Assembler could warn if self modifying code is used" it would of course also be important to allow self-modifying code to be assembled to ROM segments, since one would typically copy at least some code from ROM to RAM at runtime, and that code may involve self-modification etc.
2020-06-29 13:32
Golara
Account closed

Registered: Jan 2018
Posts: 212
big + for c++ I'll definitely check it out
2020-06-29 13:33
JackAsser

Registered: Jun 2002
Posts: 1987
Yes frasse, that is a common use case. I have pure rom segments, i have ram segments (stored on rom) and i have bss-segments (pure ram, nothing stored)
2020-06-29 13:36
Krill

Registered: Apr 2002
Posts: 2804
Quoting Frantic
Sounds good I think. Regarding "* ReadOnly - Intended to go into ROM. Assembler could warn if self modifying code is used" it would of course also be important to allow self-modifying code to be assembled to ROM segments, since one would typically copy at least some code from ROM to RAM at runtime, and that code may involve self-modification etc.
Wouldn't that be a RAM segment that is loaded/assembled to ROM? I.e., a segment with different load and run addresses.
2020-06-29 13:43
Frantic

Registered: Mar 2003
Posts: 1626
Yes, that's what I tried to say. What Jackasser said, basically.
2020-06-29 13:57
Sasq

Registered: Apr 2004
Posts: 155
Well if it's intended for RAM, don't tag it as "Read Only" :)

The terms here can be a bit confusing though.

So if I understand correctly:

load_address is where the section is expected to end up in memory. It is used for checking overlap, and is normally specified directly by the developer. It defines the initial PC (run_address)

run_address is normally the same as load_address, but if the developer changes the PC inside a section, they will not align any more. run_address is something the developer needs to keep track of "manually".

file_offset normally needs to be specified for cart images, where the output is not a simple linear mapping to RAM.
2020-06-29 14:47
Frantic

Registered: Mar 2003
Posts: 1626
Yes, the terms are a bit slippery. So, no matter if I use the terms correctly or not, what I meant was this:

If we distinguish between a segment (a larger unit) and a section (several sections of code can be contained in a segment), a segment which is generally intended for ROM and should be read only, may still contain one section of code which contains something that should be executed in C64 RAM or drive RAM and may contain self-modifying code.

!segment ROM_BANK1, $8000-$A000, READ_ONLY { ;a "segment"

[some read only stuff that can't use self-modifying code etc]

!section NAME_OF_SECTION, relativepc=$0800 { ;a "section" inside the segment

[some stuff that is intended to be copied "manually" from the ROM to $0800 in RAM. This should be able to override the READ ONLY restriction that otherwise applies to the segment that contains this section.]
}

[some more read only stuff that can't use self-modifying code etc]

}

Maybe there is some entirely different and better way to solve this. I just wanted to explain in more detail what I meant.
2020-06-29 16:23
Golara
Account closed

Registered: Jan 2018
Posts: 212
I know this is tool from coder for a coder, but still you could have released built binaries for people that can't into modern software compilationing

I made it :P Statically linked, so it should work on everything

windows 64bit (compiled with mingw on linux): https://mega.nz/file/2gYXFaBA#MftkFZhFnAdm4fKJ7WCZ4sq3ULVemKlXr..
linux 64bit https://mega.nz/file/2gYXFaBA#MftkFZhFnAdm4fKJ7WCZ4sq3ULVemKlXr..
2020-06-29 16:41
Sasq

Registered: Apr 2004
Posts: 155
@Golara: There are Windows releases on the git-page, built using MSVC.

Binaries for Linux is usually not a good idea.
And for most people it is just "clone" and "make" and you are done.
2020-06-29 16:45
Sasq

Registered: Apr 2004
Posts: 155
@Frantic: I am hoping to avoid multiple levels with both segments and section because it complicates things...

For that particular case you can either mark the section as not ReadOnly and live without the extra checking. But better probably to add support for changing also the ReadOnly state on the fly, like the PC.

I'm wondering if there are other cases that are harder to handle with only one level of sections. Can you think of a situation where you really need the parent/child relationship ?
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 - 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
Acidchild/Padua
Ricky/Bonzai
iAN CooG/HVSC
LightSide
Mason/Unicess
iceout/Avatar/HF
Walt/Bonzai
DnP
sln.pixelrat
Guests online: 309
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 No Bounds  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 The Ghost  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 Party Elk 2  (9.7)
2 Cubic Dream  (9.6)
3 Copper Booze  (9.5)
4 Rainbow Connection  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Onscreen 5k  (9.5)
7 Dawnfall V1.1  (9.5)
8 Quadrants  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Nostalgia  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Logo Graphicians
1 Sander  (10)
2 Facet  (9.7)
3 Mermaid  (9.4)
4 Pal  (9.4)
5 Shine  (9.3)

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