| |
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.... |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
If you use an editor that uses nonstandard codes for lineshift the linecomment won't be terminated.
Try using a different editor and examine the file with an hexeditor. |
| |
Iapetus/Algarbi/Wood
Registered: Dec 2004 Posts: 71 |
I have been using scite for ages and never had problems. I clicked on "convert line end characters" under Options and it worked.
Thank you |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
Hi, My internet provider has been really unstable. This means that if you have given feedback in the form on the Kick Assembler website or written to mailaddress given in the manual the past one and and a half month I haven't recieved your mail.
It should be working now, so if you havn't recieved an answer -> write again. Sorry for the inconvenience. |
| |
Pantaloon
Registered: Aug 2003 Posts: 124 |
i just tried to post a few bugs again and the same error.
here are 2 bugs i've found tho,
1. Script
when using a Hashtable like this, .var pixelTable = Hashtable() and then using it in a loop generates this:
parsing
flex pass 1
.if (pixelTable.get(key) != null)
^
Error: Unknown function : !=
2. Reading bytes from binary files
when loading binary files like this, .var dataFile = LoadBinary("data\hiresvector\lightwave.obj")
and then reading it byte by byte using vectorFile.get(i) gives back random signs of the byte. it can be solved by doing vectorFile.get(i) & 255 so it seems kickasm is reading 32 bits and gives back 8 without clearing the other 24 bits or something.
-Pantaloon
|
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: i just tried to post a few bugs again and the same error.
here are 2 bugs i've found tho,
1. Script
when using a Hashtable like this, .var pixelTable = Hashtable() and then using it in a loop generates this:
parsing
flex pass 1
.if (pixelTable.get(key) != null)
^
Error: Unknown function : !=
2. Reading bytes from binary files
when loading binary files like this, .var dataFile = LoadBinary("data\hiresvector\lightwave.obj")
and then reading it byte by byte using vectorFile.get(i) gives back random signs of the byte. it can be solved by doing vectorFile.get(i) & 255 so it seems kickasm is reading 32 bits and gives back 8 without clearing the other 24 bits or something.
-Pantaloon
Due to Java's lack of unsigned data types a byte read from a file is always signed. When converted to an int, it's properly sign extended, and as you say, to read unsigned in Java one has to convert the byte into a larger data type, say short or int, then mask the lower 8 bits via the "and 0xff".
Would ofcourse be nice if KickAss did that for you, or assume unsigned always and add some .getSigned(i) or even .get<DataType>(i). |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
Jackasser is right. Javas byte primitive is signed and ranges from -128 to 127. I will se if I can make you an unsigned getter.
The != function should be defined for the most common object types. What objects have you stored in the table?
|
| |
Pantaloon
Registered: Aug 2003 Posts: 124 |
the hashtable entries contains a List that contains structs that are defined like this: .struct Pixel {addr,mask} |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
Ok, Here is a workaround. List hasn't got the != function right now. So use null!=pixelTable.get(key) which will call the != function on the null object instead. |
| |
Pantaloon
Registered: Aug 2003 Posts: 124 |
thx :) |
| |
TWW
Registered: Jul 2009 Posts: 543 |
Observe the folowing:
//------------------------------------------------------------------------ -------------------------------------------
//-Routine for pulling $d800 Collors.
//------------------------------------------------------------------------------ -------------------------------------
.pc = * "Collor Puller Routine"
.label coll1 = CollPull
.label coll2 = CollPull+235
.label coll3 = CollPull+235*2
.label coll4 = CollPull+235*3
.label coll5 = CollPull+235*4
.label coll6 = CollPull+235*5
.label coll7 = CollPull+235*6
.label coll8 = CollPull+235*7
.label coll9 = CollPull+235*8
.label coll10 = CollPull+235*9
.label coll11 = CollPull+235*10
.label coll12 = CollPull+235*11
.label coll13 = CollPull+235*12
.label coll14 = CollPull+235*13
.label coll15 = CollPull+235*14
.label coll16 = CollPull+235*15
.label coll17 = CollPull+235*16
.label coll18 = CollPull+235*17
.label coll19 = CollPull+235*18
.label coll20 = CollPull+235*19
.label coll21 = CollPull+235*20
.label coll22 = CollPull+235*21
.label coll23 = CollPull+235*22
.label coll24 = CollPull+235*23
.label coll25 = CollPull+235*24
CollPull:
.for (y=0;y<25;y++) {
.for (x=0;x<39;x++) {
lda $d801+x+[y*40]
sta $d800+x+[y*40]
}
rts
}
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
This allowes me to jsr collN for any of the 25 lines i need. My question is; Is there some more fancysmancy way of handling the labels in this case (Include it in the loop f.ex) something like this:
.for (y=0;y<25;y++) {
.label "coll"+toIntString(y+1)
.for (x=0;x<39;x++) {
lda $d801+x+[y*40]
sta $d800+x+[y*40]
}
rts
}
and then be able to jsr coll5 f.ex. outside the scope?
If not can I use the .label in conjunction with list() to generate the label list? |
Previous - 1 | ... | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | ... | 61 - Next |