renamed "(init-temp-voc)" to "(new-temp-voc)"
[urforth.git] / level0 / urforth0_w_math_dbl_min.asm
blob6d424ec014744bfaa3f328aa10b949c45ff83c3b
1 ;; Native x86 GNU/Linux Forth System, Direct Threaded Code
2 ;; double math words required by the kernel
3 ;;
4 ;; Copyright (C) 2020 Ketmar Dark // Invisible Vector
5 ;;
6 ;; This program is free software: you can redistribute it and/or modify
7 ;; it under the terms of the GNU General Public License as published by
8 ;; the Free Software Foundation, version 3 of the License ONLY.
9 ;;
10 ;; This program is distributed in the hope that it will be useful,
11 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ;; GNU General Public License for more details.
15 ;; You should have received a copy of the GNU General Public License
16 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
19 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
20 urword_code "UDS/MOD",udsdivmod
21 ;; ( ud1 u1 --> ud2 u2 )
22 ld edi,TOS
23 pop eax
24 pop ebx
25 ;; EDI=u1
26 ;; EAX=ud1-high
27 ;; EBX=ud1-low
28 xor edx,edx
29 div edi
30 xchg eax,ebx
31 div edi
32 push eax
33 push ebx
34 ld TOS,edx
35 urnext
36 urword_end