1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-10-21 17:24:39 +00:00
kickc/src/test/ref/test-comments-block.asm
jespergravgaard 667cbde56f Added a lot of optimizing fragments using illegal opcodes (Thanks Travis Fisher!)
Added synth rule for vubc's.Updated tests.
2019-03-26 23:49:45 +01:00

38 lines
687 B
NASM

/* Tests that block comments are compiled correctly
* Has a bunch of comments that will be moved into the generated ASM
*/
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
// The C64 screen
.label SCREEN = $400
// One of the bytes used for addition
.const a = 'a'
/* The program entry point */
main: {
ldy #0
ldx #0
// Do some sums
b1:
txa
jsr sum
// Output the result on the screen
sta SCREEN,y
iny
inx
cpx #$b
bne b1
rts
}
/** Adds up two bytes and returns the result
* a - the first byte
* b - the second byte
* Returns the sum pf the two bytes
*/
// sum(byte register(A) b)
sum: {
clc
adc #a
rts
}