From: Ben Gras Date: Thu, 12 Apr 2007 16:30:59 +0000 (+0000) Subject: delete redundant source X-Git-Tag: v3.1.3~5 X-Git-Url: http://zhaoyanbai.com/repos/Bv9ARM.ch02.html?a=commitdiff_plain;h=7dd225ffb2b75539631de26661748093552246e4;p=minix.git delete redundant source --- diff --git a/lib/i386/em/byte_order.h b/lib/i386/em/byte_order.h deleted file mode 100755 index d08b45a5d..000000000 --- a/lib/i386/em/byte_order.h +++ /dev/null @@ -1,6 +0,0 @@ -#define CHAR_UNSIGNED 0 -#define MSB_AT_LOW_ADDRESS 0 -#define MSW_AT_LOW_ADDRESS 0 -#define FL_MSB_AT_LOW_ADDRESS 0 -#define FL_MSW_AT_LOW_ADDRESS 0 -#define FL_MSL_AT_LOW_ADDRESS 0 diff --git a/lib/i386/em/em_adf4.s b/lib/i386/em/em_adf4.s deleted file mode 100755 index c36c7b4d3..000000000 --- a/lib/i386/em/em_adf4.s +++ /dev/null @@ -1,11 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .adf4 - - .sect .text -.adf4: - mov bx,sp - flds 4(bx) - fadds 8(bx) - fstps 8(bx) - wait - ret diff --git a/lib/i386/em/em_adf8.s b/lib/i386/em/em_adf8.s deleted file mode 100755 index 253dda9e7..000000000 --- a/lib/i386/em/em_adf8.s +++ /dev/null @@ -1,11 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .adf8 - - .sect .text -.adf8: - mov bx,sp - fldd 4(bx) - faddd 12(bx) - fstpd 12(bx) - wait - ret diff --git a/lib/i386/em/em_adi.s b/lib/i386/em/em_adi.s deleted file mode 100755 index 396c197fe..000000000 --- a/lib/i386/em/em_adi.s +++ /dev/null @@ -1,18 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .adi - - ! #bytes in ecx , top of stack in eax - .sect .text -.adi: - pop ebx ! return address - cmp ecx,4 - jne 9f - pop ecx - add eax,ecx - jmp ebx -9: -.extern EODDZ -.extern .trp - mov eax,EODDZ - push ebx - jmp .trp diff --git a/lib/i386/em/em_and.s b/lib/i386/em/em_and.s deleted file mode 100755 index eddfa7976..000000000 --- a/lib/i386/em/em_and.s +++ /dev/null @@ -1,20 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .and - - ! #bytes in ecx - ! save edi; it might be a register variable - - .sect .text -.and: - pop ebx ! return address - mov edx,edi - mov edi,esp - add edi,ecx - sar ecx,2 -1: - pop eax - and eax,(edi) - stos - loop 1b - mov edi,edx - jmp ebx diff --git a/lib/i386/em/em_blm.s b/lib/i386/em/em_blm.s deleted file mode 100755 index a2a1c6814..000000000 --- a/lib/i386/em/em_blm.s +++ /dev/null @@ -1,16 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .blm - - ! ecx: count in words -.blm: - mov ebx,esp - mov eax,esi - mov edx,edi - mov edi,4(ebx) - mov esi,8(ebx) - rep movs - mov esi,eax - mov edi,edx - ret 8 - diff --git a/lib/i386/em/em_cff4.s b/lib/i386/em/em_cff4.s deleted file mode 100755 index 42b946433..000000000 --- a/lib/i386/em/em_cff4.s +++ /dev/null @@ -1,19 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .cff4 - - .sect .text -.cff4: - mov bx,sp - fldd 4(bx) - fstcw 4(bx) - wait - mov dx,4(bx) - and 4(bx),0xf3ff ! set to rounding mode - wait - fldcw 4(bx) - fstps 8(bx) - mov 4(bx),dx - wait - fldcw 4(bx) - wait - ret diff --git a/lib/i386/em/em_cff8.s b/lib/i386/em/em_cff8.s deleted file mode 100755 index cc038a818..000000000 --- a/lib/i386/em/em_cff8.s +++ /dev/null @@ -1,10 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .cff8 - - .sect .text -.cff8: - mov bx,sp - flds 4(bx) - fstpd 4(bx) - wait - ret diff --git a/lib/i386/em/em_cfi.s b/lib/i386/em/em_cfi.s deleted file mode 100755 index 900f4e5f3..000000000 --- a/lib/i386/em/em_cfi.s +++ /dev/null @@ -1,27 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .cfi - - .sect .text -.cfi: - mov bx,sp - fstcw 4(bx) - wait - mov dx,4(bx) - or 4(bx),0xc00 ! truncating mode - wait - fldcw 4(bx) - cmp 8(bx),4 - jne 2f - ! loc 4 loc ? cfi - flds 12(bx) - fistpl 12(bx) -1: - mov 4(bx),dx - wait - fldcw 4(bx) - ret -2: - ! loc 8 loc ? cfi - fldd 12(bx) - fistpl 16(bx) - jmp 1b diff --git a/lib/i386/em/em_cfu.s b/lib/i386/em/em_cfu.s deleted file mode 100755 index 96c98bb95..000000000 --- a/lib/i386/em/em_cfu.s +++ /dev/null @@ -1,38 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .cfu - - .sect .text -.cfu: - mov bx,sp - fstcw 4(bx) - wait - mov dx,4(bx) - or 4(bx),0xc00 ! truncating mode - wait - fldcw 4(bx) - cmp 8(bx),4 - jne 2f - ! loc 4 loc ? cfu - flds 12(bx) - fabs ! ??? - fiaddl (bigmin) - fistpl 12(bx) - wait - mov ax,12(bx) - sub ax,(bigmin) - mov 12(bx),ax -1: - mov 4(bx),dx - wait - fldcw 4(bx) - ret -2: - ! loc 8 loc ? cfu - fldd 12(bx) - fabs ! ??? - fiaddl (bigmin) - fistpl 16(bx) - mov ax,16(bx) - sub ax,(bigmin) - mov 16(bx),ax - jmp 1b diff --git a/lib/i386/em/em_cif4.s b/lib/i386/em/em_cif4.s deleted file mode 100755 index 0ccb187d5..000000000 --- a/lib/i386/em/em_cif4.s +++ /dev/null @@ -1,10 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .cif4 - - .sect .text -.cif4: - mov bx,sp - fildl 8(bx) - fstps 8(bx) - wait - ret diff --git a/lib/i386/em/em_cif8.s b/lib/i386/em/em_cif8.s deleted file mode 100755 index 94be62af0..000000000 --- a/lib/i386/em/em_cif8.s +++ /dev/null @@ -1,10 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .cif8 - - .sect .text -.cif8: - mov bx,sp - fildl 8(bx) - fstpd 4(bx) - wait - ret diff --git a/lib/i386/em/em_cii.s b/lib/i386/em/em_cii.s deleted file mode 100755 index 0ad7ce302..000000000 --- a/lib/i386/em/em_cii.s +++ /dev/null @@ -1,31 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .cii - -.sect .text -.cii: - pop ebx ! return address - ! pop ecx, dest. size - ! pop edx, src. size - ! eax is source - cmp edx,1 - jne 2f - movsxb eax,al - mov edx,4 - jmp 1f -2: - cmp edx,2 - jne 1f - cwde ! convert from 2 to 4 bytes - mov edx,4 -1: - cmp edx,ecx - jne 9f - cmp edx,4 - jne 9f - jmp ebx -9: -.extern EILLINS -.extern .fat - mov eax,EILLINS - push eax - jmp .fat diff --git a/lib/i386/em/em_cmf4.s b/lib/i386/em/em_cmf4.s deleted file mode 100755 index 0e2f02361..000000000 --- a/lib/i386/em/em_cmf4.s +++ /dev/null @@ -1,22 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .cmf4 - - .sect .text -.cmf4: - mov bx,sp - xor cx,cx - flds 8(bx) - flds 4(bx) - fcompp ! compare and pop operands - fstsw ax - wait - sahf - je 1f - jb 2f - dec cx - jmp 1f -2: - inc cx -1: - mov ax,cx - ret diff --git a/lib/i386/em/em_cmf8.s b/lib/i386/em/em_cmf8.s deleted file mode 100755 index 00a15db7d..000000000 --- a/lib/i386/em/em_cmf8.s +++ /dev/null @@ -1,22 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .cmf8 - - .sect .text -.cmf8: - mov bx,sp - xor cx,cx - fldd 12(bx) - fldd 4(bx) - fcompp ! compare and pop operands - fstsw ax - wait - sahf - je 1f - jb 2f - dec cx - jmp 1f -2: - inc cx -1: - mov ax,cx - ret diff --git a/lib/i386/em/em_cms.s b/lib/i386/em/em_cms.s deleted file mode 100755 index d8d263918..000000000 --- a/lib/i386/em/em_cms.s +++ /dev/null @@ -1,23 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .cms - - ! #bytes in ecx - .sect .text -.cms: - pop ebx ! return address - mov edx,esp - push esi - push edi - mov esi,edx - add edx,ecx - mov edi,edx - add edx,ecx - sar ecx,2 - repe cmps - je 1f - inc ecx -1: - pop edi - pop esi - mov esp,edx - jmp ebx diff --git a/lib/i386/em/em_com.s b/lib/i386/em/em_com.s deleted file mode 100755 index dfc5f702b..000000000 --- a/lib/i386/em/em_com.s +++ /dev/null @@ -1,14 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .com - - ! #bytes in ecx - .sect .text -.com: - mov ebx,esp - add ebx,4 - sar ecx,2 -1: - not (ebx) - add ebx,4 - loop 1b - ret diff --git a/lib/i386/em/em_csa4.s b/lib/i386/em/em_csa4.s deleted file mode 100755 index f90245062..000000000 --- a/lib/i386/em/em_csa4.s +++ /dev/null @@ -1,27 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .csa4 - -.sect .text -.csa4: - ! ebx, descriptor address - ! eax, index - mov edx,(ebx) ! default - sub eax,4(ebx) - cmp eax,8(ebx) - ja 1f - sal eax,2 - add ebx,eax - mov ebx,12(ebx) - test ebx,ebx - jnz 2f -1: - mov ebx,edx - test ebx,ebx - jnz 2f -.extern ECASE -.extern .fat - mov eax,ECASE - push eax - jmp .fat -2: - jmp ebx diff --git a/lib/i386/em/em_csb4.s b/lib/i386/em/em_csb4.s deleted file mode 100755 index 4a8214183..000000000 --- a/lib/i386/em/em_csb4.s +++ /dev/null @@ -1,29 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .csb4 - -.sect .text -.csb4: - !ebx, descriptor address - !eax, index - mov edx,(ebx) - mov ecx,4(ebx) -1: - add ebx,8 - dec ecx - jl 4f - cmp eax,(ebx) - jne 1b - mov ebx,4(ebx) -2: - test ebx,ebx - jnz 3f -.extern ECASE -.extern .fat - mov eax,ECASE - push eax - jmp .fat -3: - jmp ebx -4: - mov ebx,edx - jmp 2b diff --git a/lib/i386/em/em_cuf4.s b/lib/i386/em/em_cuf4.s deleted file mode 100755 index a99961b7a..000000000 --- a/lib/i386/em/em_cuf4.s +++ /dev/null @@ -1,15 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .cuf4 - - .sect .text -.cuf4: - mov bx,sp - fildl 8(bx) - cmp 8(bx),0 - jge 1f - fisubl (bigmin) - fisubl (bigmin) -1: - fstps 8(bx) - wait - ret diff --git a/lib/i386/em/em_cuf8.s b/lib/i386/em/em_cuf8.s deleted file mode 100755 index 928cb9fa9..000000000 --- a/lib/i386/em/em_cuf8.s +++ /dev/null @@ -1,15 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .cuf8 - - .sect .text -.cuf8: - mov bx,sp - fildl 8(bx) - cmp 8(bx),0 - jge 1f - fisubl (bigmin) - fisubl (bigmin) -1: - fstpd 4(bx) - wait - ret diff --git a/lib/i386/em/em_cuu.s b/lib/i386/em/em_cuu.s deleted file mode 100755 index 16177b6c3..000000000 --- a/lib/i386/em/em_cuu.s +++ /dev/null @@ -1,22 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .ciu -.define .cui -.define .cuu - -.sect .text -.ciu: -.cui: -.cuu: - pop ebx ! return address - ! pop ecx, dest. size - ! pop edx, source size - ! eax is source - cmp edx,ecx - jne 8f - jmp ebx -8: -.extern EILLINS -.extern .fat - mov eax,EILLINS - push eax - jmp .fat diff --git a/lib/i386/em/em_dup.s b/lib/i386/em/em_dup.s deleted file mode 100755 index 071a46c32..000000000 --- a/lib/i386/em/em_dup.s +++ /dev/null @@ -1,17 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .dup - - ! #bytes in ecx - .sect .text -.dup: - pop ebx ! return address - mov eax,esi - mov edx,edi - mov esi,esp - sub esp,ecx - mov edi,esp - sar ecx,2 - rep movs - mov esi,eax - mov edi,edx - jmp ebx diff --git a/lib/i386/em/em_dvf4.s b/lib/i386/em/em_dvf4.s deleted file mode 100755 index 8897227bf..000000000 --- a/lib/i386/em/em_dvf4.s +++ /dev/null @@ -1,11 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .dvf4 - - .sect .text -.dvf4: - mov bx,sp - flds 8(bx) - fdivs 4(bx) - fstps 8(bx) - wait - ret diff --git a/lib/i386/em/em_dvf8.s b/lib/i386/em/em_dvf8.s deleted file mode 100755 index 8fb6a47fe..000000000 --- a/lib/i386/em/em_dvf8.s +++ /dev/null @@ -1,11 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .dvf8 - - .sect .text -.dvf8: - mov bx,sp - fldd 12(bx) - fdivd 4(bx) - fstpd 12(bx) - wait - ret diff --git a/lib/i386/em/em_dvi.s b/lib/i386/em/em_dvi.s deleted file mode 100755 index f7a87300e..000000000 --- a/lib/i386/em/em_dvi.s +++ /dev/null @@ -1,21 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .dvi - - ! #bytes in eax - .sect .text -.dvi: - pop ebx ! return address - cmp eax,4 - jne 1f - pop eax - cwd - pop ecx - idiv ecx - push eax - jmp ebx -1: -.extern EODDZ -.extern .trp - mov eax,EODDZ - push ebx - jmp .trp diff --git a/lib/i386/em/em_dvu.s b/lib/i386/em/em_dvu.s deleted file mode 100755 index 5f5a71784..000000000 --- a/lib/i386/em/em_dvu.s +++ /dev/null @@ -1,21 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .dvu - - ! #bytes in eax - .sect .text -.dvu: - pop ebx ! return address - cmp eax,4 - jne 1f - pop eax - xor edx,edx - pop ecx - div ecx - push eax - jmp ebx -1: -.extern EODDZ -.extern .trp - mov eax,EODDZ - push ebx - jmp .trp diff --git a/lib/i386/em/em_error.s b/lib/i386/em/em_error.s deleted file mode 100755 index f2501e152..000000000 --- a/lib/i386/em/em_error.s +++ /dev/null @@ -1,32 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .error -.define .Xtrp - - ! eax is trap number - ! all registers must be saved - ! because return is possible - ! May only be called with error no's <16 -.sect .text -.error: - mov ecx,eax - mov ebx,1 - sal ebx,cl -.extern .ignmask -.extern .trp - test ebx,(.ignmask) - jne 2f - call .trp -2: - ret - -.Xtrp: - pusha - cmp eax,16 - jge 1f - call .error - popa - ret -1: - call .trp - popa - ret diff --git a/lib/i386/em/em_exg.s b/lib/i386/em/em_exg.s deleted file mode 100755 index ad693dbaa..000000000 --- a/lib/i386/em/em_exg.s +++ /dev/null @@ -1,22 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .exg - - ! #bytes in ecx -.sect .text -.exg: - push edi - mov edi,esp - add edi,8 - mov ebx,edi - add ebx,ecx - sar ecx,2 -1: - mov eax,(ebx) - xchg eax,(edi) - mov (ebx),eax - add edi,4 - add ebx,4 - loop 1b -2: - pop edi - ret diff --git a/lib/i386/em/em_fat.s b/lib/i386/em/em_fat.s deleted file mode 100755 index 0302552dc..000000000 --- a/lib/i386/em/em_fat.s +++ /dev/null @@ -1,10 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .fat - -.fat: -.extern .trp -.extern .stop - call .trp - call .stop - ! no return diff --git a/lib/i386/em/em_fef4.s b/lib/i386/em/em_fef4.s deleted file mode 100755 index adc69799e..000000000 --- a/lib/i386/em/em_fef4.s +++ /dev/null @@ -1,49 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .fef4 - - .sect .text -.fef4: - ! this could be simpler, if only the - ! fxtract instruction was emulated properly - mov bx,sp - mov ax,8(bx) - and ax,0x7f800000 - je 1f ! zero exponent - shr ax,23 - sub ax,126 - mov cx,ax ! exponent in cx - mov ax,8(bx) - and ax,0x807fffff - or ax,0x3f000000 ! load -1 exponent - mov bx,4(bx) - mov 4(bx),ax - mov (bx),cx - ret -1: ! we get here on zero exp - mov ax,8(bx) - and ax,0x007fffff - jne 1f ! zero result - mov bx,4(bx) - mov (bx),ax - mov 4(bx),ax - ret -1: ! otherwise unnormalized number - mov cx,8(bx) - and cx,0x807fffff - mov dx,cx - and cx,0x80000000 - mov ax,-125 -2: - test dx,0x800000 - jne 1f - dec ax - shl dx,1 - or dx,cx - jmp 2b -1: - mov bx,4(bx) - mov (bx),ax - and dx,0x807fffff - or dx,0x3f000000 ! load -1 exponent - mov 4(bx),dx - ret diff --git a/lib/i386/em/em_fef8.s b/lib/i386/em/em_fef8.s deleted file mode 100755 index 48234edb2..000000000 --- a/lib/i386/em/em_fef8.s +++ /dev/null @@ -1,56 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .fef8 - - .sect .text -.fef8: - ! this could be simpler, if only the - ! fxtract instruction was emulated properly - mov bx,sp - mov ax,12(bx) - and ax,0x7ff00000 - je 1f ! zero exponent - shr ax,20 - sub ax,1022 - mov cx,ax ! exponent in cx - mov ax,12(bx) - and ax,0x800fffff - or ax,0x3fe00000 ! load -1 exponent - mov dx,8(bx) - mov bx,4(bx) - mov 4(bx),dx - mov 8(bx),ax - mov (bx),cx - ret -1: ! we get here on zero exp - mov ax,12(bx) - and ax,0xfffff - or ax,8(bx) - jne 1f ! zero result - mov bx,4(bx) - mov (bx),ax - mov 4(bx),ax - mov 8(bx),ax - ret -1: ! otherwise unnormalized number - mov cx,12(bx) - and cx,0x800fffff - mov dx,cx - and cx,0x80000000 - mov ax,-1021 -2: - test dx,0x100000 - jne 1f - dec ax - shl 8(bx),1 - rcl dx,1 - or dx,cx - jmp 2b -1: - and dx,0x800fffff - or dx,0x3fe00000 ! load -1 exponent - mov cx,8(bx) - mov bx,4(bx) - mov (bx),ax - mov 8(bx),dx - mov 4(bx),cx - ret diff --git a/lib/i386/em/em_fif4.s b/lib/i386/em/em_fif4.s deleted file mode 100755 index 04f702f0e..000000000 --- a/lib/i386/em/em_fif4.s +++ /dev/null @@ -1,37 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .fif4 - - .sect .text -.fif4: - mov bx,sp - flds 8(bx) - fmuls 12(bx) ! multiply - fld st ! copy result - ftst ! test sign; handle negative separately - fstsw ax - wait - sahf ! result of test in condition codes - jb 1f - frndint ! this one rounds (?) - fcom st(1) ! compare with original; if <=, then OK - fstsw ax - wait - sahf - jbe 2f - fisubs (one) ! else subtract 1 - jmp 2f -1: ! here, negative case - frndint ! this one rounds (?) - fcom st(1) ! compare with original; if >=, then OK - fstsw ax - wait - sahf - jae 2f - fiadds (one) ! else add 1 -2: - fsub st(1),st ! subtract integer part - mov bx,4(bx) - fstps (bx) - fstps 4(bx) - wait - ret diff --git a/lib/i386/em/em_fif8.s b/lib/i386/em/em_fif8.s deleted file mode 100755 index 2b8154d11..000000000 --- a/lib/i386/em/em_fif8.s +++ /dev/null @@ -1,37 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .fif8 - - .sect .text -.fif8: - mov bx,sp - fldd 8(bx) - fmuld 16(bx) ! multiply - fld st ! and copy result - ftst ! test sign; handle negative separately - fstsw ax - wait - sahf ! result of test in condition codes - jb 1f - frndint ! this one rounds (?) - fcom st(1) ! compare with original; if <=, then OK - fstsw ax - wait - sahf - jbe 2f - fisubs (one) ! else subtract 1 - jmp 2f -1: ! here, negative case - frndint ! this one rounds (?) - fcom st(1) ! compare with original; if >=, then OK - fstsw ax - wait - sahf - jae 2f - fiadds (one) ! else add 1 -2: - fsub st(1),st ! subtract integer part - mov bx,4(bx) - fstpd (bx) - fstpd 8(bx) - wait - ret diff --git a/lib/i386/em/em_fp8087.s b/lib/i386/em/em_fp8087.s deleted file mode 100755 index 53f6b7f93..000000000 --- a/lib/i386/em/em_fp8087.s +++ /dev/null @@ -1,10 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define one, bigmin - - .sect .rom -one: - .data2 1 -two: - .data2 2 -bigmin: - .data4 -2147483648 diff --git a/lib/i386/em/em_gto.s b/lib/i386/em/em_gto.s deleted file mode 100755 index 0149f27ca..000000000 --- a/lib/i386/em/em_gto.s +++ /dev/null @@ -1,8 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .gto - -.gto: - mov ebp,8(ebx) - mov esp,4(ebx) - jmp (ebx) diff --git a/lib/i386/em/em_hol0.s b/lib/i386/em/em_hol0.s deleted file mode 100755 index 8c919aeee..000000000 --- a/lib/i386/em/em_hol0.s +++ /dev/null @@ -1,7 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss - -.define hol0 -.sect .data -hol0: - .data4 0, 0 - .data4 0, 0 diff --git a/lib/i386/em/em_iaar.s b/lib/i386/em/em_iaar.s deleted file mode 100755 index b74dc3fa4..000000000 --- a/lib/i386/em/em_iaar.s +++ /dev/null @@ -1,18 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .iaar - -.iaar: - pop ecx - pop edx - cmp edx,4 -.extern .unknown - jne .unknown - pop ebx ! descriptor address - pop eax ! index - sub eax,(ebx) - mul 8(ebx) - pop ebx ! array base - add ebx,eax - push ecx - ret diff --git a/lib/i386/em/em_ilar.s b/lib/i386/em/em_ilar.s deleted file mode 100755 index 15514863e..000000000 --- a/lib/i386/em/em_ilar.s +++ /dev/null @@ -1,15 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .ilar - -.ilar: - pop ecx - pop edx -.extern .unknown - cmp edx,4 - jne .unknown - pop ebx ! descriptor address - pop eax ! index - push ecx -.extern .lar4 - jmp .lar4 diff --git a/lib/i386/em/em_inn.s b/lib/i386/em/em_inn.s deleted file mode 100755 index 95d8ac01b..000000000 --- a/lib/i386/em/em_inn.s +++ /dev/null @@ -1,32 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .inn - - ! #bytes in ecx - ! bit # in eax -.inn: - xor edx,edx - mov ebx,8 - div ebx - mov ebx,esp - add ebx,4 - add ebx,eax - cmp eax,ecx - jae 1f - movb al,(ebx) - mov ebx,edx - testb al,bits(ebx) - jz 1f - mov eax,1 - jmp 2f -1: - xor eax,eax -2: - pop ebx - add esp,ecx - ! eax is result - jmp ebx - - .sect .rom -bits: - .data1 1,2,4,8,16,32,64,128 diff --git a/lib/i386/em/em_ior.s b/lib/i386/em/em_ior.s deleted file mode 100755 index 3981ff5ae..000000000 --- a/lib/i386/em/em_ior.s +++ /dev/null @@ -1,18 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .ior - - ! #bytes in ecx -.ior: - pop ebx ! return address - mov edx,edi - mov edi,esp - add edi,ecx - sar ecx,2 -1: - pop eax - or eax,(edi) - stos - loop 1b - mov edi,edx - jmp ebx diff --git a/lib/i386/em/em_isar.s b/lib/i386/em/em_isar.s deleted file mode 100755 index 75b46b7b5..000000000 --- a/lib/i386/em/em_isar.s +++ /dev/null @@ -1,15 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .isar - -.isar: - pop ecx - pop eax - cmp eax,4 -.extern .unknown - jne .unknown - pop ebx ! descriptor address - pop eax ! index - push ecx -.extern .sar4 - jmp .sar4 diff --git a/lib/i386/em/em_lar4.s b/lib/i386/em/em_lar4.s deleted file mode 100755 index 643ec961f..000000000 --- a/lib/i386/em/em_lar4.s +++ /dev/null @@ -1,37 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .lar4 - -.lar4: - ! ebx, descriptor address - ! eax, index - sub eax,(ebx) - mov ecx,8(ebx) - imul ecx - pop ebx - pop edx ! base address - add edx,eax - sar ecx,1 - jnb 1f - xor eax,eax - movb al,(edx) - push eax - jmp ebx -1: - sar ecx,1 - jnb 1f - xor eax,eax - o16 mov ax,(edx) - push eax - jmp ebx -1: - xchg edx,esi ! saved esi - mov eax,ecx - sal eax,2 - sub esp,eax - mov eax,edi ! save edi - mov edi,esp - rep movs - mov edi,eax - mov esi,edx - jmp ebx diff --git a/lib/i386/em/em_loi.s b/lib/i386/em/em_loi.s deleted file mode 100755 index c0ed170d5..000000000 --- a/lib/i386/em/em_loi.s +++ /dev/null @@ -1,44 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .loi -.define .los - - ! #bytes in ecx - ! address in ebx - ! save esi/edi. they might be register variables -.los: - pop edx - mov eax,ecx - sar ecx,1 - jnb 1f - movsxb eax,(ebx) - push eax - jmp edx -1: - sar ecx,1 - jnb 1f - movsx eax,(ebx) - push eax - jmp edx -1: - push edx - mov edx,esi - mov esi,ebx - pop ebx - sub esp,eax - jmp 1f - -.loi: - ! only called with size >= 4 - mov edx,esi - mov esi,ebx - pop ebx - sub esp,ecx - sar ecx,2 -1: - mov eax,edi - mov edi,esp - rep movs - mov esi,edx - mov edi,eax - jmp ebx diff --git a/lib/i386/em/em_mlf4.s b/lib/i386/em/em_mlf4.s deleted file mode 100755 index e3068ac6c..000000000 --- a/lib/i386/em/em_mlf4.s +++ /dev/null @@ -1,11 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .mlf4 - - .sect .text -.mlf4: - mov bx,sp - flds 4(bx) - fmuls 8(bx) - fstps 8(bx) - wait - ret diff --git a/lib/i386/em/em_mlf8.s b/lib/i386/em/em_mlf8.s deleted file mode 100755 index 56ff130ef..000000000 --- a/lib/i386/em/em_mlf8.s +++ /dev/null @@ -1,11 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .mlf8 - - .sect .text -.mlf8: - mov bx,sp - fldd 4(bx) - fmuld 12(bx) - fstpd 12(bx) - wait - ret diff --git a/lib/i386/em/em_mli.s b/lib/i386/em/em_mli.s deleted file mode 100755 index 84185fb62..000000000 --- a/lib/i386/em/em_mli.s +++ /dev/null @@ -1,20 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .mli - - ! #bytes in eax -.mli: - pop ebx ! return address - cmp eax,4 - jne 1f - pop eax - pop ecx - mul ecx - push eax - jmp ebx -1: -.extern EODDZ -.extern .trp - mov eax,EODDZ - push ebx - jmp .trp diff --git a/lib/i386/em/em_mon.s b/lib/i386/em/em_mon.s deleted file mode 100755 index 42cac7ca8..000000000 --- a/lib/i386/em/em_mon.s +++ /dev/null @@ -1,7 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .mon - -.mon: -.extern .stop - call .stop diff --git a/lib/i386/em/em_ngf4.s b/lib/i386/em/em_ngf4.s deleted file mode 100755 index e21fe2b0c..000000000 --- a/lib/i386/em/em_ngf4.s +++ /dev/null @@ -1,11 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .ngf4 - - .sect .text -.ngf4: - mov bx,sp - flds 4(bx) - fchs - fstps 4(bx) - wait - ret diff --git a/lib/i386/em/em_ngf8.s b/lib/i386/em/em_ngf8.s deleted file mode 100755 index baec4bcf3..000000000 --- a/lib/i386/em/em_ngf8.s +++ /dev/null @@ -1,11 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .ngf8 - - .sect .text -.ngf8: - mov bx,sp - fldd 4(bx) - fchs - fstpd 4(bx) - wait - ret diff --git a/lib/i386/em/em_ngi.s b/lib/i386/em/em_ngi.s deleted file mode 100755 index b15a1fab8..000000000 --- a/lib/i386/em/em_ngi.s +++ /dev/null @@ -1,19 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .ngi - - ! #bytes in eax -.ngi: - pop ebx ! return address - cmp eax,4 - jne 1f - pop ecx - neg ecx - push ecx - jmp ebx -1: -.extern EODDZ -.extern .trp - mov eax,EODDZ - push ebx - jmp .trp diff --git a/lib/i386/em/em_nop.s b/lib/i386/em/em_nop.s deleted file mode 100755 index 46fbbb7ff..000000000 --- a/lib/i386/em/em_nop.s +++ /dev/null @@ -1,10 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .nop -.extern printd, printc, hol0 - -.nop: - mov eax,(hol0) - call printd - movb al,'\n' - jmp printc diff --git a/lib/i386/em/em_print.s b/lib/i386/em/em_print.s deleted file mode 100755 index 8b09b5044..000000000 --- a/lib/i386/em/em_print.s +++ /dev/null @@ -1,47 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define printc,printd,prints - - ! argument in eax - ! uses ebx -prints: - xchg eax,ebx -1: - movb al,(ebx) - inc ebx - testb al,al - jz 2f - call printc - jmp 1b -2: - ret - - ! argument in eax - ! uses ecx and edx -printd: - xor edx,edx - mov ecx,10 - div ecx - test eax,eax - jz 1f - push edx - call printd - pop edx -1: - xchg eax,edx - addb al,'0' - - ! argument in eax -printc: - push eax - mov ebx,esp - mov eax,1 - push eax - push ebx - push eax - call __write - pop ebx - pop ebx - pop ebx - pop ebx - ret diff --git a/lib/i386/em/em_rck.s b/lib/i386/em/em_rck.s deleted file mode 100755 index e1a6669e4..000000000 --- a/lib/i386/em/em_rck.s +++ /dev/null @@ -1,20 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .rck - - ! descriptor address in ebx - ! value in eax, must be left there -.rck: - cmp eax,(ebx) - jl 2f - cmp eax,4(ebx) - jg 2f - ret -2: - push eax -.extern ERANGE -.extern .error - mov eax,ERANGE - call .error - pop eax - ret diff --git a/lib/i386/em/em_rmi.s b/lib/i386/em/em_rmi.s deleted file mode 100755 index 775abbdd7..000000000 --- a/lib/i386/em/em_rmi.s +++ /dev/null @@ -1,21 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .rmi - - ! #bytes in eax -.rmi: - pop ebx ! return address - cmp eax,4 - jne 1f - pop eax - cwd - pop ecx - idiv ecx - push edx - jmp ebx -1: -.extern EODDZ -.extern .trp - mov eax,EODDZ - push ebx - jmp .trp diff --git a/lib/i386/em/em_rmu.s b/lib/i386/em/em_rmu.s deleted file mode 100755 index d51029d58..000000000 --- a/lib/i386/em/em_rmu.s +++ /dev/null @@ -1,21 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .rmu - - ! #bytes in eax -.rmu: - pop ebx ! return address - cmp eax,4 - jne 1f - pop eax - xor edx,edx - pop ecx - idiv ecx - push edx - jmp ebx -1: -.extern EODDZ -.extern .trp - mov eax,EODDZ - push ebx - jmp .trp diff --git a/lib/i386/em/em_rol.s b/lib/i386/em/em_rol.s deleted file mode 100755 index 68365d7fc..000000000 --- a/lib/i386/em/em_rol.s +++ /dev/null @@ -1,20 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .rol - - ! #bytes in eax -.rol: - pop edx ! return address - cmp eax,4 - jne 1f - pop eax - pop ecx - rol eax,cl - push eax - jmp edx -1: -.extern EODDZ -.extern .trp - mov eax,EODDZ - push edx - jmp .trp diff --git a/lib/i386/em/em_ror.s b/lib/i386/em/em_ror.s deleted file mode 100755 index ef34a9658..000000000 --- a/lib/i386/em/em_ror.s +++ /dev/null @@ -1,20 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .ror - - ! #bytes in eax -.ror: - pop edx ! return address - cmp eax,4 - jne 1f - pop eax - pop ecx - ror eax,cl - push eax - jmp edx -1: -.extern EODDZ -.extern .trp - mov eax,EODDZ - push edx - jmp .trp diff --git a/lib/i386/em/em_sar4.s b/lib/i386/em/em_sar4.s deleted file mode 100755 index 52a1f6192..000000000 --- a/lib/i386/em/em_sar4.s +++ /dev/null @@ -1,33 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .sar4 - -.sar4: - ! ebx, descriptor address - ! eax, index - sub eax,(ebx) - mov ecx,8(ebx) - imul ecx - pop ebx - pop edx ! base address - add edx,eax - sar ecx,1 - jnb 1f - pop eax - movb (edx),al - jmp ebx -1: - sar ecx,1 - jnb 1f - pop eax - o16 mov (edx),ax - jmp ebx -1: - xchg edi,edx ! edi = base address, edx is saved edi - mov eax,esi - mov esi,esp - rep movs - mov esp,esi - mov esi,eax - mov edi,edx - jmp ebx diff --git a/lib/i386/em/em_sbf4.s b/lib/i386/em/em_sbf4.s deleted file mode 100755 index e76f9d1aa..000000000 --- a/lib/i386/em/em_sbf4.s +++ /dev/null @@ -1,11 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .sbf4 - - .sect .text -.sbf4: - mov bx,sp - flds 8(bx) - fsubs 4(bx) - fstps 8(bx) - wait - ret diff --git a/lib/i386/em/em_sbf8.s b/lib/i386/em/em_sbf8.s deleted file mode 100755 index cab3d7830..000000000 --- a/lib/i386/em/em_sbf8.s +++ /dev/null @@ -1,11 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define .sbf8 - - .sect .text -.sbf8: - mov bx,sp - fldd 12(bx) - fsubd 4(bx) - fstpd 12(bx) - wait - ret diff --git a/lib/i386/em/em_sbi.s b/lib/i386/em/em_sbi.s deleted file mode 100755 index 2897d3181..000000000 --- a/lib/i386/em/em_sbi.s +++ /dev/null @@ -1,19 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .sbi - - ! #bytes in ecx , top of stack in eax -.sbi: - pop ebx ! return subress - cmp ecx,4 - jne 1f - pop ecx - sub eax,ecx - neg eax - jmp ebx -1: -.extern EODDZ -.extern .trp - mov eax,EODDZ - push ebx - jmp .trp diff --git a/lib/i386/em/em_set.s b/lib/i386/em/em_set.s deleted file mode 100755 index 3493eac52..000000000 --- a/lib/i386/em/em_set.s +++ /dev/null @@ -1,42 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .set - - ! #bytes in ecx - ! bit # in eax -.set: - pop ebx ! return address - xor edx,edx -!ifdef create set - sub esp,ecx - push ebx - push edi - mov ebx,esp - xor edi,edi - sar ecx,2 -1: - mov 8(ebx)(edi),edx - add edi,4 - loop 1b -!endif - mov ebx,8 - div ebx - cmp eax,edi - jae 2f - mov edi,edx - movb dl,bits(edi) - mov edi,esp - add edi,eax - orb 8(edi),dl - pop edi - ret -2: -.extern ESET -.extern .trp - pop edi - mov eax,ESET - jmp .trp - - .sect .rom -bits: - .data1 1,2,4,8,16,32,64,128 diff --git a/lib/i386/em/em_sli.s b/lib/i386/em/em_sli.s deleted file mode 100755 index dd5b61667..000000000 --- a/lib/i386/em/em_sli.s +++ /dev/null @@ -1,20 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .sli - - ! #bytes in eax -.sli: - pop edx ! return address - cmp eax,4 - jne 1f - pop eax - pop ecx - sal eax,cl - push eax - jmp edx -1: -.extern EODDZ -.extern .trp - mov eax,EODDZ - push edx - jmp .trp diff --git a/lib/i386/em/em_sri.s b/lib/i386/em/em_sri.s deleted file mode 100755 index 2fb78715f..000000000 --- a/lib/i386/em/em_sri.s +++ /dev/null @@ -1,20 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .sri - - ! #bytes in eax -.sri: - pop edx ! return address - cmp eax,4 - jne 1f - pop eax - pop ecx - sar eax,cl - push eax - jmp edx -1: -.extern EODDZ -.extern .trp - mov eax,EODDZ - push edx - jmp .trp diff --git a/lib/i386/em/em_sti.s b/lib/i386/em/em_sti.s deleted file mode 100755 index 12385eedd..000000000 --- a/lib/i386/em/em_sti.s +++ /dev/null @@ -1,41 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .sti -.define .sts - - ! #bytes in ecx - ! address in ebx - ! save edi/esi. they might be register variables -.sts: - pop edx - sar ecx,1 - jnb 1f - pop eax - movb (ebx),al - jmp edx -1: - sar ecx,1 - jnb 1f - pop eax - o16 mov (ebx),ax - jmp edx -1: - push edx - mov edx,edi - mov edi,ebx - pop ebx - jmp 1f -.sti: - ! only called with count >> 4 - mov edx,edi - mov edi,ebx - pop ebx - sar ecx,2 -1: - mov eax,esi - mov esi,esp - rep movs - mov esp,esi - mov edi,edx - mov esi,eax - jmp ebx diff --git a/lib/i386/em/em_stop.s b/lib/i386/em/em_stop.s deleted file mode 100755 index 476045f0a..000000000 --- a/lib/i386/em/em_stop.s +++ /dev/null @@ -1,5 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .stop -.stop: - jmp ___exit diff --git a/lib/i386/em/em_trp.s b/lib/i386/em/em_trp.s deleted file mode 100755 index 24af0e6f4..000000000 --- a/lib/i386/em/em_trp.s +++ /dev/null @@ -1,18 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .trp -.extern .trppc, .stop - - ! eax is trap number -.trp: - xor ebx,ebx - xchg ebx,(.trppc) - test ebx,ebx - jz 2f - push eax - call ebx - pop eax - ret -2: - push eax - call .stop diff --git a/lib/i386/em/em_unknown.s b/lib/i386/em/em_unknown.s deleted file mode 100755 index 59425f25c..000000000 --- a/lib/i386/em/em_unknown.s +++ /dev/null @@ -1,9 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .unknown -.extern EILLINS, .fat - -.unknown: - mov eax,EILLINS - push eax - jmp .fat diff --git a/lib/i386/em/em_xor.s b/lib/i386/em/em_xor.s deleted file mode 100755 index 2dfb30d96..000000000 --- a/lib/i386/em/em_xor.s +++ /dev/null @@ -1,18 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.sect .text -.define .xor - - ! #bytes in ecx -.xor: - pop ebx ! return address - mov edx,edi - mov edi,esp - add edi,ecx - sar ecx,2 -1: - pop eax - xor eax,(edi) - stos - loop 1b - mov edi,edx - jmp ebx diff --git a/lib/i386/head/em_abs.h b/lib/i386/head/em_abs.h deleted file mode 100755 index 9855cff5a..000000000 --- a/lib/i386/head/em_abs.h +++ /dev/null @@ -1,35 +0,0 @@ -/* $Header$ */ -/* - * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. - * See the copyright notice in the ACK home directory, in the file "Copyright". - */ -#define LINO_AD 0 -#define FILN_AD 4 - -#define LINO (*(int *)(_hol0()+LINO_AD)) -#define FILN (*(char **)(_hol0()+FILN_AD)) - -#define EARRAY 0 -#define ERANGE 1 -#define ESET 2 -#define EIOVFL 3 -#define EFOVFL 4 -#define EFUNFL 5 -#define EIDIVZ 6 -#define EFDIVZ 7 -#define EIUND 8 -#define EFUND 9 -#define ECONV 10 - -#define ESTACK 16 -#define EHEAP 17 -#define EILLINS 18 -#define EODDZ 19 -#define ECASE 20 -#define EMEMFLT 21 -#define EBADPTR 22 -#define EBADPC 23 -#define EBADLAE 24 -#define EBADMON 25 -#define EBADLIN 26 -#define EBADGTO 27 diff --git a/lib/i386/head/em_head.s b/lib/i386/head/em_head.s deleted file mode 100755 index 2164dbcc7..000000000 --- a/lib/i386/head/em_head.s +++ /dev/null @@ -1,20 +0,0 @@ -# -.sect .text; .sect .rom; .sect .data; .sect .bss -.define ERANGE,ESET,EHEAP,ECASE,EILLINS,EIDIVZ,EODDZ -.define .trppc, .ignmask - -ERANGE = 1 -ESET = 2 -EIDIVZ = 6 -EHEAP = 17 -EILLINS = 18 -EODDZ = 19 -ECASE = 20 - -#include - -.sect .data -.trppc: - .data4 0 -.ignmask: - .data4 EIOVFL | EIUND | ECONV | EFOVFL | EFUNFL