mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-01-03 11:31:21 +00:00
Improved basic-floats.kc
This commit is contained in:
parent
a4472e0778
commit
1dd2f1ebe6
@ -3,23 +3,23 @@
|
||||
// See http://www.pagetable.com/c64rom/c64rom_sc.html
|
||||
|
||||
// Zeropage addresses used to hold lo/hi-bytes of addresses of float numbers in MEM
|
||||
const byte* memLo = $fe;
|
||||
const byte* memHi = $ff;
|
||||
const char* memLo = 0xfe;
|
||||
const char* memHi = 0xff;
|
||||
|
||||
// Prepare MEM pointers for operations using MEM
|
||||
void prepareMEM(byte* mem) {
|
||||
inline void prepareMEM(unsigned int mem) {
|
||||
*memLo = <mem;
|
||||
*memHi = >mem;
|
||||
}
|
||||
|
||||
// FAC = word
|
||||
// Set the FAC (floating point accumulator) to the integer value of a 16bit word
|
||||
void setFAC(word w) {
|
||||
prepareMEM((byte*)w);
|
||||
void setFAC(unsigned int w) {
|
||||
prepareMEM(w);
|
||||
// Load word register Y,A into FAC (floating point accumulator)
|
||||
asm {
|
||||
ldy $fe
|
||||
lda $ff
|
||||
ldy memLo
|
||||
lda memHi
|
||||
jsr $b391
|
||||
}
|
||||
}
|
||||
@ -27,14 +27,14 @@ void setFAC(word w) {
|
||||
// word = FAC
|
||||
// Get the value of the FAC (floating point accumulator) as an integer 16bit word
|
||||
// Destroys the value in the FAC in the process
|
||||
word getFAC() {
|
||||
unsigned int getFAC() {
|
||||
// Load FAC (floating point accumulator) integer part into word register Y,A
|
||||
asm {
|
||||
jsr $b1aa
|
||||
sty $fe
|
||||
sta $ff
|
||||
sty memLo
|
||||
sta memHi
|
||||
}
|
||||
word w = { *memHi, *memLo};
|
||||
unsigned int w = { *memHi, *memLo };
|
||||
return w;
|
||||
}
|
||||
|
||||
@ -57,11 +57,11 @@ void setFACtoARG() {
|
||||
// MEM = FAC
|
||||
// Stores the value of the FAC to memory
|
||||
// Stores 5 bytes (means it is necessary to allocate 5 bytes to avoid clobbering other data using eg. byte[] mem = {0, 0, 0, 0, 0};)
|
||||
void setMEMtoFAC(byte* mem) {
|
||||
prepareMEM(mem);
|
||||
void setMEMtoFAC(char* mem) {
|
||||
prepareMEM((unsigned int)mem);
|
||||
asm {
|
||||
ldx $fe
|
||||
ldy $ff
|
||||
ldx memLo
|
||||
ldy memHi
|
||||
jsr $bbd4
|
||||
}
|
||||
}
|
||||
@ -69,11 +69,11 @@ void setMEMtoFAC(byte* mem) {
|
||||
// FAC = MEM
|
||||
// Set the FAC to value from MEM (float saved in memory)
|
||||
// Reads 5 bytes
|
||||
void setFACtoMEM(byte* mem) {
|
||||
prepareMEM(mem);
|
||||
void setFACtoMEM(char* mem) {
|
||||
prepareMEM((unsigned int)mem);
|
||||
asm(clobbers "AY") {
|
||||
lda $fe
|
||||
ldy $ff
|
||||
lda memLo
|
||||
ldy memHi
|
||||
jsr $bba2
|
||||
}
|
||||
}
|
||||
@ -103,11 +103,11 @@ void setFACto2PI() {
|
||||
// ARG = MEM
|
||||
// Load the ARG from memory
|
||||
// Reads 5 bytes
|
||||
void setARGtoMEM(byte* mem) {
|
||||
prepareMEM(mem);
|
||||
void setARGtoMEM(char* mem) {
|
||||
prepareMEM((unsigned int)mem);
|
||||
asm(clobbers "AY") {
|
||||
lda $fe
|
||||
ldy $ff
|
||||
lda memLo
|
||||
ldy memHi
|
||||
jsr $ba8c
|
||||
}
|
||||
}
|
||||
@ -115,11 +115,11 @@ void setARGtoMEM(byte* mem) {
|
||||
// FAC = MEM+FAC
|
||||
// Set FAC to MEM (float saved in memory) plus FAC (float accumulator)
|
||||
// Reads 5 bytes from memory
|
||||
void addMEMtoFAC(byte* mem) {
|
||||
prepareMEM(mem);
|
||||
void addMEMtoFAC(char* mem) {
|
||||
prepareMEM((unsigned int)mem);
|
||||
asm {
|
||||
lda $fe //memLo
|
||||
ldy $ff //memHi
|
||||
lda memLo //memLo
|
||||
ldy memHi //memHi
|
||||
jsr $b867
|
||||
}
|
||||
}
|
||||
@ -135,11 +135,11 @@ void addARGtoFAC() {
|
||||
// FAC = MEM-FAC
|
||||
// Set FAC to MEM (float saved in memory) minus FAC (float accumulator)
|
||||
// Reads 5 bytes from memory
|
||||
void subFACfromMEM(byte* mem) {
|
||||
prepareMEM(mem);
|
||||
void subFACfromMEM(char* mem) {
|
||||
prepareMEM((unsigned int)mem);
|
||||
asm {
|
||||
lda $fe
|
||||
ldy $ff
|
||||
lda memLo
|
||||
ldy memHi
|
||||
jsr $b850
|
||||
}
|
||||
}
|
||||
@ -155,11 +155,11 @@ void subFACfromARG() {
|
||||
// FAC = MEM/FAC
|
||||
// Set FAC to MEM (float saved in memory) divided by FAC (float accumulator)
|
||||
// Reads 5 bytes from memory
|
||||
void divMEMbyFAC(byte* mem) {
|
||||
prepareMEM(mem);
|
||||
void divMEMbyFAC(char* mem) {
|
||||
prepareMEM((unsigned int)mem);
|
||||
asm {
|
||||
lda $fe
|
||||
ldy $ff
|
||||
lda memLo
|
||||
ldy memHi
|
||||
jsr $bb0f
|
||||
}
|
||||
}
|
||||
@ -167,11 +167,11 @@ void divMEMbyFAC(byte* mem) {
|
||||
// FAC = MEM*FAC
|
||||
// Set FAC to MEM (float saved in memory) multiplied by FAC (float accumulator)
|
||||
// Reads 5 bytes from memory
|
||||
void mulFACbyMEM(byte* mem) {
|
||||
prepareMEM(mem);
|
||||
void mulFACbyMEM(char* mem) {
|
||||
prepareMEM((unsigned int)mem);
|
||||
asm {
|
||||
lda $fe
|
||||
ldy $ff
|
||||
lda memLo
|
||||
ldy memHi
|
||||
jsr $ba28
|
||||
}
|
||||
}
|
||||
@ -179,11 +179,11 @@ void mulFACbyMEM(byte* mem) {
|
||||
// FAC = MEM^FAC
|
||||
// Set FAC to MEM (float saved in memory) raised to power of FAC (float accumulator)
|
||||
// Reads 5 bytes from memory
|
||||
void pwrMEMbyFAC(byte* mem) {
|
||||
prepareMEM(mem);
|
||||
void pwrMEMbyFAC(char* mem) {
|
||||
prepareMEM((unsigned int)mem);
|
||||
asm {
|
||||
lda $fe
|
||||
ldy $ff
|
||||
lda memLo
|
||||
ldy memHi
|
||||
jsr $bf78
|
||||
}
|
||||
}
|
||||
|
@ -36,6 +36,11 @@ public class TestPrograms {
|
||||
public TestPrograms() {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInlineAsmParam() throws IOException, URISyntaxException {
|
||||
compileAndCompare("inline-asm-param");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAtariTempest() throws IOException, URISyntaxException {
|
||||
compileAndCompare("complex/ataritempest/ataritempest");
|
||||
|
@ -2,10 +2,12 @@ byte* SCREEN = $0400;
|
||||
|
||||
void main() {
|
||||
byte a = 'a';
|
||||
asm {
|
||||
lda {a}
|
||||
sta {SCREEN}
|
||||
};
|
||||
a++;
|
||||
for( byte i:0..3) {
|
||||
asm {
|
||||
lda #'a'
|
||||
sta SCREEN
|
||||
}
|
||||
a++;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ init: {
|
||||
rts
|
||||
}
|
||||
clear_screen: {
|
||||
.label sc = $13
|
||||
.label sc = $f
|
||||
lda #<SCREEN
|
||||
sta.z sc
|
||||
lda #>SCREEN
|
||||
@ -197,15 +197,15 @@ clear_screen: {
|
||||
// - length is the length of the sine table
|
||||
// - min is the minimum value of the generated sinus
|
||||
// - max is the maximum value of the generated sinus
|
||||
// gen_sintab(byte* zeropage($13) sintab, byte zeropage(8) length, byte zeropage(6) min, byte register(X) max)
|
||||
// gen_sintab(byte* zeropage($f) sintab, byte zeropage(8) length, byte zeropage(6) min, byte register(X) max)
|
||||
gen_sintab: {
|
||||
// amplitude/2
|
||||
.label f_2pi = $e2e5
|
||||
.label _24 = $f
|
||||
.label _24 = $13
|
||||
.label i = 9
|
||||
.label min = 6
|
||||
.label length = 8
|
||||
.label sintab = $13
|
||||
.label sintab = $f
|
||||
txa
|
||||
sta.z setFAC.w
|
||||
lda #0
|
||||
@ -229,9 +229,9 @@ gen_sintab: {
|
||||
sta.z setMEMtoFAC.mem+1
|
||||
jsr setMEMtoFAC
|
||||
lda #<2
|
||||
sta.z setFAC.w
|
||||
sta.z setFAC.prepareMEM1_mem
|
||||
lda #>2
|
||||
sta.z setFAC.w+1
|
||||
sta.z setFAC.prepareMEM1_mem+1
|
||||
jsr setFAC
|
||||
lda #<f_amp
|
||||
sta.z divMEMbyFAC.mem
|
||||
@ -334,12 +334,12 @@ progress_inc: {
|
||||
// Get the value of the FAC (floating point accumulator) as an integer 16bit word
|
||||
// Destroys the value in the FAC in the process
|
||||
getFAC: {
|
||||
.label return = $f
|
||||
.label return = $13
|
||||
// Load FAC (floating point accumulator) integer part into word register Y,A
|
||||
jsr $b1aa
|
||||
sty.z $fe
|
||||
sta.z $ff
|
||||
lda memLo
|
||||
sty memLo
|
||||
sta memHi
|
||||
tya
|
||||
sta.z return
|
||||
lda memHi
|
||||
sta.z return+1
|
||||
@ -350,34 +350,26 @@ getFAC: {
|
||||
// Reads 5 bytes from memory
|
||||
addMEMtoFAC: {
|
||||
lda #<gen_sintab.f_min
|
||||
sta.z prepareMEM.mem
|
||||
lda #>gen_sintab.f_min
|
||||
sta.z prepareMEM.mem+1
|
||||
jsr prepareMEM
|
||||
lda.z $fe
|
||||
ldy.z $ff
|
||||
jsr $b867
|
||||
rts
|
||||
}
|
||||
// Prepare MEM pointers for operations using MEM
|
||||
// prepareMEM(byte* zeropage($f) mem)
|
||||
prepareMEM: {
|
||||
.label mem = $f
|
||||
lda.z mem
|
||||
sta memLo
|
||||
lda.z mem+1
|
||||
lda #>gen_sintab.f_min
|
||||
sta memHi
|
||||
lda memLo
|
||||
ldy memHi
|
||||
jsr $b867
|
||||
rts
|
||||
}
|
||||
// FAC = MEM*FAC
|
||||
// Set FAC to MEM (float saved in memory) multiplied by FAC (float accumulator)
|
||||
// Reads 5 bytes from memory
|
||||
// mulFACbyMEM(byte* zeropage($f) mem)
|
||||
// mulFACbyMEM(byte* zeropage($13) mem)
|
||||
mulFACbyMEM: {
|
||||
.label mem = $f
|
||||
jsr prepareMEM
|
||||
lda.z $fe
|
||||
ldy.z $ff
|
||||
.label mem = $13
|
||||
lda.z mem
|
||||
sta memLo
|
||||
lda.z mem+1
|
||||
sta memHi
|
||||
lda memLo
|
||||
ldy memHi
|
||||
jsr $ba28
|
||||
rts
|
||||
}
|
||||
@ -391,36 +383,45 @@ sinFAC: {
|
||||
// FAC = MEM/FAC
|
||||
// Set FAC to MEM (float saved in memory) divided by FAC (float accumulator)
|
||||
// Reads 5 bytes from memory
|
||||
// divMEMbyFAC(byte* zeropage($f) mem)
|
||||
// divMEMbyFAC(byte* zeropage($13) mem)
|
||||
divMEMbyFAC: {
|
||||
.label mem = $f
|
||||
jsr prepareMEM
|
||||
lda.z $fe
|
||||
ldy.z $ff
|
||||
.label mem = $13
|
||||
lda.z mem
|
||||
sta memLo
|
||||
lda.z mem+1
|
||||
sta memHi
|
||||
lda memLo
|
||||
ldy memHi
|
||||
jsr $bb0f
|
||||
rts
|
||||
}
|
||||
// FAC = word
|
||||
// Set the FAC (floating point accumulator) to the integer value of a 16bit word
|
||||
// setFAC(word zeropage($f) w)
|
||||
// setFAC(word zeropage($13) w)
|
||||
setFAC: {
|
||||
.label w = $f
|
||||
jsr prepareMEM
|
||||
.label prepareMEM1_mem = $13
|
||||
.label w = $13
|
||||
lda.z prepareMEM1_mem
|
||||
sta memLo
|
||||
lda.z prepareMEM1_mem+1
|
||||
sta memHi
|
||||
// Load word register Y,A into FAC (floating point accumulator)
|
||||
ldy.z $fe
|
||||
lda.z $ff
|
||||
ldy memLo
|
||||
jsr $b391
|
||||
rts
|
||||
}
|
||||
// MEM = FAC
|
||||
// Stores the value of the FAC to memory
|
||||
// Stores 5 bytes (means it is necessary to allocate 5 bytes to avoid clobbering other data using eg. byte[] mem = {0, 0, 0, 0, 0};)
|
||||
// setMEMtoFAC(byte* zeropage($f) mem)
|
||||
// setMEMtoFAC(byte* zeropage($13) mem)
|
||||
setMEMtoFAC: {
|
||||
.label mem = $f
|
||||
jsr prepareMEM
|
||||
ldx.z $fe
|
||||
ldy.z $ff
|
||||
.label mem = $13
|
||||
lda.z mem
|
||||
sta memLo
|
||||
lda.z mem+1
|
||||
sta memHi
|
||||
ldx memLo
|
||||
tay
|
||||
jsr $bbd4
|
||||
rts
|
||||
}
|
||||
|
@ -257,7 +257,7 @@ progress_inc::@return: scope:[progress_inc] from progress_inc::@1
|
||||
[127] return
|
||||
to:@return
|
||||
getFAC: scope:[getFAC] from gen_sintab::@20
|
||||
asm { jsr$b1aa sty$fe sta$ff }
|
||||
asm { jsr$b1aa stymemLo stamemHi }
|
||||
[129] (word) getFAC::return#0 ← *((const byte*) memHi#0) w= *((const byte*) memLo#0)
|
||||
to:getFAC::@return
|
||||
getFAC::@return: scope:[getFAC] from getFAC
|
||||
@ -265,200 +265,209 @@ getFAC::@return: scope:[getFAC] from getFAC
|
||||
to:@return
|
||||
addMEMtoFAC: scope:[addMEMtoFAC] from gen_sintab::@11 gen_sintab::@19
|
||||
[131] phi()
|
||||
[132] call prepareMEM
|
||||
to:addMEMtoFAC::prepareMEM1
|
||||
addMEMtoFAC::prepareMEM1: scope:[addMEMtoFAC] from addMEMtoFAC
|
||||
[132] *((const byte*) memLo#0) ← <(word)(const byte[]) gen_sintab::f_min#0
|
||||
[133] *((const byte*) memHi#0) ← >(word)(const byte[]) gen_sintab::f_min#0
|
||||
to:addMEMtoFAC::@1
|
||||
addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC
|
||||
asm { lda$fe ldy$ff jsr$b867 }
|
||||
addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC::prepareMEM1
|
||||
asm { ldamemLo ldymemHi jsr$b867 }
|
||||
to:addMEMtoFAC::@return
|
||||
addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1
|
||||
[134] return
|
||||
to:@return
|
||||
prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC
|
||||
[135] (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) gen_sintab::f_min#0 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 )
|
||||
[136] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5
|
||||
[137] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0
|
||||
[138] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5
|
||||
[139] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1
|
||||
to:prepareMEM::@return
|
||||
prepareMEM::@return: scope:[prepareMEM] from prepareMEM
|
||||
[140] return
|
||||
[135] return
|
||||
to:@return
|
||||
mulFACbyMEM: scope:[mulFACbyMEM] from gen_sintab::@13 gen_sintab::@18
|
||||
[141] (byte*) mulFACbyMEM::mem#2 ← phi( gen_sintab::@13/(const byte*) gen_sintab::f_2pi#0 gen_sintab::@18/(const byte[]) gen_sintab::f_amp#0 )
|
||||
[142] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2
|
||||
[143] call prepareMEM
|
||||
[136] (byte*) mulFACbyMEM::mem#2 ← phi( gen_sintab::@13/(const byte*) gen_sintab::f_2pi#0 gen_sintab::@18/(const byte[]) gen_sintab::f_amp#0 )
|
||||
to:mulFACbyMEM::prepareMEM1
|
||||
mulFACbyMEM::prepareMEM1: scope:[mulFACbyMEM] from mulFACbyMEM
|
||||
[137] (byte~) mulFACbyMEM::prepareMEM1_$0#0 ← < (word)(byte*) mulFACbyMEM::mem#2
|
||||
[138] *((const byte*) memLo#0) ← (byte~) mulFACbyMEM::prepareMEM1_$0#0
|
||||
[139] (byte~) mulFACbyMEM::prepareMEM1_$1#0 ← > (word)(byte*) mulFACbyMEM::mem#2
|
||||
[140] *((const byte*) memHi#0) ← (byte~) mulFACbyMEM::prepareMEM1_$1#0
|
||||
to:mulFACbyMEM::@1
|
||||
mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM
|
||||
asm { lda$fe ldy$ff jsr$ba28 }
|
||||
mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM::prepareMEM1
|
||||
asm { ldamemLo ldymemHi jsr$ba28 }
|
||||
to:mulFACbyMEM::@return
|
||||
mulFACbyMEM::@return: scope:[mulFACbyMEM] from mulFACbyMEM::@1
|
||||
[145] return
|
||||
[142] return
|
||||
to:@return
|
||||
sinFAC: scope:[sinFAC] from gen_sintab::@17
|
||||
asm { jsr$e26b }
|
||||
to:sinFAC::@return
|
||||
sinFAC::@return: scope:[sinFAC] from sinFAC
|
||||
[147] return
|
||||
[144] return
|
||||
to:@return
|
||||
divMEMbyFAC: scope:[divMEMbyFAC] from gen_sintab::@16 gen_sintab::@9
|
||||
[148] (byte*) divMEMbyFAC::mem#2 ← phi( gen_sintab::@9/(const byte[]) gen_sintab::f_amp#0 gen_sintab::@16/(const byte[]) gen_sintab::f_i#0 )
|
||||
[149] (byte*) prepareMEM::mem#3 ← (byte*) divMEMbyFAC::mem#2
|
||||
[150] call prepareMEM
|
||||
[145] (byte*) divMEMbyFAC::mem#2 ← phi( gen_sintab::@9/(const byte[]) gen_sintab::f_amp#0 gen_sintab::@16/(const byte[]) gen_sintab::f_i#0 )
|
||||
to:divMEMbyFAC::prepareMEM1
|
||||
divMEMbyFAC::prepareMEM1: scope:[divMEMbyFAC] from divMEMbyFAC
|
||||
[146] (byte~) divMEMbyFAC::prepareMEM1_$0#0 ← < (word)(byte*) divMEMbyFAC::mem#2
|
||||
[147] *((const byte*) memLo#0) ← (byte~) divMEMbyFAC::prepareMEM1_$0#0
|
||||
[148] (byte~) divMEMbyFAC::prepareMEM1_$1#0 ← > (word)(byte*) divMEMbyFAC::mem#2
|
||||
[149] *((const byte*) memHi#0) ← (byte~) divMEMbyFAC::prepareMEM1_$1#0
|
||||
to:divMEMbyFAC::@1
|
||||
divMEMbyFAC::@1: scope:[divMEMbyFAC] from divMEMbyFAC
|
||||
asm { lda$fe ldy$ff jsr$bb0f }
|
||||
divMEMbyFAC::@1: scope:[divMEMbyFAC] from divMEMbyFAC::prepareMEM1
|
||||
asm { ldamemLo ldymemHi jsr$bb0f }
|
||||
to:divMEMbyFAC::@return
|
||||
divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1
|
||||
[152] return
|
||||
[151] return
|
||||
to:@return
|
||||
setFAC: scope:[setFAC] from gen_sintab gen_sintab::@15 gen_sintab::@2 gen_sintab::@4 gen_sintab::@8
|
||||
[153] (word) setFAC::w#5 ← phi( gen_sintab/(word) setFAC::w#0 gen_sintab::@8/(byte) 2 gen_sintab::@2/(word) setFAC::w#3 gen_sintab::@15/(word) setFAC::w#4 gen_sintab::@4/(word) setFAC::w#1 )
|
||||
[154] (byte*) prepareMEM::mem#0 ← (byte*)(word) setFAC::w#5
|
||||
[155] call prepareMEM
|
||||
[152] (word) setFAC::prepareMEM1_mem#0 ← phi( gen_sintab/(word) setFAC::w#0 gen_sintab::@8/(byte) 2 gen_sintab::@2/(word) setFAC::w#3 gen_sintab::@15/(word) setFAC::w#4 gen_sintab::@4/(word) setFAC::w#1 )
|
||||
to:setFAC::prepareMEM1
|
||||
setFAC::prepareMEM1: scope:[setFAC] from setFAC
|
||||
[153] (byte~) setFAC::prepareMEM1_$0#0 ← < (word) setFAC::prepareMEM1_mem#0
|
||||
[154] *((const byte*) memLo#0) ← (byte~) setFAC::prepareMEM1_$0#0
|
||||
[155] (byte~) setFAC::prepareMEM1_$1#0 ← > (word) setFAC::prepareMEM1_mem#0
|
||||
[156] *((const byte*) memHi#0) ← (byte~) setFAC::prepareMEM1_$1#0
|
||||
to:setFAC::@1
|
||||
setFAC::@1: scope:[setFAC] from setFAC
|
||||
asm { ldy$fe lda$ff jsr$b391 }
|
||||
setFAC::@1: scope:[setFAC] from setFAC::prepareMEM1
|
||||
asm { ldymemLo ldamemHi jsr$b391 }
|
||||
to:setFAC::@return
|
||||
setFAC::@return: scope:[setFAC] from setFAC::@1
|
||||
[157] return
|
||||
[158] return
|
||||
to:@return
|
||||
setMEMtoFAC: scope:[setMEMtoFAC] from gen_sintab::@10 gen_sintab::@12 gen_sintab::@14 gen_sintab::@5 gen_sintab::@7
|
||||
[158] (byte*) setMEMtoFAC::mem#5 ← phi( gen_sintab::@7/(const byte[]) gen_sintab::f_amp#0 gen_sintab::@10/(const byte[]) gen_sintab::f_amp#0 gen_sintab::@12/(const byte[]) gen_sintab::f_min#0 gen_sintab::@14/(const byte[]) gen_sintab::f_i#0 gen_sintab::@5/(const byte[]) gen_sintab::f_min#0 )
|
||||
[159] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#5
|
||||
[160] call prepareMEM
|
||||
[159] (byte*) setMEMtoFAC::mem#5 ← phi( gen_sintab::@7/(const byte[]) gen_sintab::f_amp#0 gen_sintab::@10/(const byte[]) gen_sintab::f_amp#0 gen_sintab::@12/(const byte[]) gen_sintab::f_min#0 gen_sintab::@14/(const byte[]) gen_sintab::f_i#0 gen_sintab::@5/(const byte[]) gen_sintab::f_min#0 )
|
||||
to:setMEMtoFAC::prepareMEM1
|
||||
setMEMtoFAC::prepareMEM1: scope:[setMEMtoFAC] from setMEMtoFAC
|
||||
[160] (byte~) setMEMtoFAC::prepareMEM1_$0#0 ← < (word)(byte*) setMEMtoFAC::mem#5
|
||||
[161] *((const byte*) memLo#0) ← (byte~) setMEMtoFAC::prepareMEM1_$0#0
|
||||
[162] (byte~) setMEMtoFAC::prepareMEM1_$1#0 ← > (word)(byte*) setMEMtoFAC::mem#5
|
||||
[163] *((const byte*) memHi#0) ← (byte~) setMEMtoFAC::prepareMEM1_$1#0
|
||||
to:setMEMtoFAC::@1
|
||||
setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC
|
||||
asm { ldx$fe ldy$ff jsr$bbd4 }
|
||||
setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC::prepareMEM1
|
||||
asm { ldxmemLo ldymemHi jsr$bbd4 }
|
||||
to:setMEMtoFAC::@return
|
||||
setMEMtoFAC::@return: scope:[setMEMtoFAC] from setMEMtoFAC::@1
|
||||
[162] return
|
||||
[165] return
|
||||
to:@return
|
||||
subFACfromARG: scope:[subFACfromARG] from gen_sintab::@6
|
||||
asm { jsr$b853 }
|
||||
to:subFACfromARG::@return
|
||||
subFACfromARG::@return: scope:[subFACfromARG] from subFACfromARG
|
||||
[164] return
|
||||
[167] return
|
||||
to:@return
|
||||
setARGtoFAC: scope:[setARGtoFAC] from gen_sintab::@3
|
||||
asm { jsr$bc0f }
|
||||
to:setARGtoFAC::@return
|
||||
setARGtoFAC::@return: scope:[setARGtoFAC] from setARGtoFAC
|
||||
[166] return
|
||||
[169] return
|
||||
to:@return
|
||||
progress_init: scope:[progress_init] from init::@4 init::@6
|
||||
[167] (byte*) progress_init::line#2 ← phi( init::@4/(const byte*) SCREEN#0 init::@6/(const byte*) SCREEN#0+(byte) $28 )
|
||||
[170] (byte*) progress_init::line#2 ← phi( init::@4/(const byte*) SCREEN#0 init::@6/(const byte*) SCREEN#0+(byte) $28 )
|
||||
to:progress_init::@return
|
||||
progress_init::@return: scope:[progress_init] from progress_init
|
||||
[168] return
|
||||
[171] return
|
||||
to:@return
|
||||
gen_sprites: scope:[gen_sprites] from init::@3
|
||||
[169] phi()
|
||||
[172] phi()
|
||||
to:gen_sprites::@1
|
||||
gen_sprites::@1: scope:[gen_sprites] from gen_sprites gen_sprites::@2
|
||||
[170] (byte*) gen_sprites::spr#2 ← phi( gen_sprites/(const byte*) sprites#0 gen_sprites::@2/(byte*) gen_sprites::spr#1 )
|
||||
[170] (byte) gen_sprites::i#2 ← phi( gen_sprites/(byte) 0 gen_sprites::@2/(byte) gen_sprites::i#1 )
|
||||
[171] (byte) gen_chargen_sprite::ch#0 ← *((const byte[]) gen_sprites::cml#0 + (byte) gen_sprites::i#2)
|
||||
[172] (byte*) gen_chargen_sprite::sprite#0 ← (byte*) gen_sprites::spr#2
|
||||
[173] call gen_chargen_sprite
|
||||
[173] (byte*) gen_sprites::spr#2 ← phi( gen_sprites/(const byte*) sprites#0 gen_sprites::@2/(byte*) gen_sprites::spr#1 )
|
||||
[173] (byte) gen_sprites::i#2 ← phi( gen_sprites/(byte) 0 gen_sprites::@2/(byte) gen_sprites::i#1 )
|
||||
[174] (byte) gen_chargen_sprite::ch#0 ← *((const byte[]) gen_sprites::cml#0 + (byte) gen_sprites::i#2)
|
||||
[175] (byte*) gen_chargen_sprite::sprite#0 ← (byte*) gen_sprites::spr#2
|
||||
[176] call gen_chargen_sprite
|
||||
to:gen_sprites::@2
|
||||
gen_sprites::@2: scope:[gen_sprites] from gen_sprites::@1
|
||||
[174] (byte*) gen_sprites::spr#1 ← (byte*) gen_sprites::spr#2 + (byte) $40
|
||||
[175] (byte) gen_sprites::i#1 ← ++ (byte) gen_sprites::i#2
|
||||
[176] if((byte) gen_sprites::i#1!=(byte) 7) goto gen_sprites::@1
|
||||
[177] (byte*) gen_sprites::spr#1 ← (byte*) gen_sprites::spr#2 + (byte) $40
|
||||
[178] (byte) gen_sprites::i#1 ← ++ (byte) gen_sprites::i#2
|
||||
[179] if((byte) gen_sprites::i#1!=(byte) 7) goto gen_sprites::@1
|
||||
to:gen_sprites::@return
|
||||
gen_sprites::@return: scope:[gen_sprites] from gen_sprites::@2
|
||||
[177] return
|
||||
[180] return
|
||||
to:@return
|
||||
gen_chargen_sprite: scope:[gen_chargen_sprite] from gen_sprites::@1
|
||||
[178] (word~) gen_chargen_sprite::$0 ← (word)(byte) gen_chargen_sprite::ch#0
|
||||
[179] (word~) gen_chargen_sprite::$1 ← (word~) gen_chargen_sprite::$0 << (byte) 3
|
||||
[180] (byte*) gen_chargen_sprite::chargen#0 ← (const byte*) CHARGEN#0 + (word~) gen_chargen_sprite::$1
|
||||
[181] (word~) gen_chargen_sprite::$0 ← (word)(byte) gen_chargen_sprite::ch#0
|
||||
[182] (word~) gen_chargen_sprite::$1 ← (word~) gen_chargen_sprite::$0 << (byte) 3
|
||||
[183] (byte*) gen_chargen_sprite::chargen#0 ← (const byte*) CHARGEN#0 + (word~) gen_chargen_sprite::$1
|
||||
asm { sei }
|
||||
[182] *((const byte*) PROCPORT#0) ← (byte) $32
|
||||
[185] *((const byte*) PROCPORT#0) ← (byte) $32
|
||||
to:gen_chargen_sprite::@1
|
||||
gen_chargen_sprite::@1: scope:[gen_chargen_sprite] from gen_chargen_sprite gen_chargen_sprite::@8
|
||||
[183] (byte*) gen_chargen_sprite::sprite#11 ← phi( gen_chargen_sprite/(byte*) gen_chargen_sprite::sprite#0 gen_chargen_sprite::@8/(byte*) gen_chargen_sprite::sprite#2 )
|
||||
[183] (byte) gen_chargen_sprite::y#2 ← phi( gen_chargen_sprite/(byte) 0 gen_chargen_sprite::@8/(byte) gen_chargen_sprite::y#1 )
|
||||
[184] (byte) gen_chargen_sprite::bits#0 ← *((byte*) gen_chargen_sprite::chargen#0 + (byte) gen_chargen_sprite::y#2)
|
||||
[186] (byte*) gen_chargen_sprite::sprite#11 ← phi( gen_chargen_sprite/(byte*) gen_chargen_sprite::sprite#0 gen_chargen_sprite::@8/(byte*) gen_chargen_sprite::sprite#2 )
|
||||
[186] (byte) gen_chargen_sprite::y#2 ← phi( gen_chargen_sprite/(byte) 0 gen_chargen_sprite::@8/(byte) gen_chargen_sprite::y#1 )
|
||||
[187] (byte) gen_chargen_sprite::bits#0 ← *((byte*) gen_chargen_sprite::chargen#0 + (byte) gen_chargen_sprite::y#2)
|
||||
to:gen_chargen_sprite::@2
|
||||
gen_chargen_sprite::@2: scope:[gen_chargen_sprite] from gen_chargen_sprite::@1 gen_chargen_sprite::@7
|
||||
[185] (byte) gen_chargen_sprite::x#6 ← phi( gen_chargen_sprite::@1/(byte) 0 gen_chargen_sprite::@7/(byte) gen_chargen_sprite::x#1 )
|
||||
[185] (byte*) gen_chargen_sprite::sprite#10 ← phi( gen_chargen_sprite::@1/(byte*) gen_chargen_sprite::sprite#11 gen_chargen_sprite::@7/(byte*) gen_chargen_sprite::sprite#4 )
|
||||
[185] (byte) gen_chargen_sprite::s_gen_cnt#4 ← phi( gen_chargen_sprite::@1/(byte) 0 gen_chargen_sprite::@7/(byte) gen_chargen_sprite::s_gen_cnt#5 )
|
||||
[185] (byte) gen_chargen_sprite::s_gen#5 ← phi( gen_chargen_sprite::@1/(byte) 0 gen_chargen_sprite::@7/(byte) gen_chargen_sprite::s_gen#6 )
|
||||
[185] (byte) gen_chargen_sprite::bits#2 ← phi( gen_chargen_sprite::@1/(byte) gen_chargen_sprite::bits#0 gen_chargen_sprite::@7/(byte) gen_chargen_sprite::bits#1 )
|
||||
[186] (byte~) gen_chargen_sprite::$3 ← (byte) gen_chargen_sprite::bits#2 & (byte) $80
|
||||
[187] if((byte~) gen_chargen_sprite::$3==(byte) 0) goto gen_chargen_sprite::@3
|
||||
[188] (byte) gen_chargen_sprite::x#6 ← phi( gen_chargen_sprite::@1/(byte) 0 gen_chargen_sprite::@7/(byte) gen_chargen_sprite::x#1 )
|
||||
[188] (byte*) gen_chargen_sprite::sprite#10 ← phi( gen_chargen_sprite::@1/(byte*) gen_chargen_sprite::sprite#11 gen_chargen_sprite::@7/(byte*) gen_chargen_sprite::sprite#4 )
|
||||
[188] (byte) gen_chargen_sprite::s_gen_cnt#4 ← phi( gen_chargen_sprite::@1/(byte) 0 gen_chargen_sprite::@7/(byte) gen_chargen_sprite::s_gen_cnt#5 )
|
||||
[188] (byte) gen_chargen_sprite::s_gen#5 ← phi( gen_chargen_sprite::@1/(byte) 0 gen_chargen_sprite::@7/(byte) gen_chargen_sprite::s_gen#6 )
|
||||
[188] (byte) gen_chargen_sprite::bits#2 ← phi( gen_chargen_sprite::@1/(byte) gen_chargen_sprite::bits#0 gen_chargen_sprite::@7/(byte) gen_chargen_sprite::bits#1 )
|
||||
[189] (byte~) gen_chargen_sprite::$3 ← (byte) gen_chargen_sprite::bits#2 & (byte) $80
|
||||
[190] if((byte~) gen_chargen_sprite::$3==(byte) 0) goto gen_chargen_sprite::@3
|
||||
to:gen_chargen_sprite::@10
|
||||
gen_chargen_sprite::@10: scope:[gen_chargen_sprite] from gen_chargen_sprite::@2
|
||||
[188] phi()
|
||||
[191] phi()
|
||||
to:gen_chargen_sprite::@3
|
||||
gen_chargen_sprite::@3: scope:[gen_chargen_sprite] from gen_chargen_sprite::@10 gen_chargen_sprite::@2
|
||||
[189] (byte) gen_chargen_sprite::c#3 ← phi( gen_chargen_sprite::@10/(byte) 1 gen_chargen_sprite::@2/(byte) 0 )
|
||||
[192] (byte) gen_chargen_sprite::c#3 ← phi( gen_chargen_sprite::@10/(byte) 1 gen_chargen_sprite::@2/(byte) 0 )
|
||||
to:gen_chargen_sprite::@4
|
||||
gen_chargen_sprite::@4: scope:[gen_chargen_sprite] from gen_chargen_sprite::@3 gen_chargen_sprite::@5
|
||||
[190] (byte*) gen_chargen_sprite::sprite#3 ← phi( gen_chargen_sprite::@3/(byte*) gen_chargen_sprite::sprite#10 gen_chargen_sprite::@5/(byte*) gen_chargen_sprite::sprite#4 )
|
||||
[190] (byte) gen_chargen_sprite::b#2 ← phi( gen_chargen_sprite::@3/(byte) 0 gen_chargen_sprite::@5/(byte) gen_chargen_sprite::b#1 )
|
||||
[190] (byte) gen_chargen_sprite::s_gen_cnt#3 ← phi( gen_chargen_sprite::@3/(byte) gen_chargen_sprite::s_gen_cnt#4 gen_chargen_sprite::@5/(byte) gen_chargen_sprite::s_gen_cnt#5 )
|
||||
[190] (byte) gen_chargen_sprite::s_gen#3 ← phi( gen_chargen_sprite::@3/(byte) gen_chargen_sprite::s_gen#5 gen_chargen_sprite::@5/(byte) gen_chargen_sprite::s_gen#6 )
|
||||
[191] (byte~) gen_chargen_sprite::$6 ← (byte) gen_chargen_sprite::s_gen#3 << (byte) 1
|
||||
[192] (byte) gen_chargen_sprite::s_gen#1 ← (byte~) gen_chargen_sprite::$6 | (byte) gen_chargen_sprite::c#3
|
||||
[193] (byte) gen_chargen_sprite::s_gen_cnt#1 ← ++ (byte) gen_chargen_sprite::s_gen_cnt#3
|
||||
[194] if((byte) gen_chargen_sprite::s_gen_cnt#1!=(byte) 8) goto gen_chargen_sprite::@5
|
||||
[193] (byte*) gen_chargen_sprite::sprite#3 ← phi( gen_chargen_sprite::@3/(byte*) gen_chargen_sprite::sprite#10 gen_chargen_sprite::@5/(byte*) gen_chargen_sprite::sprite#4 )
|
||||
[193] (byte) gen_chargen_sprite::b#2 ← phi( gen_chargen_sprite::@3/(byte) 0 gen_chargen_sprite::@5/(byte) gen_chargen_sprite::b#1 )
|
||||
[193] (byte) gen_chargen_sprite::s_gen_cnt#3 ← phi( gen_chargen_sprite::@3/(byte) gen_chargen_sprite::s_gen_cnt#4 gen_chargen_sprite::@5/(byte) gen_chargen_sprite::s_gen_cnt#5 )
|
||||
[193] (byte) gen_chargen_sprite::s_gen#3 ← phi( gen_chargen_sprite::@3/(byte) gen_chargen_sprite::s_gen#5 gen_chargen_sprite::@5/(byte) gen_chargen_sprite::s_gen#6 )
|
||||
[194] (byte~) gen_chargen_sprite::$6 ← (byte) gen_chargen_sprite::s_gen#3 << (byte) 1
|
||||
[195] (byte) gen_chargen_sprite::s_gen#1 ← (byte~) gen_chargen_sprite::$6 | (byte) gen_chargen_sprite::c#3
|
||||
[196] (byte) gen_chargen_sprite::s_gen_cnt#1 ← ++ (byte) gen_chargen_sprite::s_gen_cnt#3
|
||||
[197] if((byte) gen_chargen_sprite::s_gen_cnt#1!=(byte) 8) goto gen_chargen_sprite::@5
|
||||
to:gen_chargen_sprite::@6
|
||||
gen_chargen_sprite::@6: scope:[gen_chargen_sprite] from gen_chargen_sprite::@4
|
||||
[195] *((byte*) gen_chargen_sprite::sprite#3) ← (byte) gen_chargen_sprite::s_gen#1
|
||||
[196] *((byte*) gen_chargen_sprite::sprite#3 + (byte) 3) ← (byte) gen_chargen_sprite::s_gen#1
|
||||
[197] *((byte*) gen_chargen_sprite::sprite#3 + (byte) 6) ← (byte) gen_chargen_sprite::s_gen#1
|
||||
[198] (byte*) gen_chargen_sprite::sprite#1 ← ++ (byte*) gen_chargen_sprite::sprite#3
|
||||
[198] *((byte*) gen_chargen_sprite::sprite#3) ← (byte) gen_chargen_sprite::s_gen#1
|
||||
[199] *((byte*) gen_chargen_sprite::sprite#3 + (byte) 3) ← (byte) gen_chargen_sprite::s_gen#1
|
||||
[200] *((byte*) gen_chargen_sprite::sprite#3 + (byte) 6) ← (byte) gen_chargen_sprite::s_gen#1
|
||||
[201] (byte*) gen_chargen_sprite::sprite#1 ← ++ (byte*) gen_chargen_sprite::sprite#3
|
||||
to:gen_chargen_sprite::@5
|
||||
gen_chargen_sprite::@5: scope:[gen_chargen_sprite] from gen_chargen_sprite::@4 gen_chargen_sprite::@6
|
||||
[199] (byte*) gen_chargen_sprite::sprite#4 ← phi( gen_chargen_sprite::@4/(byte*) gen_chargen_sprite::sprite#3 gen_chargen_sprite::@6/(byte*) gen_chargen_sprite::sprite#1 )
|
||||
[199] (byte) gen_chargen_sprite::s_gen_cnt#5 ← phi( gen_chargen_sprite::@4/(byte) gen_chargen_sprite::s_gen_cnt#1 gen_chargen_sprite::@6/(byte) 0 )
|
||||
[199] (byte) gen_chargen_sprite::s_gen#6 ← phi( gen_chargen_sprite::@4/(byte) gen_chargen_sprite::s_gen#1 gen_chargen_sprite::@6/(byte) 0 )
|
||||
[200] (byte) gen_chargen_sprite::b#1 ← ++ (byte) gen_chargen_sprite::b#2
|
||||
[201] if((byte) gen_chargen_sprite::b#1!=(byte) 3) goto gen_chargen_sprite::@4
|
||||
[202] (byte*) gen_chargen_sprite::sprite#4 ← phi( gen_chargen_sprite::@4/(byte*) gen_chargen_sprite::sprite#3 gen_chargen_sprite::@6/(byte*) gen_chargen_sprite::sprite#1 )
|
||||
[202] (byte) gen_chargen_sprite::s_gen_cnt#5 ← phi( gen_chargen_sprite::@4/(byte) gen_chargen_sprite::s_gen_cnt#1 gen_chargen_sprite::@6/(byte) 0 )
|
||||
[202] (byte) gen_chargen_sprite::s_gen#6 ← phi( gen_chargen_sprite::@4/(byte) gen_chargen_sprite::s_gen#1 gen_chargen_sprite::@6/(byte) 0 )
|
||||
[203] (byte) gen_chargen_sprite::b#1 ← ++ (byte) gen_chargen_sprite::b#2
|
||||
[204] if((byte) gen_chargen_sprite::b#1!=(byte) 3) goto gen_chargen_sprite::@4
|
||||
to:gen_chargen_sprite::@7
|
||||
gen_chargen_sprite::@7: scope:[gen_chargen_sprite] from gen_chargen_sprite::@5
|
||||
[202] (byte) gen_chargen_sprite::bits#1 ← (byte) gen_chargen_sprite::bits#2 << (byte) 1
|
||||
[203] (byte) gen_chargen_sprite::x#1 ← ++ (byte) gen_chargen_sprite::x#6
|
||||
[204] if((byte) gen_chargen_sprite::x#1!=(byte) 8) goto gen_chargen_sprite::@2
|
||||
[205] (byte) gen_chargen_sprite::bits#1 ← (byte) gen_chargen_sprite::bits#2 << (byte) 1
|
||||
[206] (byte) gen_chargen_sprite::x#1 ← ++ (byte) gen_chargen_sprite::x#6
|
||||
[207] if((byte) gen_chargen_sprite::x#1!=(byte) 8) goto gen_chargen_sprite::@2
|
||||
to:gen_chargen_sprite::@8
|
||||
gen_chargen_sprite::@8: scope:[gen_chargen_sprite] from gen_chargen_sprite::@7
|
||||
[205] (byte*) gen_chargen_sprite::sprite#2 ← (byte*) gen_chargen_sprite::sprite#4 + (byte) 6
|
||||
[206] (byte) gen_chargen_sprite::y#1 ← ++ (byte) gen_chargen_sprite::y#2
|
||||
[207] if((byte) gen_chargen_sprite::y#1!=(byte) 8) goto gen_chargen_sprite::@1
|
||||
[208] (byte*) gen_chargen_sprite::sprite#2 ← (byte*) gen_chargen_sprite::sprite#4 + (byte) 6
|
||||
[209] (byte) gen_chargen_sprite::y#1 ← ++ (byte) gen_chargen_sprite::y#2
|
||||
[210] if((byte) gen_chargen_sprite::y#1!=(byte) 8) goto gen_chargen_sprite::@1
|
||||
to:gen_chargen_sprite::@9
|
||||
gen_chargen_sprite::@9: scope:[gen_chargen_sprite] from gen_chargen_sprite::@8
|
||||
[208] *((const byte*) PROCPORT#0) ← (byte) $37
|
||||
[211] *((const byte*) PROCPORT#0) ← (byte) $37
|
||||
asm { cli }
|
||||
to:gen_chargen_sprite::@return
|
||||
gen_chargen_sprite::@return: scope:[gen_chargen_sprite] from gen_chargen_sprite::@9
|
||||
[210] return
|
||||
[213] return
|
||||
to:@return
|
||||
place_sprites: scope:[place_sprites] from init::@2
|
||||
[211] *((const byte*) SPRITES_ENABLE#0) ← (byte) $7f
|
||||
[212] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) $7f
|
||||
[213] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) $7f
|
||||
[214] *((const byte*) SPRITES_ENABLE#0) ← (byte) $7f
|
||||
[215] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) $7f
|
||||
[216] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) $7f
|
||||
to:place_sprites::@1
|
||||
place_sprites::@1: scope:[place_sprites] from place_sprites place_sprites::@1
|
||||
[214] (byte) place_sprites::col#2 ← phi( place_sprites/(byte) 5 place_sprites::@1/(byte) place_sprites::col#1 )
|
||||
[214] (byte) place_sprites::j2#3 ← phi( place_sprites/(byte) 0 place_sprites::@1/(byte) place_sprites::j2#2 )
|
||||
[214] (byte) place_sprites::spr_x#2 ← phi( place_sprites/(byte) $3c place_sprites::@1/(byte) place_sprites::spr_x#1 )
|
||||
[214] (byte) place_sprites::j#2 ← phi( place_sprites/(byte) 0 place_sprites::@1/(byte) place_sprites::j#1 )
|
||||
[214] (byte) place_sprites::spr_id#2 ← phi( place_sprites/(byte)(word)(const byte*) sprites#0/(byte) $40 place_sprites::@1/(byte) place_sprites::spr_id#1 )
|
||||
[215] *((const byte*) place_sprites::sprites_ptr#0 + (byte) place_sprites::j#2) ← (byte) place_sprites::spr_id#2
|
||||
[216] (byte) place_sprites::spr_id#1 ← ++ (byte) place_sprites::spr_id#2
|
||||
[217] *((const byte*) SPRITES_XPOS#0 + (byte) place_sprites::j2#3) ← (byte) place_sprites::spr_x#2
|
||||
[218] *((const byte*) SPRITES_YPOS#0 + (byte) place_sprites::j2#3) ← (byte) $50
|
||||
[219] *((const byte*) SPRITES_COLS#0 + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2
|
||||
[220] (byte) place_sprites::spr_x#1 ← (byte) place_sprites::spr_x#2 + (byte) $20
|
||||
[221] (byte) place_sprites::col#1 ← (byte) place_sprites::col#2 ^ (byte)(number) 7^(number) 5
|
||||
[222] (byte) place_sprites::j2#1 ← ++ (byte) place_sprites::j2#3
|
||||
[223] (byte) place_sprites::j2#2 ← ++ (byte) place_sprites::j2#1
|
||||
[224] (byte) place_sprites::j#1 ← ++ (byte) place_sprites::j#2
|
||||
[225] if((byte) place_sprites::j#1!=(byte) 7) goto place_sprites::@1
|
||||
[217] (byte) place_sprites::col#2 ← phi( place_sprites/(byte) 5 place_sprites::@1/(byte) place_sprites::col#1 )
|
||||
[217] (byte) place_sprites::j2#3 ← phi( place_sprites/(byte) 0 place_sprites::@1/(byte) place_sprites::j2#2 )
|
||||
[217] (byte) place_sprites::spr_x#2 ← phi( place_sprites/(byte) $3c place_sprites::@1/(byte) place_sprites::spr_x#1 )
|
||||
[217] (byte) place_sprites::j#2 ← phi( place_sprites/(byte) 0 place_sprites::@1/(byte) place_sprites::j#1 )
|
||||
[217] (byte) place_sprites::spr_id#2 ← phi( place_sprites/(byte)(word)(const byte*) sprites#0/(byte) $40 place_sprites::@1/(byte) place_sprites::spr_id#1 )
|
||||
[218] *((const byte*) place_sprites::sprites_ptr#0 + (byte) place_sprites::j#2) ← (byte) place_sprites::spr_id#2
|
||||
[219] (byte) place_sprites::spr_id#1 ← ++ (byte) place_sprites::spr_id#2
|
||||
[220] *((const byte*) SPRITES_XPOS#0 + (byte) place_sprites::j2#3) ← (byte) place_sprites::spr_x#2
|
||||
[221] *((const byte*) SPRITES_YPOS#0 + (byte) place_sprites::j2#3) ← (byte) $50
|
||||
[222] *((const byte*) SPRITES_COLS#0 + (byte) place_sprites::j#2) ← (byte) place_sprites::col#2
|
||||
[223] (byte) place_sprites::spr_x#1 ← (byte) place_sprites::spr_x#2 + (byte) $20
|
||||
[224] (byte) place_sprites::col#1 ← (byte) place_sprites::col#2 ^ (byte)(number) 7^(number) 5
|
||||
[225] (byte) place_sprites::j2#1 ← ++ (byte) place_sprites::j2#3
|
||||
[226] (byte) place_sprites::j2#2 ← ++ (byte) place_sprites::j2#1
|
||||
[227] (byte) place_sprites::j#1 ← ++ (byte) place_sprites::j#2
|
||||
[228] if((byte) place_sprites::j#1!=(byte) 7) goto place_sprites::@1
|
||||
to:place_sprites::@return
|
||||
place_sprites::@return: scope:[place_sprites] from place_sprites::@1
|
||||
[226] return
|
||||
[229] return
|
||||
to:@return
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -35,6 +35,10 @@
|
||||
(label) addMEMtoFAC::@1
|
||||
(label) addMEMtoFAC::@return
|
||||
(byte*) addMEMtoFAC::mem
|
||||
(label) addMEMtoFAC::prepareMEM1
|
||||
(byte~) addMEMtoFAC::prepareMEM1_$0
|
||||
(byte~) addMEMtoFAC::prepareMEM1_$1
|
||||
(word) addMEMtoFAC::prepareMEM1_mem
|
||||
(void()) anim()
|
||||
(byte~) anim::$6 $6 zp ZP_BYTE:10 101.0
|
||||
(byte~) anim::$7 reg byte a 202.0
|
||||
@ -78,13 +82,19 @@
|
||||
(label) clear_screen::@2
|
||||
(label) clear_screen::@return
|
||||
(byte*) clear_screen::sc
|
||||
(byte*) clear_screen::sc#1 sc zp ZP_WORD:19 16.5
|
||||
(byte*) clear_screen::sc#4 sc zp ZP_WORD:19 16.5
|
||||
(byte*) clear_screen::sc#1 sc zp ZP_WORD:15 16.5
|
||||
(byte*) clear_screen::sc#4 sc zp ZP_WORD:15 16.5
|
||||
(void()) divMEMbyFAC((byte*) divMEMbyFAC::mem)
|
||||
(label) divMEMbyFAC::@1
|
||||
(label) divMEMbyFAC::@return
|
||||
(byte*) divMEMbyFAC::mem
|
||||
(byte*) divMEMbyFAC::mem#2 mem zp ZP_WORD:15 2.0
|
||||
(byte*) divMEMbyFAC::mem#2 mem zp ZP_WORD:19
|
||||
(label) divMEMbyFAC::prepareMEM1
|
||||
(byte~) divMEMbyFAC::prepareMEM1_$0
|
||||
(byte~) divMEMbyFAC::prepareMEM1_$0#0 reg byte a 4.0
|
||||
(byte~) divMEMbyFAC::prepareMEM1_$1
|
||||
(byte~) divMEMbyFAC::prepareMEM1_$1#0 reg byte a 4.0
|
||||
(word) divMEMbyFAC::prepareMEM1_mem
|
||||
(void()) gen_chargen_sprite((byte) gen_chargen_sprite::ch , (byte*) gen_chargen_sprite::sprite)
|
||||
(word~) gen_chargen_sprite::$0 $0 zp ZP_WORD:19 4.0
|
||||
(word~) gen_chargen_sprite::$1 $1 zp ZP_WORD:19 4.0
|
||||
@ -139,7 +149,7 @@
|
||||
(byte) gen_chargen_sprite::y#1 y zp ZP_BYTE:4 151.5
|
||||
(byte) gen_chargen_sprite::y#2 y zp ZP_BYTE:4 13.173913043478262
|
||||
(void()) gen_sintab((byte*) gen_sintab::sintab , (byte) gen_sintab::length , (byte) gen_sintab::min , (byte) gen_sintab::max)
|
||||
(word~) gen_sintab::$24 $24 zp ZP_WORD:15 11.0
|
||||
(word~) gen_sintab::$24 $24 zp ZP_WORD:19 11.0
|
||||
(byte~) gen_sintab::$25 reg byte a 22.0
|
||||
(label) gen_sintab::@1
|
||||
(label) gen_sintab::@10
|
||||
@ -182,7 +192,7 @@
|
||||
(byte) gen_sintab::min
|
||||
(byte) gen_sintab::min#2 min zp ZP_BYTE:6
|
||||
(byte*) gen_sintab::sintab
|
||||
(byte*) gen_sintab::sintab#13 sintab zp ZP_WORD:19 0.22448979591836735
|
||||
(byte*) gen_sintab::sintab#13 sintab zp ZP_WORD:15 0.22448979591836735
|
||||
(void()) gen_sprites()
|
||||
(label) gen_sprites::@1
|
||||
(label) gen_sprites::@2
|
||||
@ -198,8 +208,8 @@
|
||||
(word()) getFAC()
|
||||
(label) getFAC::@return
|
||||
(word) getFAC::return
|
||||
(word) getFAC::return#0 return zp ZP_WORD:15 4.333333333333333
|
||||
(word) getFAC::return#2 return zp ZP_WORD:15 22.0
|
||||
(word) getFAC::return#0 return zp ZP_WORD:19 4.333333333333333
|
||||
(word) getFAC::return#2 return zp ZP_WORD:19 22.0
|
||||
(word) getFAC::w
|
||||
(void()) init()
|
||||
(label) init::@1
|
||||
@ -225,7 +235,13 @@
|
||||
(label) mulFACbyMEM::@1
|
||||
(label) mulFACbyMEM::@return
|
||||
(byte*) mulFACbyMEM::mem
|
||||
(byte*) mulFACbyMEM::mem#2 mem zp ZP_WORD:15 2.0
|
||||
(byte*) mulFACbyMEM::mem#2 mem zp ZP_WORD:19
|
||||
(label) mulFACbyMEM::prepareMEM1
|
||||
(byte~) mulFACbyMEM::prepareMEM1_$0
|
||||
(byte~) mulFACbyMEM::prepareMEM1_$0#0 reg byte a 4.0
|
||||
(byte~) mulFACbyMEM::prepareMEM1_$1
|
||||
(byte~) mulFACbyMEM::prepareMEM1_$1#0 reg byte a 4.0
|
||||
(word) mulFACbyMEM::prepareMEM1_mem
|
||||
(void()) place_sprites()
|
||||
(label) place_sprites::@1
|
||||
(label) place_sprites::@return
|
||||
@ -247,16 +263,6 @@
|
||||
(byte) place_sprites::spr_x#2 spr_x zp ZP_BYTE:9 5.5
|
||||
(byte*) place_sprites::sprites_ptr
|
||||
(const byte*) place_sprites::sprites_ptr#0 sprites_ptr = (const byte*) SCREEN#0+(word) $3f8
|
||||
(void()) prepareMEM((byte*) prepareMEM::mem)
|
||||
(byte~) prepareMEM::$0 reg byte a 4.0
|
||||
(byte~) prepareMEM::$1 reg byte a 4.0
|
||||
(label) prepareMEM::@return
|
||||
(byte*) prepareMEM::mem
|
||||
(byte*) prepareMEM::mem#0 mem zp ZP_WORD:15 4.0
|
||||
(byte*) prepareMEM::mem#1 mem zp ZP_WORD:15 4.0
|
||||
(byte*) prepareMEM::mem#3 mem zp ZP_WORD:15 4.0
|
||||
(byte*) prepareMEM::mem#4 mem zp ZP_WORD:15 4.0
|
||||
(byte*) prepareMEM::mem#5 mem zp ZP_WORD:15 3.9999999999999996
|
||||
(byte*) progress_cursor
|
||||
(byte*) progress_cursor#10 progress_cursor zp ZP_WORD:2 4.0
|
||||
(byte*) progress_cursor#11 progress_cursor zp ZP_WORD:2 3.4
|
||||
@ -280,17 +286,29 @@
|
||||
(void()) setFAC((word) setFAC::w)
|
||||
(label) setFAC::@1
|
||||
(label) setFAC::@return
|
||||
(label) setFAC::prepareMEM1
|
||||
(byte~) setFAC::prepareMEM1_$0
|
||||
(byte~) setFAC::prepareMEM1_$0#0 reg byte a 4.0
|
||||
(byte~) setFAC::prepareMEM1_$1
|
||||
(byte~) setFAC::prepareMEM1_$1#0 reg byte a 4.0
|
||||
(word) setFAC::prepareMEM1_mem
|
||||
(word) setFAC::prepareMEM1_mem#0 prepareMEM1_mem zp ZP_WORD:19 9.999999999999998
|
||||
(word) setFAC::w
|
||||
(word) setFAC::w#0 w zp ZP_WORD:15 4.0
|
||||
(word) setFAC::w#1 w zp ZP_WORD:15 4.0
|
||||
(word) setFAC::w#3 w zp ZP_WORD:15 22.0
|
||||
(word) setFAC::w#4 w zp ZP_WORD:15 22.0
|
||||
(word) setFAC::w#5 w zp ZP_WORD:15 26.0
|
||||
(word) setFAC::w#0 w zp ZP_WORD:19 4.0
|
||||
(word) setFAC::w#1 w zp ZP_WORD:19 4.0
|
||||
(word) setFAC::w#3 w zp ZP_WORD:19 22.0
|
||||
(word) setFAC::w#4 w zp ZP_WORD:19 22.0
|
||||
(void()) setMEMtoFAC((byte*) setMEMtoFAC::mem)
|
||||
(label) setMEMtoFAC::@1
|
||||
(label) setMEMtoFAC::@return
|
||||
(byte*) setMEMtoFAC::mem
|
||||
(byte*) setMEMtoFAC::mem#5 mem zp ZP_WORD:15 2.0
|
||||
(byte*) setMEMtoFAC::mem#5 mem zp ZP_WORD:19
|
||||
(label) setMEMtoFAC::prepareMEM1
|
||||
(byte~) setMEMtoFAC::prepareMEM1_$0
|
||||
(byte~) setMEMtoFAC::prepareMEM1_$0#0 reg byte a 4.0
|
||||
(byte~) setMEMtoFAC::prepareMEM1_$1
|
||||
(byte~) setMEMtoFAC::prepareMEM1_$1#0 reg byte a 4.0
|
||||
(word) setMEMtoFAC::prepareMEM1_mem
|
||||
(void()) sinFAC()
|
||||
(label) sinFAC::@return
|
||||
(byte) sin_idx_x
|
||||
@ -326,14 +344,20 @@ zp ZP_BYTE:8 [ place_sprites::j#2 place_sprites::j#1 gen_chargen_sprite::c#3 gen
|
||||
zp ZP_BYTE:9 [ place_sprites::spr_x#2 place_sprites::spr_x#1 gen_chargen_sprite::s_gen#3 gen_chargen_sprite::s_gen#5 gen_chargen_sprite::s_gen#6 gen_chargen_sprite::s_gen#1 gen_sintab::i#10 gen_sintab::i#1 anim::xidx#3 anim::xidx#0 anim::xidx#5 anim::xidx#1 anim::xidx#2 ]
|
||||
zp ZP_BYTE:10 [ place_sprites::j2#3 place_sprites::j2#2 progress_idx#14 progress_idx#12 progress_idx#10 anim::x_msb#2 anim::x_msb#1 anim::$6 ]
|
||||
zp ZP_BYTE:11 [ place_sprites::col#2 place_sprites::col#1 gen_sprites::i#2 gen_sprites::i#1 anim::j2#2 anim::j2#1 ]
|
||||
zp ZP_WORD:15 [ anim::x#0 gen_chargen_sprite::sprite#3 gen_chargen_sprite::sprite#10 gen_chargen_sprite::sprite#11 gen_chargen_sprite::sprite#0 gen_chargen_sprite::sprite#2 gen_chargen_sprite::sprite#4 gen_chargen_sprite::sprite#1 gen_sintab::sintab#13 clear_screen::sc#4 clear_screen::sc#1 ]
|
||||
reg byte a [ anim::$7 ]
|
||||
reg byte a [ anim::$9 ]
|
||||
zp ZP_WORD:15 [ getFAC::return#2 gen_sintab::$24 getFAC::return#0 anim::x#0 gen_chargen_sprite::sprite#3 gen_chargen_sprite::sprite#10 gen_chargen_sprite::sprite#11 gen_chargen_sprite::sprite#0 gen_chargen_sprite::sprite#2 gen_chargen_sprite::sprite#4 gen_chargen_sprite::sprite#1 prepareMEM::mem#5 prepareMEM::mem#3 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 mulFACbyMEM::mem#2 divMEMbyFAC::mem#2 setFAC::w#5 setFAC::w#0 setFAC::w#3 setFAC::w#4 setFAC::w#1 setMEMtoFAC::mem#5 ]
|
||||
reg byte a [ gen_sintab::$25 ]
|
||||
reg byte a [ prepareMEM::$0 ]
|
||||
reg byte a [ prepareMEM::$1 ]
|
||||
reg byte a [ mulFACbyMEM::prepareMEM1_$0#0 ]
|
||||
reg byte a [ mulFACbyMEM::prepareMEM1_$1#0 ]
|
||||
reg byte a [ divMEMbyFAC::prepareMEM1_$0#0 ]
|
||||
reg byte a [ divMEMbyFAC::prepareMEM1_$1#0 ]
|
||||
reg byte a [ setFAC::prepareMEM1_$0#0 ]
|
||||
reg byte a [ setFAC::prepareMEM1_$1#0 ]
|
||||
reg byte a [ setMEMtoFAC::prepareMEM1_$0#0 ]
|
||||
reg byte a [ setMEMtoFAC::prepareMEM1_$1#0 ]
|
||||
reg byte x [ gen_chargen_sprite::ch#0 ]
|
||||
zp ZP_WORD:19 [ gen_chargen_sprite::$0 gen_chargen_sprite::$1 gen_chargen_sprite::chargen#0 gen_sintab::sintab#13 clear_screen::sc#4 clear_screen::sc#1 ]
|
||||
zp ZP_WORD:19 [ gen_chargen_sprite::$0 gen_chargen_sprite::$1 gen_chargen_sprite::chargen#0 getFAC::return#2 gen_sintab::$24 getFAC::return#0 setMEMtoFAC::mem#5 setFAC::prepareMEM1_mem#0 setFAC::w#0 setFAC::w#3 setFAC::w#4 setFAC::w#1 divMEMbyFAC::mem#2 mulFACbyMEM::mem#2 ]
|
||||
reg byte a [ gen_chargen_sprite::$3 ]
|
||||
reg byte a [ gen_chargen_sprite::$6 ]
|
||||
reg byte x [ place_sprites::j2#1 ]
|
||||
|
14
src/test/ref/inline-asm-param.asm
Normal file
14
src/test/ref/inline-asm-param.asm
Normal file
@ -0,0 +1,14 @@
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(main)
|
||||
.pc = $80d "Program"
|
||||
.label SCREEN = $400
|
||||
main: {
|
||||
ldx #0
|
||||
b1:
|
||||
lda #'a'
|
||||
sta SCREEN
|
||||
inx
|
||||
cpx #4
|
||||
bne b1
|
||||
rts
|
||||
}
|
21
src/test/ref/inline-asm-param.cfg
Normal file
21
src/test/ref/inline-asm-param.cfg
Normal file
@ -0,0 +1,21 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
[5] (byte) main::i#2 ← phi( main/(byte) 0 main::@1/(byte) main::i#1 )
|
||||
asm { lda#'a' staSCREEN }
|
||||
[7] (byte) main::i#1 ← ++ (byte) main::i#2
|
||||
[8] if((byte) main::i#1!=(byte) 4) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@1
|
||||
[9] return
|
||||
to:@return
|
326
src/test/ref/inline-asm-param.log
Normal file
326
src/test/ref/inline-asm-param.log
Normal file
@ -0,0 +1,326 @@
|
||||
Identified constant variable (byte*) SCREEN
|
||||
Culled Empty Block (label) main::@2
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@begin: scope:[] from
|
||||
(byte*) SCREEN#0 ← ((byte*)) (number) $400
|
||||
to:@1
|
||||
main: scope:[main] from @1
|
||||
(byte) main::i#0 ← (byte) 0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
asm { lda#'a' staSCREEN }
|
||||
(byte) main::i#1 ← (byte) main::i#2 + rangenext(0,3)
|
||||
(bool~) main::$0 ← (byte) main::i#1 != rangelast(0,3)
|
||||
if((bool~) main::$0) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@1
|
||||
return
|
||||
to:@return
|
||||
@1: scope:[] from @begin
|
||||
call main
|
||||
to:@2
|
||||
@2: scope:[] from @1
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
|
||||
SYMBOL TABLE SSA
|
||||
(label) @1
|
||||
(label) @2
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) SCREEN
|
||||
(byte*) SCREEN#0
|
||||
(void()) main()
|
||||
(bool~) main::$0
|
||||
(label) main::@1
|
||||
(label) main::@return
|
||||
(byte) main::i
|
||||
(byte) main::i#0
|
||||
(byte) main::i#1
|
||||
(byte) main::i#2
|
||||
|
||||
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
|
||||
Successful SSA optimization Pass2InlineCast
|
||||
Simplifying constant pointer cast (byte*) 1024
|
||||
Successful SSA optimization PassNCastSimplification
|
||||
Simple Condition (bool~) main::$0 [6] if((byte) main::i#1!=rangelast(0,3)) goto main::@1
|
||||
Successful SSA optimization Pass2ConditionalJumpSimplification
|
||||
Constant (const byte*) SCREEN#0 = (byte*) 1024
|
||||
Constant (const byte) main::i#0 = 0
|
||||
Successful SSA optimization Pass2ConstantIdentification
|
||||
Resolved ranged next value [4] main::i#1 ← ++ main::i#2 to ++
|
||||
Resolved ranged comparison value [6] if(main::i#1!=rangelast(0,3)) goto main::@1 to (number) 4
|
||||
Adding number conversion cast (unumber) 4 in if((byte) main::i#1!=(number) 4) goto main::@1
|
||||
Successful SSA optimization PassNAddNumberTypeConversions
|
||||
Simplifying constant integer cast 4
|
||||
Successful SSA optimization PassNCastSimplification
|
||||
Finalized unsigned number type (byte) 4
|
||||
Successful SSA optimization PassNFinalizeNumberTypeConversions
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Constant inlined main::i#0 = (byte) 0
|
||||
Successful SSA optimization Pass2ConstantInlining
|
||||
Added new block during phi lifting main::@3(between main::@1 and main::@1)
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @2
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main
|
||||
CALL GRAPH
|
||||
Calls in [] to main:2
|
||||
|
||||
Created 1 initial phi equivalence classes
|
||||
Coalesced [11] main::i#3 ← main::i#1
|
||||
Coalesced down to 1 phi equivalence classes
|
||||
Culled Empty Block (label) @2
|
||||
Culled Empty Block (label) main::@3
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main
|
||||
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
[5] (byte) main::i#2 ← phi( main/(byte) 0 main::@1/(byte) main::i#1 )
|
||||
asm { lda#'a' staSCREEN }
|
||||
[7] (byte) main::i#1 ← ++ (byte) main::i#2
|
||||
[8] if((byte) main::i#1!=(byte) 4) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@1
|
||||
[9] return
|
||||
to:@return
|
||||
|
||||
|
||||
VARIABLE REGISTER WEIGHTS
|
||||
(byte*) SCREEN
|
||||
(void()) main()
|
||||
(byte) main::i
|
||||
(byte) main::i#1 16.5
|
||||
(byte) main::i#2 11.0
|
||||
|
||||
Initial phi equivalence classes
|
||||
[ main::i#2 main::i#1 ]
|
||||
Complete equivalence classes
|
||||
[ main::i#2 main::i#1 ]
|
||||
Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
|
||||
|
||||
INITIAL ASM
|
||||
Target platform is c64basic
|
||||
// File Comments
|
||||
// Upstart
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(bbegin)
|
||||
.pc = $80d "Program"
|
||||
// Global Constants & labels
|
||||
.label SCREEN = $400
|
||||
// @begin
|
||||
bbegin:
|
||||
// [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
// @1
|
||||
b1:
|
||||
// [2] call main
|
||||
// [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
// [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
// @end
|
||||
bend:
|
||||
// main
|
||||
main: {
|
||||
.label i = 2
|
||||
// [5] phi from main to main::@1 [phi:main->main::@1]
|
||||
b1_from_main:
|
||||
// [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1
|
||||
lda #0
|
||||
sta.z i
|
||||
jmp b1
|
||||
// [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
|
||||
b1_from_b1:
|
||||
// [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy
|
||||
jmp b1
|
||||
// main::@1
|
||||
b1:
|
||||
// asm { lda#'a' staSCREEN }
|
||||
lda #'a'
|
||||
sta SCREEN
|
||||
// [7] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1
|
||||
inc.z i
|
||||
// [8] if((byte) main::i#1!=(byte) 4) goto main::@1 -- vbuz1_neq_vbuc1_then_la1
|
||||
lda #4
|
||||
cmp.z i
|
||||
bne b1_from_b1
|
||||
jmp breturn
|
||||
// main::@return
|
||||
breturn:
|
||||
// [9] return
|
||||
rts
|
||||
}
|
||||
// File Data
|
||||
|
||||
REGISTER UPLIFT POTENTIAL REGISTERS
|
||||
Statement asm { lda#'a' staSCREEN } always clobbers reg byte a
|
||||
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
|
||||
Statement asm { lda#'a' staSCREEN } always clobbers reg byte a
|
||||
Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y ,
|
||||
|
||||
REGISTER UPLIFT SCOPES
|
||||
Uplift Scope [main] 27.5: zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
|
||||
Uplift Scope []
|
||||
|
||||
Uplifting [main] best 253 combination reg byte x [ main::i#2 main::i#1 ]
|
||||
Uplifting [] best 253 combination
|
||||
|
||||
ASSEMBLER BEFORE OPTIMIZATION
|
||||
// File Comments
|
||||
// Upstart
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(bbegin)
|
||||
.pc = $80d "Program"
|
||||
// Global Constants & labels
|
||||
.label SCREEN = $400
|
||||
// @begin
|
||||
bbegin:
|
||||
// [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
// @1
|
||||
b1:
|
||||
// [2] call main
|
||||
// [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
// [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
// @end
|
||||
bend:
|
||||
// main
|
||||
main: {
|
||||
// [5] phi from main to main::@1 [phi:main->main::@1]
|
||||
b1_from_main:
|
||||
// [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
jmp b1
|
||||
// [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
|
||||
b1_from_b1:
|
||||
// [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy
|
||||
jmp b1
|
||||
// main::@1
|
||||
b1:
|
||||
// asm { lda#'a' staSCREEN }
|
||||
lda #'a'
|
||||
sta SCREEN
|
||||
// [7] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
// [8] if((byte) main::i#1!=(byte) 4) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #4
|
||||
bne b1_from_b1
|
||||
jmp breturn
|
||||
// main::@return
|
||||
breturn:
|
||||
// [9] return
|
||||
rts
|
||||
}
|
||||
// File Data
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Replacing label b1_from_b1 with b1
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction main_from_b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Removing instruction b1_from_b1:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction bend:
|
||||
Removing instruction b1_from_main:
|
||||
Removing instruction breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Removing instruction jmp b1
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction bbegin:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@return
|
||||
(byte) main::i
|
||||
(byte) main::i#1 reg byte x 16.5
|
||||
(byte) main::i#2 reg byte x 11.0
|
||||
|
||||
reg byte x [ main::i#2 main::i#1 ]
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 151
|
||||
|
||||
// File Comments
|
||||
// Upstart
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(main)
|
||||
.pc = $80d "Program"
|
||||
// Global Constants & labels
|
||||
.label SCREEN = $400
|
||||
// @begin
|
||||
// [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
// @1
|
||||
// [2] call main
|
||||
// [4] phi from @1 to main [phi:@1->main]
|
||||
// [3] phi from @1 to @end [phi:@1->@end]
|
||||
// @end
|
||||
// main
|
||||
main: {
|
||||
// [5] phi from main to main::@1 [phi:main->main::@1]
|
||||
// [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
// [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
|
||||
// [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy
|
||||
// main::@1
|
||||
b1:
|
||||
// asm
|
||||
// asm { lda#'a' staSCREEN }
|
||||
lda #'a'
|
||||
sta SCREEN
|
||||
// for( byte i:0..3)
|
||||
// [7] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
// [8] if((byte) main::i#1!=(byte) 4) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #4
|
||||
bne b1
|
||||
// main::@return
|
||||
// }
|
||||
// [9] return
|
||||
rts
|
||||
}
|
||||
// File Data
|
||||
|
13
src/test/ref/inline-asm-param.sym
Normal file
13
src/test/ref/inline-asm-param.sym
Normal file
@ -0,0 +1,13 @@
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@return
|
||||
(byte) main::i
|
||||
(byte) main::i#1 reg byte x 16.5
|
||||
(byte) main::i#2 reg byte x 11.0
|
||||
|
||||
reg byte x [ main::i#2 main::i#1 ]
|
@ -10,9 +10,9 @@ main: {
|
||||
.label f_2pi = $e2e5
|
||||
.label i = 2
|
||||
lda #<$4fb
|
||||
sta.z setFAC.w
|
||||
sta.z setFAC.prepareMEM1_mem
|
||||
lda #>$4fb
|
||||
sta.z setFAC.w+1
|
||||
sta.z setFAC.prepareMEM1_mem+1
|
||||
jsr setFAC
|
||||
jsr divFACby10
|
||||
lda #<f_127
|
||||
@ -47,9 +47,9 @@ main: {
|
||||
sta.z setMEMtoFAC.mem+1
|
||||
jsr setMEMtoFAC
|
||||
lda #<$19
|
||||
sta.z setFAC.w
|
||||
sta.z setFAC.prepareMEM1_mem
|
||||
lda #>$19
|
||||
sta.z setFAC.w+1
|
||||
sta.z setFAC.prepareMEM1_mem+1
|
||||
jsr setFAC
|
||||
jsr divMEMbyFAC
|
||||
jsr sinFAC
|
||||
@ -143,9 +143,9 @@ getFAC: {
|
||||
.label return = 7
|
||||
// Load FAC (floating point accumulator) integer part into word register Y,A
|
||||
jsr $b1aa
|
||||
sty.z $fe
|
||||
sta.z $ff
|
||||
lda memLo
|
||||
sty memLo
|
||||
sta memHi
|
||||
tya
|
||||
sta.z return
|
||||
lda memHi
|
||||
sta.z return+1
|
||||
@ -155,24 +155,14 @@ getFAC: {
|
||||
// Set FAC to MEM (float saved in memory) plus FAC (float accumulator)
|
||||
// Reads 5 bytes from memory
|
||||
addMEMtoFAC: {
|
||||
lda #<main.f_127
|
||||
sta.z prepareMEM.mem
|
||||
lda #>main.f_127
|
||||
sta.z prepareMEM.mem+1
|
||||
jsr prepareMEM
|
||||
lda.z $fe
|
||||
ldy.z $ff
|
||||
jsr $b867
|
||||
rts
|
||||
}
|
||||
// Prepare MEM pointers for operations using MEM
|
||||
// prepareMEM(byte* zeropage(7) mem)
|
||||
prepareMEM: {
|
||||
.label mem = 7
|
||||
lda.z mem
|
||||
.const prepareMEM1_mem = main.f_127
|
||||
lda #<prepareMEM1_mem
|
||||
sta memLo
|
||||
lda.z mem+1
|
||||
lda #>prepareMEM1_mem
|
||||
sta memHi
|
||||
lda memLo
|
||||
ldy memHi
|
||||
jsr $b867
|
||||
rts
|
||||
}
|
||||
// FAC = MEM*FAC
|
||||
@ -181,9 +171,12 @@ prepareMEM: {
|
||||
// mulFACbyMEM(byte* zeropage(7) mem)
|
||||
mulFACbyMEM: {
|
||||
.label mem = 7
|
||||
jsr prepareMEM
|
||||
lda.z $fe
|
||||
ldy.z $ff
|
||||
lda.z mem
|
||||
sta memLo
|
||||
lda.z mem+1
|
||||
sta memHi
|
||||
lda memLo
|
||||
ldy memHi
|
||||
jsr $ba28
|
||||
rts
|
||||
}
|
||||
@ -198,13 +191,13 @@ sinFAC: {
|
||||
// Set FAC to MEM (float saved in memory) divided by FAC (float accumulator)
|
||||
// Reads 5 bytes from memory
|
||||
divMEMbyFAC: {
|
||||
lda #<main.f_i
|
||||
sta.z prepareMEM.mem
|
||||
lda #>main.f_i
|
||||
sta.z prepareMEM.mem+1
|
||||
jsr prepareMEM
|
||||
lda.z $fe
|
||||
ldy.z $ff
|
||||
.const prepareMEM1_mem = main.f_i
|
||||
lda #<prepareMEM1_mem
|
||||
sta memLo
|
||||
lda #>prepareMEM1_mem
|
||||
sta memHi
|
||||
lda memLo
|
||||
ldy memHi
|
||||
jsr $bb0f
|
||||
rts
|
||||
}
|
||||
@ -212,11 +205,14 @@ divMEMbyFAC: {
|
||||
// Set the FAC (floating point accumulator) to the integer value of a 16bit word
|
||||
// setFAC(word zeropage(7) w)
|
||||
setFAC: {
|
||||
.label prepareMEM1_mem = 7
|
||||
.label w = 7
|
||||
jsr prepareMEM
|
||||
lda.z prepareMEM1_mem
|
||||
sta memLo
|
||||
lda.z prepareMEM1_mem+1
|
||||
sta memHi
|
||||
// Load word register Y,A into FAC (floating point accumulator)
|
||||
ldy.z $fe
|
||||
lda.z $ff
|
||||
ldy memLo
|
||||
jsr $b391
|
||||
rts
|
||||
}
|
||||
@ -226,9 +222,12 @@ setFAC: {
|
||||
// setMEMtoFAC(byte* zeropage(7) mem)
|
||||
setMEMtoFAC: {
|
||||
.label mem = 7
|
||||
jsr prepareMEM
|
||||
ldx.z $fe
|
||||
ldy.z $ff
|
||||
lda.z mem
|
||||
sta memLo
|
||||
lda.z mem+1
|
||||
sta memHi
|
||||
ldx memLo
|
||||
tay
|
||||
jsr $bbd4
|
||||
rts
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ print_char::@return: scope:[print_char] from print_char
|
||||
[59] return
|
||||
to:@return
|
||||
getFAC: scope:[getFAC] from main::@11
|
||||
asm { jsr$b1aa sty$fe sta$ff }
|
||||
asm { jsr$b1aa stymemLo stamemHi }
|
||||
[61] (word) getFAC::return#0 ← *((const byte*) memHi#0) w= *((const byte*) memLo#0)
|
||||
to:getFAC::@return
|
||||
getFAC::@return: scope:[getFAC] from getFAC
|
||||
@ -132,76 +132,84 @@ getFAC::@return: scope:[getFAC] from getFAC
|
||||
to:@return
|
||||
addMEMtoFAC: scope:[addMEMtoFAC] from main::@10
|
||||
[63] phi()
|
||||
[64] call prepareMEM
|
||||
to:addMEMtoFAC::prepareMEM1
|
||||
addMEMtoFAC::prepareMEM1: scope:[addMEMtoFAC] from addMEMtoFAC
|
||||
[64] *((const byte*) memLo#0) ← <(const word) addMEMtoFAC::prepareMEM1_mem#0
|
||||
[65] *((const byte*) memHi#0) ← >(const word) addMEMtoFAC::prepareMEM1_mem#0
|
||||
to:addMEMtoFAC::@1
|
||||
addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC
|
||||
asm { lda$fe ldy$ff jsr$b867 }
|
||||
addMEMtoFAC::@1: scope:[addMEMtoFAC] from addMEMtoFAC::prepareMEM1
|
||||
asm { ldamemLo ldymemHi jsr$b867 }
|
||||
to:addMEMtoFAC::@return
|
||||
addMEMtoFAC::@return: scope:[addMEMtoFAC] from addMEMtoFAC::@1
|
||||
[66] return
|
||||
to:@return
|
||||
prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC
|
||||
[67] (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) main::f_127#0 divMEMbyFAC/(const byte[]) main::f_i#0 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 )
|
||||
[68] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5
|
||||
[69] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0
|
||||
[70] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5
|
||||
[71] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1
|
||||
to:prepareMEM::@return
|
||||
prepareMEM::@return: scope:[prepareMEM] from prepareMEM
|
||||
[72] return
|
||||
[67] return
|
||||
to:@return
|
||||
mulFACbyMEM: scope:[mulFACbyMEM] from main::@4 main::@9
|
||||
[73] (byte*) mulFACbyMEM::mem#2 ← phi( main::@9/(const byte[]) main::f_127#0 main::@4/(const byte*) main::f_2pi#0 )
|
||||
[74] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2
|
||||
[75] call prepareMEM
|
||||
[68] (byte*) mulFACbyMEM::mem#2 ← phi( main::@9/(const byte[]) main::f_127#0 main::@4/(const byte*) main::f_2pi#0 )
|
||||
to:mulFACbyMEM::prepareMEM1
|
||||
mulFACbyMEM::prepareMEM1: scope:[mulFACbyMEM] from mulFACbyMEM
|
||||
[69] (byte~) mulFACbyMEM::prepareMEM1_$0#0 ← < (word)(byte*) mulFACbyMEM::mem#2
|
||||
[70] *((const byte*) memLo#0) ← (byte~) mulFACbyMEM::prepareMEM1_$0#0
|
||||
[71] (byte~) mulFACbyMEM::prepareMEM1_$1#0 ← > (word)(byte*) mulFACbyMEM::mem#2
|
||||
[72] *((const byte*) memHi#0) ← (byte~) mulFACbyMEM::prepareMEM1_$1#0
|
||||
to:mulFACbyMEM::@1
|
||||
mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM
|
||||
asm { lda$fe ldy$ff jsr$ba28 }
|
||||
mulFACbyMEM::@1: scope:[mulFACbyMEM] from mulFACbyMEM::prepareMEM1
|
||||
asm { ldamemLo ldymemHi jsr$ba28 }
|
||||
to:mulFACbyMEM::@return
|
||||
mulFACbyMEM::@return: scope:[mulFACbyMEM] from mulFACbyMEM::@1
|
||||
[77] return
|
||||
[74] return
|
||||
to:@return
|
||||
sinFAC: scope:[sinFAC] from main::@8
|
||||
asm { jsr$e26b }
|
||||
to:sinFAC::@return
|
||||
sinFAC::@return: scope:[sinFAC] from sinFAC
|
||||
[79] return
|
||||
[76] return
|
||||
to:@return
|
||||
divMEMbyFAC: scope:[divMEMbyFAC] from main::@7
|
||||
[80] phi()
|
||||
[81] call prepareMEM
|
||||
[77] phi()
|
||||
to:divMEMbyFAC::prepareMEM1
|
||||
divMEMbyFAC::prepareMEM1: scope:[divMEMbyFAC] from divMEMbyFAC
|
||||
[78] *((const byte*) memLo#0) ← <(const word) divMEMbyFAC::prepareMEM1_mem#0
|
||||
[79] *((const byte*) memHi#0) ← >(const word) divMEMbyFAC::prepareMEM1_mem#0
|
||||
to:divMEMbyFAC::@1
|
||||
divMEMbyFAC::@1: scope:[divMEMbyFAC] from divMEMbyFAC
|
||||
asm { lda$fe ldy$ff jsr$bb0f }
|
||||
divMEMbyFAC::@1: scope:[divMEMbyFAC] from divMEMbyFAC::prepareMEM1
|
||||
asm { ldamemLo ldymemHi jsr$bb0f }
|
||||
to:divMEMbyFAC::@return
|
||||
divMEMbyFAC::@return: scope:[divMEMbyFAC] from divMEMbyFAC::@1
|
||||
[83] return
|
||||
[81] return
|
||||
to:@return
|
||||
setFAC: scope:[setFAC] from main main::@1 main::@6
|
||||
[84] (word) setFAC::w#3 ← phi( main/(word) $4fb main::@1/(word) setFAC::w#1 main::@6/(byte) $19 )
|
||||
[85] (byte*) prepareMEM::mem#0 ← (byte*)(word) setFAC::w#3
|
||||
[86] call prepareMEM
|
||||
[82] (word) setFAC::prepareMEM1_mem#0 ← phi( main/(word) $4fb main::@1/(word) setFAC::w#1 main::@6/(byte) $19 )
|
||||
to:setFAC::prepareMEM1
|
||||
setFAC::prepareMEM1: scope:[setFAC] from setFAC
|
||||
[83] (byte~) setFAC::prepareMEM1_$0#0 ← < (word) setFAC::prepareMEM1_mem#0
|
||||
[84] *((const byte*) memLo#0) ← (byte~) setFAC::prepareMEM1_$0#0
|
||||
[85] (byte~) setFAC::prepareMEM1_$1#0 ← > (word) setFAC::prepareMEM1_mem#0
|
||||
[86] *((const byte*) memHi#0) ← (byte~) setFAC::prepareMEM1_$1#0
|
||||
to:setFAC::@1
|
||||
setFAC::@1: scope:[setFAC] from setFAC
|
||||
asm { ldy$fe lda$ff jsr$b391 }
|
||||
setFAC::@1: scope:[setFAC] from setFAC::prepareMEM1
|
||||
asm { ldymemLo ldamemHi jsr$b391 }
|
||||
to:setFAC::@return
|
||||
setFAC::@return: scope:[setFAC] from setFAC::@1
|
||||
[88] return
|
||||
to:@return
|
||||
setMEMtoFAC: scope:[setMEMtoFAC] from main::@3 main::@5
|
||||
[89] (byte*) setMEMtoFAC::mem#2 ← phi( main::@3/(const byte[]) main::f_127#0 main::@5/(const byte[]) main::f_i#0 )
|
||||
[90] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2
|
||||
[91] call prepareMEM
|
||||
to:setMEMtoFAC::prepareMEM1
|
||||
setMEMtoFAC::prepareMEM1: scope:[setMEMtoFAC] from setMEMtoFAC
|
||||
[90] (byte~) setMEMtoFAC::prepareMEM1_$0#0 ← < (word)(byte*) setMEMtoFAC::mem#2
|
||||
[91] *((const byte*) memLo#0) ← (byte~) setMEMtoFAC::prepareMEM1_$0#0
|
||||
[92] (byte~) setMEMtoFAC::prepareMEM1_$1#0 ← > (word)(byte*) setMEMtoFAC::mem#2
|
||||
[93] *((const byte*) memHi#0) ← (byte~) setMEMtoFAC::prepareMEM1_$1#0
|
||||
to:setMEMtoFAC::@1
|
||||
setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC
|
||||
asm { ldx$fe ldy$ff jsr$bbd4 }
|
||||
setMEMtoFAC::@1: scope:[setMEMtoFAC] from setMEMtoFAC::prepareMEM1
|
||||
asm { ldxmemLo ldymemHi jsr$bbd4 }
|
||||
to:setMEMtoFAC::@return
|
||||
setMEMtoFAC::@return: scope:[setMEMtoFAC] from setMEMtoFAC::@1
|
||||
[93] return
|
||||
[95] return
|
||||
to:@return
|
||||
divFACby10: scope:[divFACby10] from main::@2
|
||||
asm { jsr$bafe }
|
||||
to:divFACby10::@return
|
||||
divFACby10::@return: scope:[divFACby10] from divFACby10
|
||||
[95] return
|
||||
[97] return
|
||||
to:@return
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -9,12 +9,22 @@
|
||||
(label) addMEMtoFAC::@1
|
||||
(label) addMEMtoFAC::@return
|
||||
(byte*) addMEMtoFAC::mem
|
||||
(label) addMEMtoFAC::prepareMEM1
|
||||
(byte~) addMEMtoFAC::prepareMEM1_$0
|
||||
(byte~) addMEMtoFAC::prepareMEM1_$1
|
||||
(word) addMEMtoFAC::prepareMEM1_mem
|
||||
(const word) addMEMtoFAC::prepareMEM1_mem#0 prepareMEM1_mem = (word)(const byte[]) main::f_127#0
|
||||
(void()) divFACby10()
|
||||
(label) divFACby10::@return
|
||||
(void()) divMEMbyFAC((byte*) divMEMbyFAC::mem)
|
||||
(label) divMEMbyFAC::@1
|
||||
(label) divMEMbyFAC::@return
|
||||
(byte*) divMEMbyFAC::mem
|
||||
(label) divMEMbyFAC::prepareMEM1
|
||||
(byte~) divMEMbyFAC::prepareMEM1_$0
|
||||
(byte~) divMEMbyFAC::prepareMEM1_$1
|
||||
(word) divMEMbyFAC::prepareMEM1_mem
|
||||
(const word) divMEMbyFAC::prepareMEM1_mem#0 prepareMEM1_mem = (word)(const byte[]) main::f_i#0
|
||||
(word()) getFAC()
|
||||
(label) getFAC::@return
|
||||
(word) getFAC::return
|
||||
@ -55,16 +65,13 @@
|
||||
(label) mulFACbyMEM::@1
|
||||
(label) mulFACbyMEM::@return
|
||||
(byte*) mulFACbyMEM::mem
|
||||
(byte*) mulFACbyMEM::mem#2 mem zp ZP_WORD:7 2.0
|
||||
(void()) prepareMEM((byte*) prepareMEM::mem)
|
||||
(byte~) prepareMEM::$0 reg byte a 4.0
|
||||
(byte~) prepareMEM::$1 reg byte a 4.0
|
||||
(label) prepareMEM::@return
|
||||
(byte*) prepareMEM::mem
|
||||
(byte*) prepareMEM::mem#0 mem zp ZP_WORD:7 4.0
|
||||
(byte*) prepareMEM::mem#1 mem zp ZP_WORD:7 4.0
|
||||
(byte*) prepareMEM::mem#4 mem zp ZP_WORD:7 4.0
|
||||
(byte*) prepareMEM::mem#5 mem zp ZP_WORD:7 3.333333333333333
|
||||
(byte*) mulFACbyMEM::mem#2 mem zp ZP_WORD:7
|
||||
(label) mulFACbyMEM::prepareMEM1
|
||||
(byte~) mulFACbyMEM::prepareMEM1_$0
|
||||
(byte~) mulFACbyMEM::prepareMEM1_$0#0 reg byte a 4.0
|
||||
(byte~) mulFACbyMEM::prepareMEM1_$1
|
||||
(byte~) mulFACbyMEM::prepareMEM1_$1#0 reg byte a 4.0
|
||||
(word) mulFACbyMEM::prepareMEM1_mem
|
||||
(void()) print_byte((byte) print_byte::b)
|
||||
(byte~) print_byte::$0 reg byte a 4.0
|
||||
(byte~) print_byte::$2 reg byte x 4.0
|
||||
@ -104,14 +111,26 @@
|
||||
(void()) setFAC((word) setFAC::w)
|
||||
(label) setFAC::@1
|
||||
(label) setFAC::@return
|
||||
(label) setFAC::prepareMEM1
|
||||
(byte~) setFAC::prepareMEM1_$0
|
||||
(byte~) setFAC::prepareMEM1_$0#0 reg byte a 4.0
|
||||
(byte~) setFAC::prepareMEM1_$1
|
||||
(byte~) setFAC::prepareMEM1_$1#0 reg byte a 4.0
|
||||
(word) setFAC::prepareMEM1_mem
|
||||
(word) setFAC::prepareMEM1_mem#0 prepareMEM1_mem zp ZP_WORD:7 5.0
|
||||
(word) setFAC::w
|
||||
(word) setFAC::w#1 w zp ZP_WORD:7 22.0
|
||||
(word) setFAC::w#3 w zp ZP_WORD:7 11.0
|
||||
(void()) setMEMtoFAC((byte*) setMEMtoFAC::mem)
|
||||
(label) setMEMtoFAC::@1
|
||||
(label) setMEMtoFAC::@return
|
||||
(byte*) setMEMtoFAC::mem
|
||||
(byte*) setMEMtoFAC::mem#2 mem zp ZP_WORD:7 2.0
|
||||
(byte*) setMEMtoFAC::mem#2 mem zp ZP_WORD:7
|
||||
(label) setMEMtoFAC::prepareMEM1
|
||||
(byte~) setMEMtoFAC::prepareMEM1_$0
|
||||
(byte~) setMEMtoFAC::prepareMEM1_$0#0 reg byte a 4.0
|
||||
(byte~) setMEMtoFAC::prepareMEM1_$1
|
||||
(byte~) setMEMtoFAC::prepareMEM1_$1#0 reg byte a 4.0
|
||||
(word) setMEMtoFAC::prepareMEM1_mem
|
||||
(void()) sinFAC()
|
||||
(label) sinFAC::@return
|
||||
|
||||
@ -120,8 +139,12 @@ zp ZP_WORD:3 [ print_line_cursor#6 print_line_cursor#13 print_line_cursor#1 ]
|
||||
reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
|
||||
reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
|
||||
zp ZP_WORD:5 [ print_char_cursor#23 print_char_cursor#31 print_char_cursor#32 print_char_cursor#53 print_char_cursor#10 ]
|
||||
zp ZP_WORD:7 [ getFAC::return#2 print_word::w#0 getFAC::return#0 prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#0 prepareMEM::mem#1 mulFACbyMEM::mem#2 setFAC::w#3 setFAC::w#1 setMEMtoFAC::mem#2 ]
|
||||
zp ZP_WORD:7 [ getFAC::return#2 print_word::w#0 getFAC::return#0 setMEMtoFAC::mem#2 setFAC::prepareMEM1_mem#0 setFAC::w#1 mulFACbyMEM::mem#2 ]
|
||||
reg byte a [ print_byte::$0 ]
|
||||
reg byte x [ print_byte::$2 ]
|
||||
reg byte a [ prepareMEM::$0 ]
|
||||
reg byte a [ prepareMEM::$1 ]
|
||||
reg byte a [ mulFACbyMEM::prepareMEM1_$0#0 ]
|
||||
reg byte a [ mulFACbyMEM::prepareMEM1_$1#0 ]
|
||||
reg byte a [ setFAC::prepareMEM1_$0#0 ]
|
||||
reg byte a [ setFAC::prepareMEM1_$1#0 ]
|
||||
reg byte a [ setMEMtoFAC::prepareMEM1_$0#0 ]
|
||||
reg byte a [ setMEMtoFAC::prepareMEM1_$1#0 ]
|
||||
|
Loading…
Reference in New Issue
Block a user