2. Differences in syntax

There is a small change in the syntax between version 3.x and 4.x, which means that some code might not compile right away - but don't worry, we made a converter to convert sources to the new syntax and have a command line option that will make most code run.

In Kick Assembler 3.x the assembler automatically knows when one command ends and another begins. This means you can write several commands in one line like this:

    sei lda #$1b sta $d011 lda #$32 sta $d012  

In version 4.x you have to separate commands by either a line shift or a semicolon. So in version 4.x the above looks like this:

    sei; lda #$1b; sta $d011; lda #$32; sta $d012 

In general, this is not a problem since you usually put each mnemonic on a separate line. If you want a command to span several lines, use a parenthesis (hard or soft). Since KickAssembler balances the parenthesis sets, only newlines on the outer level will terminate the command so you can write like this:

lda #(
     7 * calculateSomething(a,b)
     + 3 * calculateSomeMore(x,y,z)

The use of semicolon to terminate commands collide with the old pseudo commands which use the semicolon to separate its arguments. To be compatible with old pseudo commands, use the -pseudo3x option at the command line. You will not be able to write several commands after a pseudocommand call, but your old code will compile. A better option is to convert your code to the new syntax where all semicolons are changed to normal colons. (You can use the converter enclosed in the KickAssembler zip file):

// Pseudocommand calls in V3.x
:mov #10 ; data,x

// Pseudocommand calls in V4.x
mov #10 : data,x               // The colon in front is now optional