Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user hoist ! (Registered 2024-10-04) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Kick Assembler Thread 2
2009-07-21 17:20
Slammer

Registered: Feb 2004
Posts: 416
Kick Assembler Thread 2

The previous thread took a little long to load, so this is a new fresh one..
 
... 592 posts hidden. Click here to view all posts....
 
2010-05-21 04:08
Oswald

Registered: Apr 2002
Posts: 5078
fancymansy way in graham ass (took 5 minutes):

*= $1000

x = $f0
y = $f1

speedcode = $4000
labelslo = $c000
labelshi = $c028

sei

jsr makespeed

ldx column
lda labelslo,x
sta self+1
lda labelshi,x
sta self+2

self jsr speedcode

jmp *

makespeed
lda #0
sta x
sta y

lda #<speedcode
sta $fc
lda #>speedcode
sta $fd

loop2

ldx x
lda $fc
sta labelslo,x
lda $fd
sta labelshi,x

loop1

lda y
asl
tay
lda mul40,y
clc
adc x
sta $fa
lda mul40+1,y
adc #>$d800
sta $fb

ldy #$00 ;lda $d801
lda c0
sta ($fc),y
iny
lda $fa
clc
adc #$01
sta ($fc),y
iny
lda $fb
adc #$00
sta ($fc),y
iny

lda c1 ;sta $d800
sta ($fc),y
iny
lda $fa
sta ($fc),y
iny
lda $fb
sta ($fc),y
iny

tya
clc
adc $fc
sta $fc
bcc *+4
inc $fd

inc y
lda y
cmp #25
bne loop1

ldy #$00
lda #$60
sta ($fc),y ; rts

inc $fc
bne *+4
inc $fd

lda #0
sta y

inc x
lda x
cmp #40
bne loop2

rts

c0 lda $d800
c1 sta $d800

mul40 .word 0,40,80,120,160,200,240,280,320,360,400,440,480,520,560,600,640,680,720,760,800, 840,880,920,960
2010-05-21 07:14
Pantaloon

Registered: Aug 2003
Posts: 124
.pc = * "Collor Puller Routine" CollPull:

.var l = List()

.for (y=0;y<25;y++)
{
.eval l = l.add(*)
.for (x=0;x<39;x++)
{
lda $d801+x+[y*40]
sta $d800+x+[y*40]
}
rts

}


lotable:
.fill l.size(), <l.get(i)

hitable:
.fill l.size(), >l.get(i)


and use like this

// y contains the row
ldy #$00
lda lotable,y
sta jsra+1
lda hitable,y
sta jsra+2
jsra: jsr $0000

or from script

jsr l.get(0)
2010-05-21 09:31
Pantaloon

Registered: Aug 2003
Posts: 124
Slammer:

Would it be possible to add a new script command in kickasm, something like this:

.var data = .system "myprog.exe " + cmdlineString

so it's possible to call an external program while kickasm is doing the scriptjob ?
2010-05-21 13:01
Slammer

Registered: Feb 2004
Posts: 416
Yep, absolutely. One of the long term goals of creating v3 was making an architecture that made things like this possible. However, im a bit busy at the moment so don't expect it soon.

2010-05-22 01:08
TWW

Registered: Jul 2009
Posts: 543
Oswald/Pantalon:

I was thinking more in the lines of modifications of labels inside scopes / loops. Not Self Modifying speedcode or lookup-tables.

So to rephrase;

can I do something like:


.for (y=0;y<5;y++) {

.label mylabel+toIntString(y)

//Do something

}

and get the assembler to generate 5 labels (mylabel1 to mylabel 5) for my 5 Do something routines?
2010-05-22 10:55
Pantaloon

Registered: Aug 2003
Posts: 124
well, thats now how kickassembler works, just store the programCounter in a list and use it that way, its the same as working with labels just a different syntax really. instead of doing something mylabel you do something mylabels(labelindex).
2010-05-22 13:00
TWW

Registered: Jul 2009
Posts: 543
Alright I see now.

Thanx.

-TWW
2010-06-17 19:34
Pantaloon

Registered: Aug 2003
Posts: 124
Slammer:

can you add something like .ifdefined(myvar) , it would be very useful to check if a variable has been declared when using alot of small source files.

and i found a bug, if you use the .import directive inside an if statement it doesnt compile.

ie.

.if (LINK == true)
{
.import source "MySourceFile.s"
}

-P
2010-06-18 16:52
Slammer

Registered: Feb 2004
Posts: 416
Some kind of ifdefined is already on the todo-list - I'll prioritize it a bit higher.

Right now the development is on a hold i'm afraid. I have to replace my old development computer.
2010-06-18 19:19
Pantaloon

Registered: Aug 2003
Posts: 124
nice!, hope you get a new computer soon :)
Previous - 1 | ... | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | ... | 61 - 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
Guests online: 37
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 Uncensored  (9.6)
7 Wonderland XIV  (9.6)
8 Comaland 100%  (9.6)
9 No Bounds  (9.6)
10 Unboxed  (9.5)
Top onefile Demos
1 Layers  (9.6)
2 Party Elk 2  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 It's More Fun to Com..  (9.5)
7 Morph  (9.5)
8 Dawnfall V1.1  (9.5)
9 Onscreen 5k  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Oxyron  (9.3)
3 Performers  (9.3)
4 Nostalgia  (9.3)
5 Censor Design  (9.3)
Top Webmasters
1 Slaygon  (9.6)
2 Perff  (9.6)
3 Morpheus  (9.5)
4 Sabbi  (9.5)
5 CreaMD  (9.1)

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