1 eÿadi.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\03
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
4 ! #bytes in ecx , top of stack in eax
7 pop ebx ! return address
19 \0and.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\1e\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
23 ! save edi; it might be a register variable
27 pop ebx ! return address
39 blm.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0ª
\0.sect .text
54 cii.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
59 pop ebx ! return address
71 cwde ! convert from 2 to 4 bytes
85 \0cms.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
91 pop ebx ! return address
108 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
122 hcsa4.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
127 ! ebx, descriptor address
129 mov edx,(ebx) ! default
149 Icsb4.s
\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\87\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
154 !ebx, descriptor address
179 cuu.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0m
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
188 pop ebx ! return address
189 ! pop ecx, dest. size
190 ! pop edx, source size
201 xdup.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
207 pop ebx ! return address
218 dvi.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\96\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
224 pop ebx ! return address
239 dvu.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0G
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
245 pop ebx ! return address
260 eerror.s
\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
265 ! all registers must be saved
266 ! because return is possible
267 ! May only be called with error no's <16
292 exg.s
\0s
\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
314 fp8087.s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0ò
\15.define .adf4, .adf8, .sbf4, .sbf8, .mlf4, .mlf8, .dvf4, .dvf8
315 .define .ngf4, .ngf8, .fif4, .fif8, .fef4, .fef8
316 .define .cif4, .cif8, .cuf4, .cuf8, .cfi, .cfu, .cff4, .cff8
318 .sect .text; .sect .rom; .sect .data; .sect .bss
320 ! $Id: fp8087.s,v 1.3 1994/06/24 13:01:43 ceriel Exp $
322 ! Implement interface to floating point package for Intel 8087
414 fmuls 12(bx) ! multiply
416 ftst ! test sign; handle negative separately
419 sahf ! result of test in condition codes
421 frndint ! this one rounds (?)
422 fcom st(1) ! compare with original; if <=, then OK
427 fisubs (one) ! else subtract 1
429 1: ! here, negative case
430 frndint ! this one rounds (?)
431 fcom st(1) ! compare with original; if >=, then OK
436 fiadds (one) ! else add 1
438 fsub st(1),st ! subtract integer part
448 fmuld 16(bx) ! multiply
449 fld st ! and copy result
450 ftst ! test sign; handle negative separately
453 sahf ! result of test in condition codes
455 frndint ! this one rounds (?)
456 fcom st(1) ! compare with original; if <=, then OK
461 fisubs (one) ! else subtract 1
463 1: ! here, negative case
464 frndint ! this one rounds (?)
465 fcom st(1) ! compare with original; if >=, then OK
470 fiadds (one) ! else add 1
472 fsub st(1),st ! subtract integer part
480 ! this could be simpler, if only the
481 ! fxtract instruction was emulated properly
485 je 1f ! zero exponent
488 mov cx,ax ! exponent in cx
491 or ax,0x3f000000 ! load -1 exponent
496 1: ! we get here on zero exp
504 1: ! otherwise unnormalized number
521 or dx,0x3f000000 ! load -1 exponent
526 ! this could be simpler, if only the
527 ! fxtract instruction was emulated properly
531 je 1f ! zero exponent
534 mov cx,ax ! exponent in cx
537 or ax,0x3fe00000 ! load -1 exponent
544 1: ! we get here on zero exp
554 1: ! otherwise unnormalized number
570 or dx,0x3fe00000 ! load -1 exponent
621 or 4(bx),0xc00 ! truncating mode
646 or 4(bx),0x400 ! to -infinity
683 and 4(bx),0xf3ff ! set to rounding mode
705 fcompp ! compare and pop operands
725 fcompp ! compare and pop operands
738 fat.s
\0.s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\94\0.sect .text; .sect .rom; .sect .data; .sect .bss
748 gto.s
\0.s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\88\0.sect .text; .sect .rom; .sect .data; .sect .bss
756 iaar.s
\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\07
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
766 pop ebx ! descriptor address
774 ilar.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
784 pop ebx ! descriptor address
789 inn.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
820 .data1 1,2,4,8,16,32,64,128
821 .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
827 pop ebx ! return address
839 isar.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
849 pop ebx ! descriptor address
854 tlar4.s
\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
859 ! ebx, descriptor address
865 pop edx ! base address
881 xchg edx,esi ! saved esi
885 mov eax,edi ! save edi
891 xloi.s
\0\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0X
\ 2.sect .text; .sect .rom; .sect .data; .sect .bss
898 ! save esi/edi. they might be register variables
922 ! only called with size >= 4
935 mli.s
\0\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\05
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
941 pop ebx ! return address
955 vmon.s
\0\0s
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0k
\0.sect .text; .sect .rom; .sect .data; .sect .bss
962 engi.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
968 pop ebx ! return address
981 nop.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
984 .extern printd, printc, hol0
991 xprint.s
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\14\ 2.sect .text; .sect .rom; .sect .data; .sect .bss
993 .define printc,printd,prints
1038 rck.s
\0s
\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
1042 ! descriptor address in ebx
1043 ! value in eax, must be left there
1058 rmi.s
\0s
\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
1064 pop ebx ! return address
1079 rmu.s
\0s
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0F
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1085 pop ebx ! return address
1100 rol.s
\0s
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\08
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1106 pop edx ! return address
1120 ror.s
\0s
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\08
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1126 pop edx ! return address
1140 sar4.s
\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
1145 ! ebx, descriptor address
1151 pop edx ! base address
1165 xchg edi,edx ! edi = base address, edx is saved edi
1173 sbi.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0B
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1177 ! #bytes in ecx , top of stack in eax
1179 pop ebx ! return subress
1192 set.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0U
\ 2.sect .text; .sect .rom; .sect .data; .sect .bss
1199 pop ebx ! return address
1233 .data1 1,2,4,8,16,32,64,128
1234 bsli.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\08
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1240 pop edx ! return address
1254 sri.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\08
\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1260 pop edx ! return address
1274 sti.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\08
\ 2.sect .text; .sect .rom; .sect .data; .sect .bss
1281 ! save edi/esi. they might be register variables
1302 ! only called with count >> 4
1315 strhp.s
\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
1318 .extern .reghp, .limhp, EHEAP, .trp
1342 trp.s
\0s
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\ 4\ 1.sect .text; .sect .rom; .sect .data; .sect .bss
1345 .extern .trppc, EXIT
1347 ! eax is trap number
1360 unknown.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
1363 .extern EILLINS, .fat
1369 xor.s
\0n.s
\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0ï
\0.sect .text; .sect .rom; .sect .data; .sect .bss
1375 pop ebx ! return address