Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user tubesockor ! (Registered 2024-05-12) 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-05 15:32
chatGPZ

Registered: Dec 2001
Posts: 11136
Quote:
How do we know what the code actually means ?

you write it, explicitly :)
2020-11-05 16:27
Sasq

Registered: Apr 2004
Posts: 155
This would mean that

table:
    !fill 256
end:

size = table-end

sta data & (size-1)
sta data & $ff


would generate different opcodes, because size is not 8-bit

All this would require a complicated type and promotion system, and you could only get it to do _almost_ what you want.

I think

sta     ; addressing mode depends on operand
sta.b   ; zp
sta.w   ; 16-bit


is probably the simplest/best way to do it.
2020-11-05 16:35
Raistlin

Registered: Mar 2007
Posts: 572
Or just use sta.zp and sta.abs in the same way as KickAss?
2020-11-05 16:43
Sasq

Registered: Apr 2004
Posts: 155
Sure, what you call the suffix is no too important :)

Probably .8 .b .zp .z should all be synonyms
And .w .16 .abs
2020-11-05 16:47
chatGPZ

Registered: Dec 2001
Posts: 11136
.whatimean
2020-11-05 17:00
JackAsser

Registered: Jun 2002
Posts: 1990
Quote: Sure, what you call the suffix is no too important :)

Probably .8 .b .zp .z should all be synonyms
And .w .16 .abs


Hear hear
2020-11-07 16:29
Peiselulli

Registered: Oct 2006
Posts: 81
ACME :
You can force ACME to use a specific addressing mode by adding "+1",
"+2" or "+3" to the assembler mnemonic. Each one of these postfixes
sets the relevant "Force Bit" in ACME's result. If Force Bit 3 is set,
ACME will use 24-bit addressing. Force Bit 2 means 16-bit addressing
and Force Bit 1 means 8-bit addressing. Higher Force Bits have higher
priorities.

Here's an (overly complicated) example:

	symbol1   = $fb
	symbol2   = $fd
	symbol3+3 = $ff	; set Force Bit 3 and store in symbol's flags

		ldx   $fa
		ldy+2 $fc	; set Force Bit 2 (16-bit addressing)
		lda+3 $fe	; set Force Bit 3 (24-bit addressing)
		stx   symbol1
		sty+2 symbol2	; set Force Bit 2 (16-bit addressing)
		sta   symbol3	; no need to set Force Bit 3 as it is
				; already set in "symbol3".

will be assembled to

  a6 fa		; ldx $fa
  ac fc 00	; ldy $00fc
  af fe 00 00	; lda $0000fe
  86 fb		; stx $fb
  8c fd 00	; sty $00fd
8f ff 00 00 ; sta $0000ff


from:
https://github.com/meonwax/acme/blob/master/docs/AddrModes.txt
2020-11-07 17:32
Krill

Registered: Apr 2002
Posts: 2852
ACME never ceases to amaze me over and over again with its creative syntax. =)
2020-11-14 09:09
tlr

Registered: Sep 2003
Posts: 1723
I'm pondering a bit about syntax for referencing symbols in different scopes... towards inner scopes I guess 'outer.inner.symbol'... is a reasonable syntax, but what about the parent scope, or an absolute reference, i.e from the global scope?

Python3 uses .global and .nonlocal key words to specify the bindings of variables in the current scope, but I'd personally prefer something directly in the symbol reference.
Parent scope could be @p.symbol and global @g.symbol perhaps? Not entierly happy with that though.

Any personal favorites here?

(Maybe this should be in a new thread as it's a generic assembly syntax question, but it's useful for the discussion here as well.)
2020-11-14 09:31
Krill

Registered: Apr 2002
Posts: 2852
Quoting tlr
what about the parent scope, or an absolute reference, i.e from the global scope?
Just a quick shot without thinking much about it, but what about a ".." prefix to go up/out one scope, similar to traversing folder structures? Would be something like "..outer.inner" to reach a same-level scope's inner symbol. Could be enhanced for "..." to go up two scopes, etc.

A fully qualified path starting from the global scope could be prefixed with ":", e.g., ":scope.child.grandchild".

@p.* and @g.* sure are not pretty. :)
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
csio/monarchy c+4
psych
kbs/Pht/Lxt
tubesockor
Dymo/G★P
Linus/MSL
Mace/Xenon
El Jefe/Slackers
Bieno/Commodore Plus
E$G/hOKUtO fOrcE
niallquinn
VIC/Camelot
q0w/ATL
JEZ
Harry/Alivers
Sentinel/Excess/TREX
Guests online: 152
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 Layers  (9.6)
4 Cubic Dream  (9.6)
5 Copper Booze  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Rainbow Connection  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Booze Design  (9.3)
3 Nostalgia  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.8)
4 Acidchild  (9.7)
5 Starlight  (9.6)

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