| |
Mace
Registered: May 2002 Posts: 1799 |
What assembler/compiler are you using?
Since I kind of switched from 64TASS to Kick Assembler, I was wondering what the other coders use as coding tool?
Still working on the C64 with TASM or do you use one of the cross development compilers?
|
|
... 47 posts hidden. Click here to view all posts.... |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Ervin: Actually, it is possible to do what you want to do in ca65, but I know of only one specific way:
.macro makeident lname, count
.ident(.concat(lname,.sprintf("%d", count))):
.endmacro
Using a macro like this it's possible to create labels using a repeat counter.
.repeat $100, I
.makeident "foo", I
lda $1000 + I
sta $2000 + I
.endrepeat
This produces the following code:
foo0:
lda $1000
sta $2000
foo1:
lda $1001
sta $2001
foo2:
[...]
|
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
@Radiant: I added that to codebase. Thought it may be useful to someone (and I want to remember it myself). |
| |
bert64 Account closed
Registered: Jan 2010 Posts: 2 |
I guess I'm old-school, but I use Buddy on WinVICE with 16MB ram expander enabled and Jiffy-DOS roms. My c64 programs first save all ZP, source, Buddy, etc. memory to expander and put it back in the end. Doesn't take much code to do this. That way I can still use nearly the entire 64K for the program code and can actually get things done in a single lifetime. I've tried cross-compiling but I guess it's just not for me, although ReLaunch/KickASS is a nice mix. Too much commit charge, though.
There's just something about coding directly on the 64 that feels good. Almost forgot--I usually open two or three Win VICE instances at a time, one with AR6 or Warpspeed enabled. It helps. |
| |
yago
Registered: May 2002 Posts: 333 |
on k2asm, codegeneration (incl. labels) would go like this
#pybegin
for i in range(0,10):
print "foo"+str(i)+":"
print "lda $1000+",i
print "sta $1000+",i
#pyend
would produce same code as radiantx ca65 example
(one can also use external (non-python) code-generators, but thats for the heavy stuff) |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
The KickAssembler approach would be to put the memory positions in a list:
.var list = List()
.for (var i=0; i<100; i++) {
.eval list.add(*)
lda $1000+i
sta $1000+i
}
.for (var i=0;i<list.size(); i++) .word list.get(i)
(Kind of illustrates the difference between a preprocessing script and an integrated script - here we put the actual memvalue in a list) |
| |
Graham Account closed
Registered: Dec 2002 Posts: 990 |
And the Graham Assembler does the code generator in 6502 asm.
|
| |
Slammer
Registered: Feb 2004 Posts: 416 |
Large unrolled loops in an trackmo is ofcause best done by doing an unroll routine. However this workcycle works for me:
1. Make the code fast with unrolled loops by the assembler and see that it works
2. Declare the loop code 'virtuel' so it isn't stored in memory and create functions that generates the loop code.
This makes the development more rapid and the assembler calculates the amount of memory an unrolled loop needs so they are automaticly placed right after each other.
|
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
I use Graham Asm aswell, as a bonus you dont have to do the work twice. |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
Can anybody tell me where I can download this Graham Assembler? Does he take up more than one floppy disc and does he have a good manual? |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
I always carefully plan out the speedcode before coding anything, so at the coding stage I already know what I'm doing, there's no need to experiment with scripting. Also I have written already like a hundred code generators, so its not a problem to make the 101th.
Anyway tastes & habits are different. Two years ago I was still writing code in winvice in turbo sss :) also I can see how freakin cool KickAss is & that I'm an old dinosaur. |
Previous - 1 | 2 | 3 | 4 | 5 | 6 - Next |