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 > Wanted: Source codes (for badass)
2020-10-17 08:22
Sasq

Registered: Apr 2004
Posts: 155
Wanted: Source codes (for badass)

In order to improve my assembler it would be great to try it on existing projects.

So if you have sources for demos/intros/games that you don't mind sharing it would be kind if you could send them my way, and I'll try to get them working in bass.

They need to be buildable the normal way (Kickass, Acme or whatever) so I can compare the output binaries...

(this also means that if your type of demos requires special tools there is a greater chance I will include such functionality in bass).

-- sasq64@gmail.com
 
... 65 posts hidden. Click here to view all posts....
 
2020-11-01 14:31
Krill

Registered: Apr 2002
Posts: 2852
Quoting tlr
I thought you didn't like it being explicitly annotated? Maybe I assumed wrong?
I'd prefer no annotations, but with annotations, i'd prefer them on the opcodes, not the operands.
2020-11-01 14:45
tlr

Registered: Sep 2003
Posts: 1723
Quote: Quoting tlr
I thought you didn't like it being explicitly annotated? Maybe I assumed wrong?
I'd prefer no annotations, but with annotations, i'd prefer them on the opcodes, not the operands.


I too obviously prefer them on the opcodes. Paradoxically, allowing them implicitly would actually need to attach that property to the operand though. Allowing both implicit and explicit will need resolution code to handle some corner cases when the operand property conflicts with explicit opcode size.

It wouldn't be entierly weird to allow size extensions to the actual operand btw, e.g $00.w or (5 + 2).b. IIRC 68k asms have such constructs. Again, 64tass has _loads_ of such features, but syntax can always be argued about. :)
2020-11-04 11:35
Sasq

Registered: Apr 2004
Posts: 155
I have now refactored the assembler into using an AST for parsing, so parsing does not have to happen for every pass, and not for every rept, define or other block.
For instance, a !rept 30000 { opcode } is now around 15x faster.

It also means the parser can become a lot more advanced.
2020-11-04 12:04
Golara
Account closed

Registered: Jan 2018
Posts: 212
Quote: I too obviously prefer them on the opcodes. Paradoxically, allowing them implicitly would actually need to attach that property to the operand though. Allowing both implicit and explicit will need resolution code to handle some corner cases when the operand property conflicts with explicit opcode size.

It wouldn't be entierly weird to allow size extensions to the actual operand btw, e.g $00.w or (5 + 2).b. IIRC 68k asms have such constructs. Again, 64tass has _loads_ of such features, but syntax can always be argued about. :)


well 68k, x86 and any other arch needs this kind of syntax since they can load 8, 16, 32+ bit words. On 6502 you only need a distinction because of the zero page. I'd rather have the one byte address be always ZP and 2 byte address always be a full address, i.e

lda $00 = zp load
lda $000 = normal load
2020-11-04 12:14
Sasq

Registered: Apr 2004
Posts: 155
As was mentioned earlier, this requires the size of a Number to be part of the numeric token, and propagate through expressions -- meaning you need C-like promotion of different integer types.

Could for sure be done, but not something I would do now.
If I create a "promotable" type system for other reasons (to make it easier to do things like combine arrays, numbers and lambdas in expressions) then I may add support for it.
2020-11-04 13:16
tlr

Registered: Sep 2003
Posts: 1723
Quote: well 68k, x86 and any other arch needs this kind of syntax since they can load 8, 16, 32+ bit words. On 6502 you only need a distinction because of the zero page. I'd rather have the one byte address be always ZP and 2 byte address always be a full address, i.e

lda $00 = zp load
lda $000 = normal load


Yes, but what about things like:
      lda lab,x
lab   equ $f0 + 15
Do you want lda <abs>,x or lda <zp>,x?
2020-11-04 13:19
tlr

Registered: Sep 2003
Posts: 1723
Quote: I have now refactored the assembler into using an AST for parsing, so parsing does not have to happen for every pass, and not for every rept, define or other block.
For instance, a !rept 30000 { opcode } is now around 15x faster.

It also means the parser can become a lot more advanced.


Yay! An AST really pays off.

All this discussion actually got inspired to update mine a bit too. My aim might be a bit different though, although I noticed I'd put lua scripting in the TODO too. :)
2020-11-04 13:46
Krill

Registered: Apr 2002
Posts: 2852
Quoting tlr
Yes, but what about things like:
      lda lab,x
lab   equ $f0 + 15
Do you want lda <abs>,x or lda <zp>,x?
Sum is $ff, so this is not really ambiguous yet, i guess.

I'd implement the type promotion from ZP to mem16 access to happen when the result is at least $0100.

If this would be
lab = $00f0 + 15
instead, it would mean mem16 access, as the biggest type is mem16 in that expression.

But there should be some way to explicity force ZP access on a symbol (when all operands in an expression have type ZP but result in a value >255).
Could be as simple as "symbol = <( ... bla... expression )", though. :)
2020-11-04 17:07
tlr

Registered: Sep 2003
Posts: 1723
Quoting Krill
Quoting tlr
Yes, but what about things like:
      lda lab,x
lab   equ $f0 + 15
Do you want lda <abs>,x or lda <zp>,x?
Sum is $ff, so this is not really ambiguous yet, i guess.

I'd implement the type promotion from ZP to mem16 access to happen when the result is at least $0100.

If this would be
lab = $00f0 + 15
instead, it would mean mem16 access, as the biggest type is mem16 in that expression.
It was probably a bad example. $100 - 15 would be a better example. If the result is interpreted as zp, then the behaviour would be different.
Your idea with mem16 would solve that case if I understand it correctly.
2020-11-04 17:23
chatGPZ

Registered: Dec 2001
Posts: 11136
I'd prefer those ambigious cases to just show an error, so i am forced to write into the code explicitly what i mean/want. All those "smart" automatisms *will* fail to do what you intended in one case or another - and result in a night of WTF
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 - 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
Korodny
wbochar
kbs/Pht/Lxt
Erol
jmin
wil
Honcho
TheRealWanderer
Andy/AEG
radius75
The Syndrom/TIA/Pret..
zscs
Soya/Fairlight
Dymo/G★P
Psylicium
rambo/Therapy/ Resou..
sebalozlepsi
Guests online: 83
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 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 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Coders
1 Axis  (9.8)
2 Graham  (9.8)
3 Lft  (9.8)
4 Crossbow  (9.8)
5 HCL  (9.8)

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