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


Forums > C64 Coding > Question about Kickassembler 5.2 compilation process
2018-12-28 17:43
Antu Manthureie

Registered: Oct 2007
Posts: 4
Question about Kickassembler 5.2 compilation process

Hi, I recently discovered Kickassembler 5.2 and I'm using it in a project for a c64 videogame.
I have used extensively macros and structs and so far I have come down little to the assembler level: the project seems almost written in pseudo-C without pointers :).
I created several .asm files, each corresponding to a functional module (Actor.asm to define the NPCs behaviour an state, Game.asm to organize the game loop etc.) and I created a main.asm file to launch the game.
As long as I try to build individual .asm files I have no problems, but when I run the build on main.asm which is the entry point for the code flow, the compiler hangs on the first flex pass and does not go on.
I wanted to know if anyone in the community has ever encountered a similar problem and I wonder if this is not due to some difficulty of the compiler to find some missing reference to move on to the next steps.
I have no way of carrying out control .print in phase 1, is this true?

Thanks for the help, have a nice day!
2018-12-28 19:09
Antu Manthureie

Registered: Oct 2007
Posts: 4
After a session of manual code trace, I've discovered that if I use while like this in the main game loop:

.macro Game_runLoop(this){
	.var inputData = InputData()
	.while(Game_mustGoOn(this)){ 
		:Game_processInput(inputData)
		:Game_update(this, inputData)
		:Game_prepareScene(this)
		:Game_prepareActiveElements(this)
		:Graphics_render()
	}	
}
.function Game_mustGoOn(this){
	.return this.player.state.stateID != "S_PLAYER_DEAD";
}


the compiler hangs on flex pass 1.
2018-12-28 21:11
Frantic

Registered: Mar 2003
Posts: 1369
Not sure, but it seems like you're confusing runtime and compile time code. The while loop that waits for player dead or not sounds like something that should be executed at runtime, but the macro code is obviously executed at compile time.
2018-12-28 22:18
Antu Manthureie

Registered: Oct 2007
Posts: 4
Quote:
but it seems like you're confusing runtime and compile time code


Oops ... I think I totally misunderstood the fact that .macro means a real macro, which is expanded at compile time! :( Thank you so much Frantic for pointing it out to me, I have not written code for a long time and I need some practice.
2018-12-28 23:31
Cruzer

Registered: Dec 2001
Posts: 995
A lot of n00bs make this error at first. "Wow, this looks just like a high level language. Guess I don't need to write asm code anymore."

But in reality, you need to learn asm coding first, and then you can use some of the high level functionality to help you with some of the repetitive tasks.

If you're looking for a high level language that can compile to machine code that runs with a decent speed there is the KickC project by Rex/CML. Disclaimer: Still in beta, and I haven't even tried it yet.
2018-12-29 11:02
Antu Manthureie

Registered: Oct 2007
Posts: 4
Thank you Cruzer, anyway
I think I will insist with assembler code.
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
JackAsser/Booze Design
Viza/Hokuto Force
Skate/Plush
Zirias/Excess
Guests online: 51
Top Demos
1 Unboxed  (9.7)
2 Uncensored  (9.7)
3 Edge of Disgrace  (9.7)
4 Coma Light 13  (9.6)
5 Comaland 100%  (9.6)
6 The Shores of Reflec..  (9.6)
7 Lunatico  (9.6)
8 Wonderland XII  (9.6)
9 C=Bit 18  (9.6)
10 X Marks the Spot  (9.5)
Top onefile Demos
1 Smile to the Sky  (9.6)
2 Daah, Those Acid Pil..  (9.5)
3 Dawnfall V1.1  (9.4)
4 FMX Music Demo  (9.4)
5 Crystal Gazer  (9.4)
6 Rewind  (9.4)
7 Pandemoniac Part 2 o..  (9.4)
8 Official X2018 Report  (9.4)
9 Arok 20 Invitation  (9.4)
10 Party Horse  (9.3)
Top Groups
1 PriorArt  (9.7)
2 Performers  (9.5)
3 Oxyron  (9.5)
4 Booze Design  (9.4)
5 Censor Design  (9.3)
Top NTSC-Fixers
1 Pudwerx  (10)
2 Horizon  (9.8)
3 The Mind Slayer  (9.8)
4 The Shadow  (9.7)
5 Stormbringer  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2019
Page generated in: 0.047 sec.