📄 lib386.txt
字号:
01713 mov ebx,12(ebx)
01714 test ebx,ebx
01715 jnz 2f
01716 1:
01717 mov ebx,edx
01718 test ebx,ebx
01719 jnz 2f
01720 .extern ECASE
01721 .extern .fat
01722 mov eax,ECASE
01723 push eax
01724 jmp .fat
01725 2:
01726 jmp ebx
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_csb4.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
01800 .sect .text; .sect .rom; .sect .data; .sect .bss
01801 .define .csb4
01802
01803 .sect .text
01804 .csb4:
01805 !ebx, descriptor address
01806 !eax, index
01807 mov edx,(ebx)
01808 mov ecx,4(ebx)
01809 1:
01810 add ebx,8
01811 dec ecx
01812 jl 4f
01813 cmp eax,(ebx)
01814 jne 1b
01815 mov ebx,4(ebx)
01816 2:
01817 test ebx,ebx
01818 jnz 3f
01819 .extern ECASE
01820 .extern .fat
01821 mov eax,ECASE
01822 push eax
01823 jmp .fat
01824 3:
01825 jmp ebx
01826 4:
01827 mov ebx,edx
01828 jmp 2b
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_cuf4.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
01900 .sect .text; .sect .rom; .sect .data; .sect .bss
01901 .define .cuf4
01902
01903 .sect .text
01904 .cuf4:
01905 mov bx,sp
01906 fildl 8(bx)
01907 cmp 8(bx),0
01908 jge 1f
01909 fisubl (bigmin)
01910 fisubl (bigmin)
01911 1:
01912 fstps 8(bx)
01913 wait
01914 ret
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_cuf8.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
02000 .sect .text; .sect .rom; .sect .data; .sect .bss
02001 .define .cuf8
02002
02003 .sect .text
02004 .cuf8:
02005 mov bx,sp
02006 fildl 8(bx)
02007 cmp 8(bx),0
02008 jge 1f
02009 fisubl (bigmin)
02010 fisubl (bigmin)
02011 1:
02012 fstpd 4(bx)
02013 wait
02014 ret
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_cuu.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
02100 .sect .text; .sect .rom; .sect .data; .sect .bss
02101 .define .ciu
02102 .define .cui
02103 .define .cuu
02104
02105 .sect .text
02106 .ciu:
02107 .cui:
02108 .cuu:
02109 pop ebx ! return address
02110 ! pop ecx, dest. size
02111 ! pop edx, source size
02112 ! eax is source
02113 cmp edx,ecx
02114 jne 8f
02115 jmp ebx
02116 8:
02117 .extern EILLINS
02118 .extern .fat
02119 mov eax,EILLINS
02120 push eax
02121 jmp .fat
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_dup.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
02200 .sect .text; .sect .rom; .sect .data; .sect .bss
02201 .define .dup
02202
02203 ! #bytes in ecx
02204 .sect .text
02205 .dup:
02206 pop ebx ! return address
02207 mov eax,esi
02208 mov edx,edi
02209 mov esi,esp
02210 sub esp,ecx
02211 mov edi,esp
02212 sar ecx,2
02213 rep movs
02214 mov esi,eax
02215 mov edi,edx
02216 jmp ebx
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_dvf4.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
02300 .sect .text; .sect .rom; .sect .data; .sect .bss
02301 .define .dvf4
02302
02303 .sect .text
02304 .dvf4:
02305 mov bx,sp
02306 flds 8(bx)
02307 fdivs 4(bx)
02308 fstps 8(bx)
02309 wait
02310 ret
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_dvf8.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
02400 .sect .text; .sect .rom; .sect .data; .sect .bss
02401 .define .dvf8
02402
02403 .sect .text
02404 .dvf8:
02405 mov bx,sp
02406 fldd 12(bx)
02407 fdivd 4(bx)
02408 fstpd 12(bx)
02409 wait
02410 ret
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_dvi.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
02500 .sect .text; .sect .rom; .sect .data; .sect .bss
02501 .define .dvi
02502
02503 ! #bytes in eax
02504 .sect .text
02505 .dvi:
02506 pop ebx ! return address
02507 cmp eax,4
02508 jne 1f
02509 pop eax
02510 cwd
02511 pop ecx
02512 idiv ecx
02513 push eax
02514 jmp ebx
02515 1:
02516 .extern EODDZ
02517 .extern .trp
02518 mov eax,EODDZ
02519 push ebx
02520 jmp .trp
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_dvu.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
02600 .sect .text; .sect .rom; .sect .data; .sect .bss
02601 .define .dvu
02602
02603 ! #bytes in eax
02604 .sect .text
02605 .dvu:
02606 pop ebx ! return address
02607 cmp eax,4
02608 jne 1f
02609 pop eax
02610 xor edx,edx
02611 pop ecx
02612 div ecx
02613 push eax
02614 jmp ebx
02615 1:
02616 .extern EODDZ
02617 .extern .trp
02618 mov eax,EODDZ
02619 push ebx
02620 jmp .trp
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_error.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
02700 .sect .text; .sect .rom; .sect .data; .sect .bss
02701 .define .error
02702 .define .Xtrp
02703
02704 ! eax is trap number
02705 ! all registers must be saved
02706 ! because return is possible
02707 ! May only be called with error no's <16
02708 .sect .text
02709 .error:
02710 mov ecx,eax
02711 mov ebx,1
02712 sal ebx,cl
02713 .extern .ignmask
02714 .extern .trp
02715 test ebx,(.ignmask)
02716 jne 2f
02717 call .trp
02718 2:
02719 ret
02720
02721 .Xtrp:
02722 pusha
02723 cmp eax,16
02724 jge 1f
02725 call .error
02726 popa
02727 ret
02728 1:
02729 call .trp
02730 popa
02731 ret
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_exg.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
02800 .sect .text; .sect .rom; .sect .data; .sect .bss
02801 .define .exg
02802
02803 ! #bytes in ecx
02804 .sect .text
02805 .exg:
02806 push edi
02807 mov edi,esp
02808 add edi,8
02809 mov ebx,edi
02810 add ebx,ecx
02811 sar ecx,2
02812 1:
02813 mov eax,(ebx)
02814 xchg eax,(edi)
02815 mov (ebx),eax
02816 add edi,4
02817 add ebx,4
02818 loop 1b
02819 2:
02820 pop edi
02821 ret
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_fat.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
02900 .sect .text; .sect .rom; .sect .data; .sect .bss
02901 .sect .text
02902 .define .fat
02903
02904 .fat:
02905 .extern .trp
02906 .extern .stop
02907 call .trp
02908 call .stop
02909 ! no return
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_fef4.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
03000 .sect .text; .sect .rom; .sect .data; .sect .bss
03001 .define .fef4
03002
03003 .sect .text
03004 .fef4:
03005 ! this could be simpler, if only the
03006 ! fxtract instruction was emulated properly
03007 mov bx,sp
03008 mov ax,8(bx)
03009 and ax,0x7f800000
03010 je 1f ! zero exponent
03011 shr ax,23
03012 sub ax,126
03013 mov cx,ax ! exponent in cx
03014 mov ax,8(bx)
03015 and ax,0x807fffff
03016 or ax,0x3f000000 ! load -1 exponent
03017 mov bx,4(bx)
03018 mov 4(bx),ax
03019 mov (bx),cx
03020 ret
03021 1: ! we get here on zero exp
03022 mov ax,8(bx)
03023 and ax,0x007fffff
03024 jne 1f ! zero result
03025 mov bx,4(bx)
03026 mov (bx),ax
03027 mov 4(bx),ax
03028 ret
03029 1: ! otherwise unnormalized number
03030 mov cx,8(bx)
03031 and cx,0x807fffff
03032 mov dx,cx
03033 and cx,0x80000000
03034 mov ax,-125
03035 2:
03036 test dx,0x800000
03037 jne 1f
03038 dec ax
03039 shl dx,1
03040 or dx,cx
03041 jmp 2b
03042 1:
03043 mov bx,4(bx)
03044 mov (bx),ax
03045 and dx,0x807fffff
03046 or dx,0x3f000000 ! load -1 exponent
03047 mov 4(bx),dx
03048 ret
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/lib/i386/em/em_fef8.s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
03100 .sect .text; .sect .rom; .sect .data; .sect .bss
03101 .define .fef8
03102
03103 .sect .text
03104 .fef8:
03105 ! this could be simpler, if only the
03106 ! fxtract instruction was emulated properly
03107 mov bx,sp
03108 mov ax,12(bx)
03109 and ax,0x7ff00000
03110 je 1f ! zero exponent
03111 shr ax,20
03112 sub ax,1022
03113 mov cx,ax ! exponent in cx
03114 mov ax,12(bx)
03115 and ax,0x800fffff
03116 or ax,0x3fe00000 ! load -1 exponent
03117 mov dx,8(bx)
03118 mov bx,4(bx)
03119 mov 4(bx),dx
03120 mov 8(bx),ax
03121 mov (bx),cx
03122 ret
03123 1: ! we get here on zero exp
03124 mov ax,12(bx)
03125 and ax,0xfffff
03126 or ax,8(bx)
03127 jne 1f ! zero result
03128 mov bx,4(bx)
03129 mov (bx),ax
03130 mov 4(bx),ax
03131 mov 8(bx),ax
03132 ret
03133 1: ! otherwise unnormalized number
03134 mov cx,12(bx)
03135 and cx,0x800fffff
03136 mov dx,cx
03137 and cx,0x80000000
03138 mov ax,-1021
03139 2:
03140 test dx,0x100000
03141 jne 1f
03142 dec ax
03143 shl 8(bx),1
03144 rcl dx,1
03145 or dx,cx
03146 jmp 2b
03147 1:
03148 and dx,0x800fffff
03149 or dx,0x3fe00000 ! load -1 exponent
03150 mov cx,8(bx)
03151 mov bx,4(bx)
03152 mov (bx),ax
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -