1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-26 05:29:30 +00:00

fix rounding when converting to 16bit ints

This commit is contained in:
mrdudz 2022-09-17 18:35:30 +02:00
parent 3805c8754a
commit 4e61599779

View File

@ -45,18 +45,22 @@ eaxufloat:
; conversions: from float ; conversions: from float
.import _float32_to_int32 .import _float32_to_int32
.import _float32_to_int32_round_to_zero
; float -> 16bit int ; float -> 16bit int
.export feaxint .export feaxint
feaxint: feaxint:
; FIXME ; FIXME
jmp _float32_to_int32 jmp _float32_to_int32_round_to_zero
; jmp _float32_to_int32
; float -> 32bit int ; float -> 32bit int
.export feaxlong .export feaxlong
feaxlong: feaxlong:
jmp _float32_to_int32 jmp _float32_to_int32_round_to_zero
; jmp _float32_to_int32
; the ! operator, returns a bool (int) ;------------------------------------------------------------------------------
; the ! operator, returns a bool (int)
.export fbnegeax .export fbnegeax
fbnegeax: fbnegeax:
stx tmp1 stx tmp1