| |
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.... |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
Javadoc doesn't make sense for KickAss, since it's not a Java API, but a program that interprets something very different. Too bad there still don't seem to be any perfect solutions for writing a document in PDF and HTML in one go. But I think HTML would be sufficient. PDF is mostly targeted for printing, but who really needs that? |
| |
TWW
Registered: Jul 2009 Posts: 542 |
Question:
Is there a fancyschmancy way to do this:
.const SomeString = "abcdef"+toHexString($1234)
Thus producing the new string: "abcdef4r"
where "4r" is a lo-hi byte (as it would go into memory) presentation of $1234 ($34 = "4" & $12 = "r")?
Oh and a minor suggestion: Please index your manual for kickass. links and a content list on the side would make the manual world class ;-) |
| |
ruk
Registered: Jan 2012 Posts: 43 |
@TWW
On the top of my head, and I bet there exists a fancier way =)
.const table = "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ !\"#$%&'()*+,-./0123456789:;<=>?"
.function byteToString(val){
.return table.charAt(val).string()
}
.function wordToString(val){
.return byteToString(<val) + byteToString(>val)
}
.const SomeString = "ABCDEF" + wordToString($1234)
.print SomeString
|
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
@Ruk: That would of course require a 256 chars long table to avoid index out of bound. |
| |
ruk
Registered: Jan 2012 Posts: 43 |
@Cruzer
It was merely a proof of concept. But yes, it will break easily. AND:ing 'val' with $3F keeps you in range I suppose =) |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
TWW: Im working on a new setup for the manual. Clickable table of contents and clickable list of directives are part of it.
Overkill?, Perhaps so. But Word have been bugging me for some time now, and integrating pdf+html generation in the builder will make new releases easier in the long run. |
| |
TWW
Registered: Jul 2009 Posts: 542 |
@ Ruk: Thanx for pointing me in the right direction. I can do hi and lobytes from $00 to $40 8-D.
I'm not sure how I would succeed with and'ing to rid the two MSBs though. Is there a way to build the complete tabel somehow instead of manually typing it?
@ Cruiser: Yeah, and how to fricking fill in the rest of the "special and inverted characters".
@ Slammer: Nice! Looking forward to it. It's a good manual.
So I then have a refined question;
Is there a way to go from a byte (00-ff) to the corresponding petscii character without using a lookup table within the script language (probably not but can't hurt to ask)?
ex:
.print char(0) = "@"
.print char(3) = "C"
etc. |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
@TWW: Yeah, that's what I was thinking from the start. :)
@Slammer: KickAss IS overkill, that's what makes it awesome :) |
| |
Conrad
Registered: Nov 2006 Posts: 839 |
Found another possible bug(?)...
I'm using KickAss (version V3.25) on a linux system (SlackoPuppy)... via the commandline:
"java -jar /mnt/sda3/CBM/TOOLS/KickAssembler/KickAss.jar -maxaddr -1 -aom -binfile -o /mnt/sda3/OC_SERVER/CBM/test.crt %f"
("OC_SERVER" is a mounted directory to a shared network drive of my Windwos PC, where WinVice is installed.)
The source I compile should output a large crt (EasyFlash format) which is roughly 129K... but when compiling the output binary through this shared network drive, it outputs around 69K (i.e. loss of file data).
Compiling the binary locally and then copying that file across to the network drive works fine.
I don't know if this is a Linux-Windows issue or not. When mounting the network drive, I use "nounix" and "noserverino" as parameters. |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
>The source I compile should output a large crt (EasyFlash format) which is roughly 129K... but when compiling the output binary through this shared network drive, it outputs around 69K (i.e. loss of file data).
I assume you get no error messages. Since it outputs 69k it seams like you have set the maxAddr correctly.
1. Is the output cut when you compile it normally (no network drive, no binary)?
2. Is the output cut when you compile it as a binary?
3. Is the output cut when you compile it as a binary on the networkdrive?
(Also check if the code reallly should be 69k)
If 1 or 2 fails, i'll need some failing code to see whats wrong.
|
Previous - 1 | ... | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | ... | 61 - Next |