The following items are translations from higher-level language patterns to low-level assembly language. This can be used as a guide to maintain code standardisation.

The examples are in Kick Assembler format. More patterns will be added in the future.

Logic

If-then-else

A = 10 : IF A = 15 THEN ... ELSE ...

				lda #10
				cmp #15
				bne else
				...         # if code
				jmp ifdone

else:           ...         # else code
ifdone:         ...         # rest of program

Math

References

  1. http://www.6502.org/tutorials/compare_instructions.html
  2. http://www.6502.org/tutorials/65c02opcodes.html