#62574 - winneymj - Fri Dec 02, 2005 3:44 pm
Hi,
After some experimentation it seems that the DSEMU assember for the BOIS SWI 9 can handle postive divides ok (example: 1970 / 10 = 197, 1970 % 10 = 0), BUT negative divides produce incorrect results (example -1970 / 10 = ?????? (not sure of number), -1970 % 10 = 6).
Looking at the assember (I am not very familiar with x86) I can see it is doing an IDIV, which is a signed divide, but still the results are incorrect.
Until there is a fix I have built my own local version of DSEMU from the source and replaced the ASM with C code, so I can continue development.
Thanks
After some experimentation it seems that the DSEMU assember for the BOIS SWI 9 can handle postive divides ok (example: 1970 / 10 = 197, 1970 % 10 = 0), BUT negative divides produce incorrect results (example -1970 / 10 = ?????? (not sure of number), -1970 % 10 = 6).
Looking at the assember (I am not very familiar with x86) I can see it is doing an IDIV, which is a signed divide, but still the results are incorrect.
Until there is a fix I have built my own local version of DSEMU from the source and replaced the ASM with C code, so I can continue development.
Thanks