1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-23 08:32:39 +00:00

Working on fixing test errors - 202/350 working.

This commit is contained in:
jespergravgaard 2019-05-07 23:39:57 +02:00
parent cab95b6ba5
commit 21b3114b58
5 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,19 @@
// Test a problem with converting casted constant numbers to fixed type constant integers
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label SCREEN = $400
main: {
ldx #$79
b1:
txa
lsr
lsr
lsr
lsr
sta SCREEN,x
inx
cpx #$7b
bne b1
rts
}

View File

@ -0,0 +1,16 @@
// Tests minimal hello world
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label SCREEN = $400
main: {
ldx #0
b1:
lda msg,x
sta SCREEN,x
inx
cpx #$c
bne b1
rts
}
msg: .text "hello world!@"

View File

@ -0,0 +1,12 @@
// Tests a problem with tod018 not calculating types correctly
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
main: {
.label D018 = $d018
.label screen = $400
.const d018val = >screen&$3fff
lda #d018val
sta D018
rts
}

View File

@ -0,0 +1,12 @@
// Test that byte+byte creates a byte - even when there is a value overflow
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label SCREEN = $400
main: {
.const ubc2 = $fa
.const ubc1 = $c+$d+$e
lda #ubc1+ubc2
sta SCREEN
rts
}

View File

@ -0,0 +1,7 @@
// Type mismatch - should fail gracefully
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
main: {
rts
}