Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user nurd ! (Registered 2024-06-16) 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....
 
2011-10-05 15:42
Cruzer

Registered: Dec 2001
Posts: 1048
TWW: Why not use a parameter for that?
2011-10-05 17:04
TWW

Registered: Jul 2009
Posts: 541
That's what I'm currently doing so yes, this is a luxory feature request 8-D
2011-10-05 17:09
tlr

Registered: Sep 2003
Posts: 1731
I thought I'd post a few things I've run in to lately. If the suggestions are too crazy, feel free to disregard them. :)

1:
I tried just now to write a file format header using kick assembler and discovered that there is no pseudo op to output ascii. (.text converts lower case to screen codes.)
	.ascii	"Header Ident!"
	.byte	0
That would be useful!


2:
Consider this:
	.pc = $1000
start:
	lda	#<msg
	ldy	#>msg
	jmp	$ab1e
	
msg:
	.text	"LEN $"+toHexString(end-start)
	.byte	0
end:
In this example toHexString() will generate lowercase, which is fine. However how do I convert it automatically to upper case? A custom to_upper(str) will fail because the string isn't fully resolved in the first pass.


3, A suggestion:
It would be useful to be able to generate UC-mode/LC-mode screen codes/petscii in some structured way.
   .text_u "HELLO WORLD!"
   .text_l "Hello World!"
   .scr_u "HELLO WORLD!"
   .scr_l "Hello World!"
A function wrapper could be a substitute, but see 2 above.


4, another suggestion:
It would be useful to be able to mix bytes and strings.
   .text "STRING",0
   .byte TOKEN_SYS,"2061",0,0,0
I guess some of this could be emulated with macros, but I usually prefer the short form.
2011-10-05 17:37
TWW

Registered: Jul 2009
Posts: 541
tlr: Good suggests!


Cruzer: Just to add: I find it a bit akward to use numerical parameters to pass on to a pseudo which should dictate what way it should operate.

i.e:

:MUL "S" ; #$04 ; #$10 ; $1000

would work fine but since I can't pass strings and you need to remeber that 1 = signed and 2 = unsigned etc. it doesen't look and feel that tidy to me anymore.

So: just allow a suffix to be passed OR allow passing of strings and it's all Rock and Roll Rulletobakk after that.
2011-10-05 18:20
Slammer

Registered: Feb 2004
Posts: 416
You can allready use _ in commandnames. Why don't you use two extra lines to define the two pseudo commands:
.pseudocommand MUL_S a ; b ; tar { :MUL 1 ; a ; b ; tar}
.pseudocommand MUL_U a ; b ; tar { :MUL -1 ; a ; b ; tar}
.pseudocommand MUL sign ; a ; b ; tar {

/* CODE..  
Use .if (sign==1) {...} etc. 
*/

}
2011-10-05 18:30
Slammer

Registered: Feb 2004
Posts: 416
Thanks for the suggestions.. I have had several whishes for uppercase/lowercase selection so that will be put high on the list.
2011-10-05 19:11
tlr

Registered: Sep 2003
Posts: 1731
Quote: Thanks for the suggestions.. I have had several whishes for uppercase/lowercase selection so that will be put high on the list.

Great!

In case it wasn't clear enough:
in 3 I am suggesting that .text_u generates petscii suitable for printing with the uppercase charset, and .text_l generates the same suitable for printing with the lowercase charset.
.scr_u and .scr_l does the same but with screen code output.

In 1 I mean plain ASCII, or perhaps ISO-8859-1.

In 2 either some kind of conversion function, or better yet, solve the resolution problem in some way.
2011-10-05 19:55
TWW

Registered: Jul 2009
Posts: 541


Halleluja! Ask slammer and he has a way!!!

Beers on me if we ever meet!


About the ".ifdefined" thing, any news about this?
2011-10-06 21:51
Slammer

Registered: Feb 2004
Posts: 416
No .ifdefined yet. What are you going to use it for?
2011-10-06 22:38
TWW

Registered: Jul 2009
Posts: 541
F.ex:

I want a spudocommand/routine to behave in three different ways:

#1 - Set a global constant (ex: .const SafeMode = 1) which the automatically preserves all registers within pseudocommands.

#2 - Call up a pseudo with a SafeMode setting which then might overrrule the global setting to allow individual routines behave differently if I so choose.

#3 - If none of them are defined, force a default mode


So basically I want to check if a Constant or a Variable is defined from before.

However I am sure, by your question, you already got a(nother) method to do this^^
Previous - 1 | ... | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | ... | 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
CA$H/TRiAD
MAT64
The Phantom
MCM/ONSLAUGHT
Operator Teleksu
Guests online: 99
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.7)
6 Aliens in Wonderland  (9.6)
7 Comaland 100%  (9.6)
8 No Bounds  (9.6)
9 Uncensored  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 It's More Fun to Com..  (9.5)
7 Dawnfall V1.1  (9.5)
8 Daah, Those Acid Pil..  (9.5)
9 Birth of a Flower  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 SHAPE  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 Tim  (9.7)

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