mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-02-25 02:29:36 +00:00
Working on fixing test errors - 202/350 working.
This commit is contained in:
parent
cab95b6ba5
commit
21b3114b58
19
src/test/ref/const-int-cast-problem.asm
Normal file
19
src/test/ref/const-int-cast-problem.asm
Normal 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
|
||||||
|
}
|
16
src/test/ref/helloworld0.asm
Normal file
16
src/test/ref/helloworld0.asm
Normal 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!@"
|
12
src/test/ref/tod018-problem.asm
Normal file
12
src/test/ref/tod018-problem.asm
Normal 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
|
||||||
|
}
|
12
src/test/ref/typeid-plus-byte-problem.asm
Normal file
12
src/test/ref/typeid-plus-byte-problem.asm
Normal 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
|
||||||
|
}
|
7
src/test/ref/typemismatch.asm
Normal file
7
src/test/ref/typemismatch.asm
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
// Type mismatch - should fail gracefully
|
||||||
|
.pc = $801 "Basic"
|
||||||
|
:BasicUpstart(main)
|
||||||
|
.pc = $80d "Program"
|
||||||
|
main: {
|
||||||
|
rts
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user