comparison src/int.s @ 111:b10f6c8979a5

Remove unneeded integer divide by 10 routine
author William Astle <lost@l-w.ca>
date Tue, 26 Dec 2023 21:44:10 -0700
parents b1958992a66a
children 98b0646360e1
comparison
equal deleted inserted replaced
110:00c8df0b61f5 111:b10f6c8979a5
326 ldb #0 326 ldb #0
327 adcb fpaextra 327 adcb fpaextra
328 stb fpaextra 328 stb fpaextra
329 rts 329 rts
330 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 330 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
331 ; Integer divide (X) by 10 *in place*
332 int32_const10 fqb 10 ; integer constant 10
333 int32_div10 ldu #int32_const10 ; point to integer constant 10
334 leay ,x ; point to output location
335 ; fall through to integer division
336 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
337 ; 32 bit division, integer only, truncate fraction without rounding. Note that there is exactly one case where integer 331 ; 32 bit division, integer only, truncate fraction without rounding. Note that there is exactly one case where integer
338 ; division can overflow: dividing -0x80000000 by -1 which yields 0x80000000. All other cases reduce the magnitude. 332 ; division can overflow: dividing -0x80000000 by -1 which yields 0x80000000. All other cases reduce the magnitude.
339 int32_div ldd val.int+2,x ; copy left operand to temporary 333 int32_div ldd val.int+2,x ; copy left operand to temporary
340 std fpa0+fpa.sig+2 334 std fpa0+fpa.sig+2
341 ldd val.int,x 335 ldd val.int,x