Trying to emulate some functions.
|
08-31-2019, 12:49 PM
(This post was last modified: 08-31-2019 01:32 PM by Gerson W. Barbosa.)
Post: #2
|
|||
|
|||
RE: Trying to emulate some functions.
(08-31-2019 11:27 AM)ggauny@live.fr Wrote: May be you give me advertising, help or optimising. Your program preserves both original X and Y stack registers, but Y will contain the remainder (or an approximation thereof). If just keeping the original X register is ok, I would suggest the following: 01 LBL "IDIV" 02 RCL Y 03 X<>Y 04 MOD 05 ST- Y 06 X<> L 07 / 08 END ——- PS: Your program doesn’t work when one argument is negative. Notice 7 \ -2 = -7 \ 2 = -4, not -3. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Trying to emulate some functions. - ggauny@live.fr - 08-31-2019, 11:27 AM
RE: Trying to emulate some functions. - Gerson W. Barbosa - 08-31-2019 12:49 PM
RE: Trying to emulate some functions. - ggauny@live.fr - 08-31-2019, 06:39 PM
RE: Trying to emulate some functions. - grsbanks - 08-31-2019, 07:19 PM
RE: Trying to emulate some functions. - rprosperi - 08-31-2019, 08:05 PM
RE: Trying to emulate some functions. - grsbanks - 09-01-2019, 05:22 AM
RE: Trying to emulate some functions. - Sylvain Cote - 09-01-2019, 12:06 PM
RE: Trying to emulate some functions. - ggauny@live.fr - 09-01-2019, 04:02 PM
RE: Trying to emulate some functions. - ggauny@live.fr - 09-01-2019, 06:40 PM
|
User(s) browsing this thread: 1 Guest(s)