mirror of
https://github.com/irmen/prog8.git
synced 2024-12-26 14:29:35 +00:00
correct assignment type
This commit is contained in:
parent
26e66f046f
commit
18d820da94
@ -882,14 +882,14 @@ internal class BuiltinFunctionsAsmGen(private val program: Program, private val
|
||||
AsmAssignment(
|
||||
AsmAssignSource(SourceStorageKind.REGISTER, program, asmgen, datatype, register = RegisterOrPair.FAC1),
|
||||
targetFromExpr(first, datatype),
|
||||
true, program.memsizer, first.position
|
||||
false, program.memsizer, first.position
|
||||
)
|
||||
)
|
||||
asmgen.translateNormalAssignment(
|
||||
AsmAssignment(
|
||||
AsmAssignSource(SourceStorageKind.VARIABLE, program, asmgen, datatype, "floats.tempvar_swap_float"),
|
||||
targetFromExpr(second, datatype),
|
||||
true, program.memsizer, second.position
|
||||
false, program.memsizer, second.position
|
||||
)
|
||||
)
|
||||
}
|
||||
|
@ -4,42 +4,23 @@
|
||||
|
||||
main {
|
||||
sub start() {
|
||||
ubyte xx=$20
|
||||
|
||||
if not xx {
|
||||
xx++
|
||||
}
|
||||
|
||||
if ~xx {
|
||||
xx++
|
||||
}
|
||||
|
||||
byte yy=3
|
||||
|
||||
if -yy {
|
||||
xx++
|
||||
}
|
||||
|
||||
|
||||
uword xx= $2000
|
||||
ubyte yy=$30
|
||||
ubyte zz=9
|
||||
sys.memset(xx+200, yy*2, ~yy)
|
||||
|
||||
@($c030) = 10
|
||||
@(~xx) *= 2
|
||||
txt.print_ub(@($c030))
|
||||
|
||||
; ubyte yy=$30
|
||||
; ubyte zz=9
|
||||
; sys.memset(xx+200, yy*2, ~yy)
|
||||
;
|
||||
; @($c030) = 10
|
||||
; @(~xx) *= 2
|
||||
; txt.print_ub(@($c030))
|
||||
;
|
||||
; float f1 = 1111.11
|
||||
; float f2 = 2222.22
|
||||
; float[] fa = [2222.22, 3333.33]
|
||||
;
|
||||
; swap(f1, fa[1])
|
||||
; floats.print_f(f1)
|
||||
; txt.nl()
|
||||
; floats.print_f(fa[1])
|
||||
float f1 = 1111.11
|
||||
float f2 = 2222.22
|
||||
float[] fa = [2222.22, 3333.33]
|
||||
|
||||
swap(f1, fa[1])
|
||||
floats.print_f(f1)
|
||||
txt.nl()
|
||||
floats.print_f(fa[1])
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user