1 eÿadi.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0 \ 1.sect .text; .sect .rom; .sect .data; .sect .bss
4 ! #bytes in cx , top of stack in ax
7 pop bx ! return address
29 and.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\ e\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
33 ! save di; it might be a register variable
37 pop bx ! return address
49 cii.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\00
\ 2.sect .text; .sect .rom; .sect .data; .sect .bss
54 pop bx ! return address
57 ! ax is first word of source
81 push ax ! push low source
87 cms.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0H
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
93 pop bx ! return address
110 cmi4.s
\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0R
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
115 pop bx ! return address
138 cmu4.s
\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0R
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
143 pop bx ! return address
166 com.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0¬
\0.sect .text; .sect .rom; .sect .data; .sect .bss
181 csa2.s
\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\9c\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
186 ! bx, descriptor address
188 mov dx,(bx) ! default
208 csb2.s
\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0t
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
213 !bx, descriptor address
237 csa4.s
\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0í
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
242 ! bx, descriptor address
244 mov cx,(bx) ! default
246 ! ignore high order word; if non-zero, the
247 ! case descriptor would not fit anyway
267 Ecsb4.s
\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0è
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
272 !bx: descriptor address
275 mov cx,2(bx) ! count (ignore high order word, the descriptor
276 ! would not fit anyway)
300 cuu.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0@
\ 2.sect .text; .sect .rom; .sect .data; .sect .bss
309 pop bx ! return address
311 ! pop dx, source size
312 ! ax is low word of source
331 push ax ! to help debugging ?
337 dup.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0å
\0.sect .text; .sect .rom; .sect .data; .sect .bss
343 pop bx ! return address
354 idvi.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0Ñ
\ 2.sect .text; .sect .rom; .sect .data; .sect .bss
360 pop bx ! return address
393 \0dvi4.s
\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0÷
\ 4.sect .text; .sect .rom; .sect .data; .sect .bss
405 mov si,sp ! copy of sp
429 div bx ! cx = high abs(result), ax=low abs(result)
437 ! cx is high order result
438 ! ax is low order result
442 ret 8 ! result in ax/dx
482 pop di ! di=sign of result,ax= result
484 \0dvu.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\10\ 2.sect .text; .sect .rom; .sect .data; .sect .bss
490 pop bx ! return address
523 dvu4.s
\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0á
\ 2.sect .text; .sect .rom; .sect .data; .sect .bss
535 mov si,sp ! copy of sp
547 ! cx is high order result
548 ! ax is low order result
552 ret 8 ! result in ax/dx
578 exg.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0û
\0.sect .text; .sect .rom; .sect .data; .sect .bss
600 cfp8087.s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0e
\1c.define .adf4, .adf8, .sbf4, .sbf8, .mlf4, .mlf8, .dvf4, .dvf8
601 .define .ngf4, .ngf8, .fif4, .fif8, .fef4, .fef8
602 .define .cif4, .cif8, .cuf4, .cuf8, .cfi, .cfu, .cff4, .cff8
604 .sect .text; .sect .rom; .sect .data; .sect .bss
606 ! $Id: fp8087.s,v 1.6 1994/06/24 12:59:42 ceriel Exp $
608 ! Implement interface to floating point package for Intel 8087
729 push bx ! make room for FP status word
733 fmuls 8(bx) ! multiply
737 ftst ! test sign; handle negative separately
742 sahf ! result of test in condition codes
744 frndint ! this one rounds (?)
746 fcom st(1) ! compare with original; if <=, then OK
753 fisubs (one) ! else subtract 1
756 1: ! here, negative case
757 frndint ! this one rounds (?)
759 fcom st(1) ! compare with original; if >=, then OK
766 fiadds (one) ! else add 1
769 fsub st(1),st ! subtract integer part
781 push bx ! make room for FP status word
785 fmuld 12(bx) ! multiply
787 fld st ! and copy result
789 ftst ! test sign; handle negative separately
794 sahf ! result of test in condition codes
796 frndint ! this one rounds (?)
798 fcom st(1) ! compare with original; if <=, then OK
805 fisubs (one) ! else subtract 1
808 1: ! here, negative case
809 frndint ! this one rounds (?)
811 fcom st(1) ! compare with original; if >=, then OK
818 fiadds (one) ! else add 1
821 fsub st(1),st ! subtract integer part
831 ! this could be simpler, if only the
832 ! fxtract instruction was emulated properly
836 je 1f ! zero exponent
840 mov cx,ax ! exponent in cx
843 or ax,0037400 ! load -1 exponent
850 1: ! we get here on zero exp
861 1: ! otherwise unnormalized number
881 or dx,0037400 ! load -1 exponent
886 ! this could be simpler, if only the
887 ! fxtract instruction was emulated properly
891 je 1f ! zero exponent
895 mov cx,ax ! exponent in cx
898 or ax,0037740 ! load -1 exponent
909 1: ! we get here on zero exp
924 1: ! otherwise unnormalized number
942 or dx,0037740 ! load -1 exponent
1049 or -2(bx),0xc00 ! truncating mode
1090 or -2(bx),0x400 ! to -infinity
1143 and 2(bx),0xf3ff ! set to rounding mode
1165 push bx ! room for 8087 status word
1172 fcompp ! compare and pop operands
1192 push bx ! room for 8087 status word
1199 fcompp ! compare and pop operands
1215 \0gto.s
\0.s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\83\0.sect .text; .sect .rom; .sect .data; .sect .bss
1223 8iaar.s
\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0/
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1233 pop bx ! descriptor address
1237 pop bx ! base address
1241 milar.s
\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\ 3\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1251 pop bx ! descriptor address
1256 !inn.s
\0\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\9d\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1287 .data1 1,2,4,8,16,32,64,128
1289 ior.s
\0\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0ß
\0.sect .text; .sect .rom; .sect .data; .sect .bss
1295 pop bx ! return address
1307 visar.s
\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\ 3\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1317 pop bx ! descriptor address
1322 tlar2.s
\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0ò
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1327 ! bx, descriptor address
1330 pop dx ! base address
1349 pop bx ! return address
1357 loi.s
\0\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0é
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1364 ! save si/di. they might be register variables
1382 ! only called with size > 4
1395 pmli.s
\0\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0$
\ 2.sect .text; .sect .rom; .sect .data; .sect .bss
1401 pop bx ! return address
1437 mli4.s
\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0p
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1455 mul yl(bx) ! xh * yl
1457 add dx,ax ! xh*yl+xl*yh
1463 mon.s
\0\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0n
\0.sect .text; .sect .rom; .sect .data; .sect .bss
1470 ngi.s
\0\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\9e\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1476 pop bx ! return address
1500 nop.s
\0\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0Æ
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1503 .extern printd, printc, hol0
1524 rck.s
\0\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\01
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1528 ! descriptor address in bx
1529 ! value in ax, must be left there
1545 rmi.s
\0\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\ 5\ 2.sect .text; .sect .rom; .sect .data; .sect .bss
1551 pop bx ! return address
1584 Ormi4.s
\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0Ê
\ 4.sect .text; .sect .rom; .sect .data; .sect .bss
1596 mov si,sp ! copy of sp
1618 div bx ! dx= result(low), 0=result(high)
1627 ! bx is high order result
1628 ! dx is low order result
1630 mov dx,bx ! result in ax/dx
1664 ! dx=result(low), bx=result(high)
1672 ! dx=result(low), bx=result(high)
1674 rmu.s
\0\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\ f\ 2.sect .text; .sect .rom; .sect .data; .sect .bss
1680 pop bx ! return address
1713 ,rmu4.s
\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0L
\ 3.sect .text; .sect .rom; .sect .data; .sect .bss
1725 mov si,sp ! copy of sp
1740 ! bx is high order result
1741 ! dx is low order result
1746 ret 8 ! result in ax/dx
1765 ! dx=result(low), bx=result(high)
1773 ! dx=result(low), bx=result(high)
1775 rol.s
\0\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0Û
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1781 pop dx ! return address
1811 ror.s
\0\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0è
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1817 pop dx ! return address
1848 sar2.s
\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0Õ
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1853 ! bx, descriptor address
1856 pop dx ! base address
1858 xchg di,dx ! di = base address, dx is saved di
1881 sbi.s
\0\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0½
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1885 ! #bytes in cx , top of stack in ax
1887 pop bx ! return subress
1912 set.s
\0\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\05
\ 2.sect .text; .sect .rom; .sect .data; .sect .bss
1919 pop bx ! return address
1953 .data1 1,2,4,8,16,32,64,128
1954 sli.s
\0\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0Í
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1960 pop dx ! return address
1990 sri.s
\0\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0Í
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1996 pop dx ! return address
2026 sti.s
\0\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0À
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
2033 ! save di/si. they might be register variables
2045 ! only called with count > 4
2058 strhp.s
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0L
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
2061 .extern .reghp, .limhp, EHEAP, .trp
2085 xor.s
\0s
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0à
\0.sect .text; .sect .rom; .sect .data; .sect .bss
2091 pop bx ! return address
2103 error.s
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\v\ 2.sect .text; .sect .rom; .sect .data; .sect .bss
2108 ! all registers must be saved
2109 ! because return is possible
2110 ! May only be called with error no's <16
2145 dunknown.s
\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\94\0.sect .text; .sect .rom; .sect .data; .sect .bss
2148 .extern EILLINS, .fat
2154 fat.s
\0n.s
\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\96\0.sect .text; .sect .rom; .sect .data; .sect .bss
2164 trp.s
\0n.s
\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\r\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
2185 pprint.s
\0s
\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0õ
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
2187 .define printc,printd,prints
2232 rret6.s
\0\0s
\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0w
\0.sect .text
2243 ret8.s
\0\0s
\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\89\0.sect .text
2254 blfr6.s
\0\0s
\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0z
\0.sect .text
2264 lfr8.s
\0\0s
\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\8d\0.sect .text
2275 :retarea.s
\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0W
\0.sect .text; .sect .rom; .sect .data; .sect .bss
2280 eblm.s
\0a.s
\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\9b\0.sect .text
2283 ! cx: count in words
2295 )return.s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0£
\0.define .sdret, .dsret, .sret, .dret, .cret