📄 lib386.txt
字号:
03153 mov 8(bx),dx
03154 mov 4(bx),cx
03155 ret
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_fif4.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
03200 .sect .text; .sect .rom; .sect .data; .sect .bss
03201 .define .fif4
03202
03203 .sect .text
03204 .fif4:
03205 mov bx,sp
03206 flds 8(bx)
03207 fmuls 12(bx) ! multiply
03208 fld st ! copy result
03209 ftst ! test sign; handle negative separately
03210 fstsw ax
03211 wait
03212 sahf ! result of test in condition codes
03213 jb 1f
03214 frndint ! this one rounds (?)
03215 fcom st(1) ! compare with original; if <=, then OK
03216 fstsw ax
03217 wait
03218 sahf
03219 jbe 2f
03220 fisubs (one) ! else subtract 1
03221 jmp 2f
03222 1: ! here, negative case
03223 frndint ! this one rounds (?)
03224 fcom st(1) ! compare with original; if >=, then OK
03225 fstsw ax
03226 wait
03227 sahf
03228 jae 2f
03229 fiadds (one) ! else add 1
03230 2:
03231 fsub st(1),st ! subtract integer part
03232 mov bx,4(bx)
03233 fstps (bx)
03234 fstps 4(bx)
03235 wait
03236 ret
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_fif8.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
03300 .sect .text; .sect .rom; .sect .data; .sect .bss
03301 .define .fif8
03302
03303 .sect .text
03304 .fif8:
03305 mov bx,sp
03306 fldd 8(bx)
03307 fmuld 16(bx) ! multiply
03308 fld st ! and copy result
03309 ftst ! test sign; handle negative separately
03310 fstsw ax
03311 wait
03312 sahf ! result of test in condition codes
03313 jb 1f
03314 frndint ! this one rounds (?)
03315 fcom st(1) ! compare with original; if <=, then OK
03316 fstsw ax
03317 wait
03318 sahf
03319 jbe 2f
03320 fisubs (one) ! else subtract 1
03321 jmp 2f
03322 1: ! here, negative case
03323 frndint ! this one rounds (?)
03324 fcom st(1) ! compare with original; if >=, then OK
03325 fstsw ax
03326 wait
03327 sahf
03328 jae 2f
03329 fiadds (one) ! else add 1
03330 2:
03331 fsub st(1),st ! subtract integer part
03332 mov bx,4(bx)
03333 fstpd (bx)
03334 fstpd 8(bx)
03335 wait
03336 ret
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_fp8087.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
03400 .sect .text; .sect .rom; .sect .data; .sect .bss
03401 .define one, bigmin
03402
03403 .sect .rom
03404 one:
03405 .data2 1
03406 two:
03407 .data2 2
03408 bigmin:
03409 .data4 -2147483648
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_gto.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
03500 .sect .text; .sect .rom; .sect .data; .sect .bss
03501 .sect .text
03502 .define .gto
03503
03504 .gto:
03505 mov ebp,8(ebx)
03506 mov esp,4(ebx)
03507 jmp (ebx)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_iaar.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
03600 .sect .text; .sect .rom; .sect .data; .sect .bss
03601 .sect .text
03602 .define .iaar
03603
03604 .iaar:
03605 pop ecx
03606 pop edx
03607 cmp edx,4
03608 .extern .unknown
03609 jne .unknown
03610 pop ebx ! descriptor address
03611 pop eax ! index
03612 sub eax,(ebx)
03613 mul 8(ebx)
03614 pop ebx ! array base
03615 add ebx,eax
03616 push ecx
03617 ret
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_ilar.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
03700 .sect .text; .sect .rom; .sect .data; .sect .bss
03701 .sect .text
03702 .define .ilar
03703
03704 .ilar:
03705 pop ecx
03706 pop edx
03707 .extern .unknown
03708 cmp edx,4
03709 jne .unknown
03710 pop ebx ! descriptor address
03711 pop eax ! index
03712 push ecx
03713 .extern .lar4
03714 jmp .lar4
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_inn.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
03800 .sect .text; .sect .rom; .sect .data; .sect .bss
03801 .sect .text
03802 .define .inn
03803
03804 ! #bytes in ecx
03805 ! bit # in eax
03806 .inn:
03807 xor edx,edx
03808 mov ebx,8
03809 div ebx
03810 mov ebx,esp
03811 add ebx,4
03812 add ebx,eax
03813 cmp eax,ecx
03814 jae 1f
03815 movb al,(ebx)
03816 mov ebx,edx
03817 testb al,bits(ebx)
03818 jz 1f
03819 mov eax,1
03820 jmp 2f
03821 1:
03822 xor eax,eax
03823 2:
03824 pop ebx
03825 add esp,ecx
03826 ! eax is result
03827 jmp ebx
03828
03829 .sect .rom
03830 bits:
03831 .data1 1,2,4,8,16,32,64,128
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_ior.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
03900 .sect .text; .sect .rom; .sect .data; .sect .bss
03901 .sect .text
03902 .define .ior
03903
03904 ! #bytes in ecx
03905 .ior:
03906 pop ebx ! return address
03907 mov edx,edi
03908 mov edi,esp
03909 add edi,ecx
03910 sar ecx,2
03911 1:
03912 pop eax
03913 or eax,(edi)
03914 stos
03915 loop 1b
03916 mov edi,edx
03917 jmp ebx
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_isar.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
04000 .sect .text; .sect .rom; .sect .data; .sect .bss
04001 .sect .text
04002 .define .isar
04003
04004 .isar:
04005 pop ecx
04006 pop eax
04007 cmp eax,4
04008 .extern .unknown
04009 jne .unknown
04010 pop ebx ! descriptor address
04011 pop eax ! index
04012 push ecx
04013 .extern .sar4
04014 jmp .sar4
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_lar4.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
04100 .sect .text; .sect .rom; .sect .data; .sect .bss
04101 .sect .text
04102 .define .lar4
04103
04104 .lar4:
04105 ! ebx, descriptor address
04106 ! eax, index
04107 sub eax,(ebx)
04108 mov ecx,8(ebx)
04109 imul ecx
04110 pop ebx
04111 pop edx ! base address
04112 add edx,eax
04113 sar ecx,1
04114 jnb 1f
04115 xor eax,eax
04116 movb al,(edx)
04117 push eax
04118 jmp ebx
04119 1:
04120 sar ecx,1
04121 jnb 1f
04122 xor eax,eax
04123 o16 mov ax,(edx)
04124 push eax
04125 jmp ebx
04126 1:
04127 xchg edx,esi ! saved esi
04128 mov eax,ecx
04129 sal eax,2
04130 sub esp,eax
04131 mov eax,edi ! save edi
04132 mov edi,esp
04133 rep movs
04134 mov edi,eax
04135 mov esi,edx
04136 jmp ebx
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_loi.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
04200 .sect .text; .sect .rom; .sect .data; .sect .bss
04201 .sect .text
04202 .define .loi
04203 .define .los
04204
04205 ! #bytes in ecx
04206 ! address in ebx
04207 ! save esi/edi. they might be register variables
04208 .los:
04209 pop edx
04210 mov eax,ecx
04211 sar ecx,1
04212 jnb 1f
04213 movsxb eax,(ebx)
04214 push eax
04215 jmp edx
04216 1:
04217 sar ecx,1
04218 jnb 1f
04219 movsx eax,(ebx)
04220 push eax
04221 jmp edx
04222 1:
04223 push edx
04224 mov edx,esi
04225 mov esi,ebx
04226 pop ebx
04227 sub esp,eax
04228 jmp 1f
04229
04230 .loi:
04231 ! only called with size >= 4
04232 mov edx,esi
04233 mov esi,ebx
04234 pop ebx
04235 sub esp,ecx
04236 sar ecx,2
04237 1:
04238 mov eax,edi
04239 mov edi,esp
04240 rep movs
04241 mov esi,edx
04242 mov edi,eax
04243 jmp ebx
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_mlf4.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
04300 .sect .text; .sect .rom; .sect .data; .sect .bss
04301 .define .mlf4
04302
04303 .sect .text
04304 .mlf4:
04305 mov bx,sp
04306 flds 4(bx)
04307 fmuls 8(bx)
04308 fstps 8(bx)
04309 wait
04310 ret
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_mlf8.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
04400 .sect .text; .sect .rom; .sect .data; .sect .bss
04401 .define .mlf8
04402
04403 .sect .text
04404 .mlf8:
04405 mov bx,sp
04406 fldd 4(bx)
04407 fmuld 12(bx)
04408 fstpd 12(bx)
04409 wait
04410 ret
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_mli.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
04500 .sect .text; .sect .rom; .sect .data; .sect .bss
04501 .sect .text
04502 .define .mli
04503
04504 ! #bytes in eax
04505 .mli:
04506 pop ebx ! return address
04507 cmp eax,4
04508 jne 1f
04509 pop eax
04510 pop ecx
04511 mul ecx
04512 push eax
04513 jmp ebx
04514 1:
04515 .extern EODDZ
04516 .extern .trp
04517 mov eax,EODDZ
04518 push ebx
04519 jmp .trp
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_mon.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
04600 .sect .text; .sect .rom; .sect .data; .sect .bss
04601 .sect .text
04602 .define .mon
04603
04604 .mon:
04605 .extern .stop
04606 call .stop
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_ngf4.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
04700 .sect .text; .sect .rom; .sect .data; .sect .bss
04701 .define .ngf4
04702
04703 .sect .text
04704 .ngf4:
04705 mov bx,sp
04706 flds 4(bx)
04707 fchs
04708 fstps 4(bx)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -