mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-12-21 14:30:21 +00:00
- Updated test cases
This commit is contained in:
parent
70012690dd
commit
663a439c34
@ -69,6 +69,7 @@ plus: {
|
|||||||
}
|
}
|
||||||
.segment Code
|
.segment Code
|
||||||
// char min(char a, char b)
|
// char min(char a, char b)
|
||||||
|
// banked : bank area='cx16_ram', bank=1
|
||||||
min: {
|
min: {
|
||||||
.label return = plus.a+plus.b
|
.label return = plus.a+plus.b
|
||||||
rts
|
rts
|
||||||
|
@ -220,10 +220,10 @@ Uplift Scope [plus]
|
|||||||
Uplift Scope [min]
|
Uplift Scope [min]
|
||||||
Uplift Scope []
|
Uplift Scope []
|
||||||
|
|
||||||
Uplifting [main] best 90 combination
|
Uplifting [main] best 93 combination
|
||||||
Uplifting [plus] best 90 combination
|
Uplifting [plus] best 93 combination
|
||||||
Uplifting [min] best 90 combination
|
Uplifting [min] best 93 combination
|
||||||
Uplifting [] best 90 combination
|
Uplifting [] best 93 combination
|
||||||
|
|
||||||
ASSEMBLER BEFORE OPTIMIZATION
|
ASSEMBLER BEFORE OPTIMIZATION
|
||||||
// File Comments
|
// File Comments
|
||||||
@ -277,9 +277,10 @@ main: {
|
|||||||
// [1] call plus
|
// [1] call plus
|
||||||
// [4] phi from main to plus [phi:main->plus] -- call_phi_close_cx16_ram
|
// [4] phi from main to plus [phi:main->plus] -- call_phi_close_cx16_ram
|
||||||
plus_from_main:
|
plus_from_main:
|
||||||
|
lda.z 0
|
||||||
|
pha
|
||||||
lda #1
|
lda #1
|
||||||
sta.z 0
|
sta.z 0
|
||||||
pha
|
|
||||||
jsr plus
|
jsr plus
|
||||||
pla
|
pla
|
||||||
sta.z 0
|
sta.z 0
|
||||||
@ -298,6 +299,7 @@ main: {
|
|||||||
.segment RAM_Bank1
|
.segment RAM_Bank1
|
||||||
// plus
|
// plus
|
||||||
// char plus(char a, char b)
|
// char plus(char a, char b)
|
||||||
|
// banked : bank area='cx16_ram', bank=1
|
||||||
plus: {
|
plus: {
|
||||||
.label a = '0'
|
.label a = '0'
|
||||||
.label b = 7
|
.label b = 7
|
||||||
@ -314,6 +316,7 @@ plus: {
|
|||||||
.segment Code
|
.segment Code
|
||||||
// min
|
// min
|
||||||
// char min(char a, char b)
|
// char min(char a, char b)
|
||||||
|
// banked : bank area='cx16_ram', bank=1
|
||||||
min: {
|
min: {
|
||||||
.label return = plus.a+plus.b
|
.label return = plus.a+plus.b
|
||||||
jmp __breturn
|
jmp __breturn
|
||||||
@ -356,7 +359,7 @@ char plus::return
|
|||||||
|
|
||||||
|
|
||||||
FINAL ASSEMBLER
|
FINAL ASSEMBLER
|
||||||
Score: 51
|
Score: 54
|
||||||
|
|
||||||
// File Comments
|
// File Comments
|
||||||
/**
|
/**
|
||||||
@ -409,9 +412,10 @@ main: {
|
|||||||
// plus('0', 7)
|
// plus('0', 7)
|
||||||
// [1] call plus
|
// [1] call plus
|
||||||
// [4] phi from main to plus [phi:main->plus] -- call_phi_close_cx16_ram
|
// [4] phi from main to plus [phi:main->plus] -- call_phi_close_cx16_ram
|
||||||
|
lda.z 0
|
||||||
|
pha
|
||||||
lda #1
|
lda #1
|
||||||
sta.z 0
|
sta.z 0
|
||||||
pha
|
|
||||||
jsr plus
|
jsr plus
|
||||||
pla
|
pla
|
||||||
sta.z 0
|
sta.z 0
|
||||||
@ -428,6 +432,7 @@ main: {
|
|||||||
.segment RAM_Bank1
|
.segment RAM_Bank1
|
||||||
// plus
|
// plus
|
||||||
// char plus(char a, char b)
|
// char plus(char a, char b)
|
||||||
|
// banked : bank area='cx16_ram', bank=1
|
||||||
plus: {
|
plus: {
|
||||||
.label a = '0'
|
.label a = '0'
|
||||||
.label b = 7
|
.label b = 7
|
||||||
@ -443,6 +448,7 @@ plus: {
|
|||||||
.segment Code
|
.segment Code
|
||||||
// min
|
// min
|
||||||
// char min(char a, char b)
|
// char min(char a, char b)
|
||||||
|
// banked : bank area='cx16_ram', bank=1
|
||||||
min: {
|
min: {
|
||||||
.label return = plus.a+plus.b
|
.label return = plus.a+plus.b
|
||||||
// min::@return
|
// min::@return
|
||||||
|
Loading…
Reference in New Issue
Block a user