@@ -147,7 +147,7 @@ class AsmGen(private val options: CompilationOptions, private val program: Inter
147147 return name.replace(" -" , " " )
148148 }
149149
150- private fun makeFloatFill (flt : Mflpt5 ): String {
150+ private fun makeFloatFill (flt : MachineDefinition . Mflpt5 ): String {
151151 val b0 = " $" + flt.b0.toString(16 ).padStart(2 , ' 0' )
152152 val b1 = " $" + flt.b1.toString(16 ).padStart(2 , ' 0' )
153153 val b2 = " $" + flt.b2.toString(16 ).padStart(2 , ' 0' )
@@ -165,7 +165,8 @@ class AsmGen(private val options: CompilationOptions, private val program: Inter
165165 out (" \n .cpu '6502'\n .enc 'none'\n " )
166166
167167 if (program.loadAddress== 0 ) // fix load address
168- program.loadAddress = if (options.launcher== LauncherType .BASIC ) BASIC_LOAD_ADDRESS else RAW_LOAD_ADDRESS
168+ program.loadAddress = if (options.launcher== LauncherType .BASIC )
169+ MachineDefinition .BASIC_LOAD_ADDRESS else MachineDefinition .RAW_LOAD_ADDRESS
169170
170171 when {
171172 options.launcher == LauncherType .BASIC -> {
@@ -221,7 +222,7 @@ class AsmGen(private val options: CompilationOptions, private val program: Inter
221222
222223 // the global list of all floating point constants for the whole program
223224 for (flt in globalFloatConsts) {
224- val floatFill = makeFloatFill(Mflpt5 .fromNumber(flt.key))
225+ val floatFill = makeFloatFill(MachineDefinition . Mflpt5 .fromNumber(flt.key))
225226 out (" ${flt.value} \t .byte $floatFill ; float ${flt.key} " )
226227 }
227228 }
@@ -371,7 +372,7 @@ class AsmGen(private val options: CompilationOptions, private val program: Inter
371372 DataType .ARRAY_F -> {
372373 // float arraysize
373374 val array = heap.get(value.heapId!! ).doubleArray!!
374- val floatFills = array.map { makeFloatFill(Mflpt5 .fromNumber(it)) }
375+ val floatFills = array.map { makeFloatFill(MachineDefinition . Mflpt5 .fromNumber(it)) }
375376 out (varname)
376377 for (f in array.zip(floatFills))
377378 out (" .byte ${f.second} ; float ${f.first} " )
@@ -574,14 +575,14 @@ class AsmGen(private val options: CompilationOptions, private val program: Inter
574575 Opcode .DEC_INDEXED_VAR_W , Opcode .DEC_INDEXED_VAR_UW -> AsmFragment (" lda $variable +${index* 2 } | bne + | dec $variable +${index* 2 + 1 } |+ | dec $variable +${index* 2 } " )
575576 Opcode .INC_INDEXED_VAR_FLOAT -> AsmFragment (
576577 """
577- lda #<($variable +${index* Mflpt5 .MemorySize } )
578- ldy #>($variable +${index* Mflpt5 .MemorySize } )
578+ lda #<($variable +${index* MachineDefinition . Mflpt5 .MemorySize } )
579+ ldy #>($variable +${index* MachineDefinition . Mflpt5 .MemorySize } )
579580 jsr c64flt.inc_var_f
580581 """ )
581582 Opcode .DEC_INDEXED_VAR_FLOAT -> AsmFragment (
582583 """
583- lda #<($variable +${index* Mflpt5 .MemorySize } )
584- ldy #>($variable +${index* Mflpt5 .MemorySize } )
584+ lda #<($variable +${index* MachineDefinition . Mflpt5 .MemorySize } )
585+ ldy #>($variable +${index* MachineDefinition . Mflpt5 .MemorySize } )
585586 jsr c64flt.dec_var_f
586587 """ )
587588
@@ -591,8 +592,8 @@ class AsmGen(private val options: CompilationOptions, private val program: Inter
591592
592593 private fun sameIndexedVarOperation (variable : String , indexVar : String , ins : Instruction ): AsmFragment ? {
593594 // an in place operation that consists of a push-value / op / push-index-var / pop-into-indexed-var
594- val saveX = " stx ${C64Zeropage .SCRATCH_B1 } |"
595- val restoreX = " | ldx ${C64Zeropage .SCRATCH_B1 } "
595+ val saveX = " stx ${MachineDefinition . C64Zeropage .SCRATCH_B1 } |"
596+ val restoreX = " | ldx ${MachineDefinition . C64Zeropage .SCRATCH_B1 } "
596597 val loadXWord: String
597598 val loadX: String
598599
0 commit comments