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 > 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..
 
... 590 posts hidden. Click here to view all posts....
 
2013-03-22 17:04
chatGPZ

Registered: Dec 2001
Posts: 11118
mmmmh. whats the difference between a struct and a namespace then? *shrug*
2013-03-22 20:32
Pantaloon

Registered: Aug 2003
Posts: 124
groepaz, you dont know the difference between namespace & structs ? i hope you are trolling :)
2013-03-22 21:10
Cruzer

Registered: Dec 2001
Posts: 1048
Groepaz doesn't even know the difference between .align and .fill :P
2013-03-22 21:45
Oswald

Registered: Apr 2002
Posts: 5018
Probably I'm off with this here, but do we really need all this mumbo jumbo for some simple 8 bit demo effects? Namespaces, structs, macros and whatnots ? :) Anyway its just probably only me still stuck in '96 or so, it would be nice to see some examples on how are these *really* useful. when it comes cycle counting and it comes to that even with non timing critical code, you'll WANT to see the code. Speedcode generators have to be written eventually when linking the demo (so why write once a macro, once a real version?)

etc..
2013-03-22 22:53
Slammer

Registered: Feb 2004
Posts: 416
Pantaloon: Yeah, Obviosly trolling :-)

Oswald: No you don't need it, but it can make life easier. Just take the things you find useful into your programming routine and ignore the things that doesn't appeal to you.
2013-03-25 02:55
TWW

Registered: Jul 2009
Posts: 541
Hiho


Got a strange error:

                        .eval BMPByte = BMPByte|[BMPPattern << [6 - Pixel*2]]
                                                            ^

Error: Unknown function : <<


The code itself comes from this loop:

                .for (var Pixel = 0 ; Pixel < 4 ; Pixel++) {
                        .eval PixelColor = Graphics.getPixel([[8*BlockNumber]+[[Pixel<<1]&7]]-[320*[floor(BlockNumber/40)]] , [8*floor(BlockNumber/40)]+Byte)
                        .eval BMPPattern = ColorIndex.get(PixelColor)
                        .eval BMPByte = BMPByte|[BMPPattern << [6 - Pixel*2]]
                }


Which is inside a macro which I call 3 times and no problems but the 4th, this occurs.

If I reuse the macro a 4th time with earlier parameters, it works fine so it's something with the data processed the 4th time which makes it kneel.

Ideas?


EDIT: Found it. Wrong pallette in the gfx. Pro'lly caused some invalid data to be processed.
2013-04-16 07:37
Carlos
Account closed

Registered: Mar 2009
Posts: 15
Which is the most efficient way to do a simple multiplication (8bit operands and product) in KickAss? i mean without using tables.

The operands are not constant numbers instead variables (zeropage normally).

I have checked:

.function mul(op1,op2)
{
.return op1*op2
}

but this multiplies the value (address) of op1 and op2 not the value that are referenced by these address.

2013-04-16 08:20
Pantaloon

Registered: Aug 2003
Posts: 124
You can't. You can see kickasm as a preprocessor only.
2013-04-16 10:06
Cruzer

Registered: Dec 2001
Posts: 1048
Yup, the scripting language doesn't compile to c64 code. So a multiplication routine in KickAss would be pretty similar to any other assembler.
2013-04-16 12:11
Oswald

Registered: Apr 2002
Posts: 5018
in the manual it should be made clear that Kickass will not compile stuff like this into multiplications and other magic stuff for you.

Maybe it would be a good idea though to create such a macro library tho, pseudo commands for mul/div, etc. it looks like there's a need.
Previous - 1 | ... | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | ... | 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
TheRyk/MYD!
wacek/arise
E$G/hOKUtO fOrcE
Frost/Triad
Frida Katarina
Jazzcat/Onslaught
Alakran_64
Andy/AEG
Viti/Hokuto Force
Sentinel/Excess/TREX
Dr. Doom/RAD
Guests online: 113
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 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (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 NTSC-Fixers
1 Pudwerx  (10)
2 Booze  (9.7)
3 Stormbringer  (9.7)
4 Fungus  (9.6)
5 Grim Reaper  (9.3)

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