⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 disas.asm

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 ASM
📖 第 1 页 / 共 5 页
字号:
	jmp	@@32_2
	;
@@32_1:	cmp	dh,10b		;32 bit displacement?
	jnz	@@32_2
	mov	es:b[edi],'+'
	inc	edi
@@NoBase32:	pushm	eax,ebx,ecx,edx
	mov	eax,fs:[esi]
	mov	eaOffset,eax
	add	esi,4
	or	eax,eax
	jns	@@sign1

; MED 11/16/96
; don't negative sign a 32-bit displacement
;	neg	eax
;	mov	es:d[edi-1],'-'

@@sign1:	mov	ecx,8
	mov	dx,0
	call	SymbolBin2Hex
	mov	es:b[edi],0
	popm	eax,ebx,ecx,edx
	;
@@32_2:	cmp	bl,100b		;any index?
	jnz	@@32_4
	cmp	bh,100b		;index of ESP, ie, no index?
	jz	@@32_4
	;
	mov	es:b[edi],']'
	inc	edi
	mov	es:b[edi],'['
	inc	edi
	push	esi
	movzx	esi,bh		;get the index register
	mov	eaIndex,bh
	inc	eaIndex
	or	eaIndex,128
	shl	esi,2
	add	esi,offset T_DWordRegs
	mov	esi,[esi]
@@32_5:	movsb
	cmp	b[esi-1],0
	jnz	@@32_5
	dec	edi
	pop	esi
	;
	cmp	ch,0		;any scaleing?
	jz	@@32_4
	mov	es:b[edi],'*'
	inc	edi
	mov	eaScale,1
	mov	al,'2'
	cmp	ch,1
	jz	@@32_6
	mov	eaScale,2
	mov	al,'4'
	cmp	ch,2
	jz	@@32_6
	mov	eaScale,3
	mov	al,'8'
@@32_6:	stosb
	;
@@32_4:	mov	es:b[edi],']'
	inc	edi
	mov	es:b[edi],0
	jmp	@@eaExit
	;
@@old16:	cmp	ch,0
	jnz	notea00
	cmp	bl,6
	jnz	notea00
	;
	or	eaMode,128
	mov	al,'['
	stosb
	movzx	eax,fs:w[esi]
	add	esi,2
	mov	ecx,4
	mov	dx,0
	mov	eaOffset,eax
	call	SymbolBin2Hex
	mov al,']'
	stosb
	xor	al,al
	stosb
	dec	edi
	jmp	@@eaExit
notea00:	;
	or	eaMode,128
	push	esi
	movzx	esi,bl
	mov	eaIndex,bl
	inc	eaIndex
	shl	esi,2
	add	esi,offset T_RMS
	mov	esi,[esi]
@@1:	movsb
	cmp	b[esi-1],0
	jnz	@@1
	dec	edi
	pop	esi
	cmp ch,0
	jz outeaend
	cmp ch,1
	jnz outea4
	;
	;mod=01
	;
	mov al,'+'
	stosb
	movsx	eax,fs:b[esi]
	mov	eaOffset,eax
	inc	esi
	or	eax,eax
	jns	@@sign2
	neg	eax
	mov	es:b[edi-1],'-'
@@sign2:	mov	ecx,2
	mov	dx,0
	call	SymbolBin2Hex
	mov al,']'
	stosb
	xor	al,al
	stosb
	dec	edi
	jmp	@@eaExit
	;
outea4:	;mod = 10
	;
	mov al,'+'
	stosb
	movsx	eax,fs:w[esi]
	mov	eaOffset,eax
	add	esi,2
	or	eax,eax
	jns	@@sign3
	neg	eax
	mov	es:b[edi-1],'-'
@@sign3:	mov	ecx,4
	mov	dx,0
	call	SymbolBin2Hex
outeaend:	;
	mov al,']'
	stosb
	xor	al,al
	stosb
	dec	edi
	;
@@eaExit:	test	eaMode,128
	jz	@@eaDone
	call	ea2Real		;get address.
	mov	dTargetEIP,eax	;setup for execution.
	mov	dTargetCS,cx
@@eaDone:	ret
out_ea	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
SetInOut	proc	near
	mov	ReturnCode,RetCode_INOUT
	ret
SetInOut	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
outmem	proc	near
	cmp	SegOver_T,0
	jz	outmem2
	pushm	eax,esi
	mov	esi,SegOver_T
@@0:	movsb
	cmp	b[esi-1],0
	jnz	@@0
	dec	edi
	mov	al,':'
	stosb
	mov	es:b[edi],0
	popm	eax,esi
outmem2:	;
	cmp	PointType,0
	jz	@@NoPoint
	push	esi
	mov	esi,PointType
@@DoPoint:	movsb
	cmp	b[esi-1],0
	jnz	@@DoPoint
	dec	edi
	pop	esi
	;
@@NoPoint:	mov al,'['
	stosb
	test	In32Bit,2
	jz	@@old0
	or	eaMode,128
	call	immdword2
	jmp	@@old1
@@old0:	or	eaMode,128
	call immword2
@@old1:	;
	call	ea2Real		;get address.
	mov	dTargetEIP,eax	;setup for execution.
	mov	dTargetCS,cx
	;
	mov al,']'
	stosb
	xor	al,al
	stosb
	dec	edi
	ret
outmem	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
;
;Process word version of ESC 0 code 000.
;
ESC_0_000w	proc	near
	mov	al,1
	jmp	ESC_0_000
ESC_0_000w	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
ESC_0_000d	proc	near
	mov	al,2
	jmp	ESC_0_000
ESC_0_000d	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
ESC_0_000	proc	near
	;
	;Copy the FADD bit streight through.
	;
	push	esi
	mov	esi,offset T_FADD
@@0:	movsb
	cmp	b[esi-1],0
	jnz	@@0
	pop	esi
	dec	edi
	;
	push	eax
	call	get_modregrm		;find out more about the instruction.
	pop	eax
	cmp	ch,3		;which form of the instruction?
	jz	@@1
	mov	PointType,offset T_DWORD
	mov	eaMode,4
	call	out_ea
	jmp	@@9
	;
@@1:	;Doing ST(i)
	;
	mov	es:b[edi],"s"
	inc	edi
	mov	es:b[edi],"t"
	inc	edi
	mov	es:b[edi],","
	inc	edi
	mov	es:b[edi],"s"
	inc	edi
	mov	es:b[edi],"t"
	inc	edi
	or	bl,bl
	jz	@@3
	mov	es:b[edi],"("
	inc	edi
	mov	al,bl		;get register number.
	mov	ecx,1
	call	Bin2Hex
	mov	es:b[edi],")"
	inc	edi
@@3:	mov	es:b[edi],0
	;
@@9:	ret
ESC_0_000	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
;
;Process word version of ESC 0 code 001.
;
ESC_0_001w	proc	near
	mov	al,1
	jmp	ESC_0_001
ESC_0_001w	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
ESC_0_001d	proc	near
	mov	al,2
	jmp	ESC_0_001
ESC_0_001d	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
ESC_0_001	proc	near
	;
	;Copy the FMUL bit streight through.
	;
	push	esi
	mov	esi,offset T_FMUL
@@0:	movsb
	cmp	b[esi-1],0
	jnz	@@0
	pop	esi
	dec	edi
	;
	push	eax
	call	get_modregrm		;find out more about the instruction.
	pop	eax
	cmp	ch,3		;which form of the instruction?
	jz	@@1
	mov	PointType,offset T_DWORD
	mov	eaMode,4
	call	out_ea
	jmp	@@9
	;
@@1:	;Doing ST(i)
	;
	mov	es:b[edi],"s"
	inc	edi
	mov	es:b[edi],"t"
	inc	edi
	mov	es:b[edi],","
	inc	edi
	mov	es:b[edi],"s"
	inc	edi
	mov	es:b[edi],"t"
	inc	edi
	or	bl,bl
	jz	@@3
	mov	es:b[edi],"("
	inc	edi
	mov	al,bl		;get register number.
	mov	ecx,1
	call	Bin2Hex
	mov	es:b[edi],")"
	inc	edi
@@3:	mov	es:b[edi],0
	;
@@9:	ret
ESC_0_001	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
;
;Process word version of ESC 0 code 010.
;
ESC_0_010w	proc	near
	mov	al,1
	jmp	ESC_0_010
ESC_0_010w	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
ESC_0_010d	proc	near
	mov	al,2
	jmp	ESC_0_010
ESC_0_010d	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
ESC_0_010	proc	near
	;
	;Copy the FCOM bit streight through.
	;
	push	esi
	mov	esi,offset T_FCOM
@@0:	movsb
	cmp	b[esi-1],0
	jnz	@@0
	pop	esi
	dec	edi
	;
	push	eax
	call	get_modregrm		;find out more about the instruction.
	pop	eax
	cmp	ch,3		;which form of the instruction?
	jz	@@1
	mov	PointType,offset T_DWORD
	mov	eaMode,4
	call	out_ea
	jmp	@@9
	;
@@1:	;Doing ST(i)
	;
	cmp	bl,1
	jz	@@2
	mov	es:b[edi],"s"
	inc	edi
	mov	es:b[edi],"t"
	inc	edi
	or	bl,bl
	jz	@@2
	mov	es:b[edi],"("
	inc	edi
	mov	al,bl		;get register number.
	mov	ecx,1
	call	Bin2Hex
	mov	es:b[edi],")"
	inc	edi
@@2:	mov	es:b[edi],0
	;
@@9:	ret
ESC_0_010	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
;
;Process word version of ESC 0 code 010.
;
ESC_0_011w	proc	near
	mov	al,1
	jmp	ESC_0_011
ESC_0_011w	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
ESC_0_011d	proc	near
	mov	al,2
	jmp	ESC_0_011
ESC_0_011d	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
ESC_0_011	proc	near
	;
	;Copy the FCOMP bit streight through.
	;
	push	esi
	mov	esi,offset T_FCOMP
@@0:	movsb
	cmp	b[esi-1],0
	jnz	@@0
	pop	esi
	dec	edi
	;
	push	eax
	call	get_modregrm		;find out more about the instruction.
	pop	eax
	cmp	ch,3		;which form of the instruction?
	jz	@@1
	mov	PointType,offset T_DWORD
	mov	eaMode,4
	call	out_ea
	jmp	@@9
	;
@@1:	;Doing ST(i)
	;
	cmp	bl,1
	jz	@@2
	mov	es:b[edi],"s"
	inc	edi
	mov	es:b[edi],"t"
	inc	edi
	or	bl,bl
	jz	@@2
	mov	es:b[edi],"("
	inc	edi
	mov	al,bl		;get register number.
	mov	ecx,1
	call	Bin2Hex
	mov	es:b[edi],")"
	inc	edi
@@2:	mov	es:b[edi],0
	;
@@9:	ret
ESC_0_011	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
;
;Process word version of ESC 0 code 100.
;
ESC_0_100w	proc	near
	mov	al,1
	jmp	ESC_0_100
ESC_0_100w	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
ESC_0_100d	proc	near
	mov	al,2
	jmp	ESC_0_100
ESC_0_100d	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
ESC_0_100	proc	near
	;
	;Copy the FSUB bit streight through.
	;
	push	esi
	mov	esi,offset T_FSUB
@@0:	movsb
	cmp	b[esi-1],0
	jnz	@@0
	pop	esi
	dec	edi
	;
	push	eax
	call	get_modregrm		;find out more about the instruction.
	pop	eax
	cmp	ch,3		;which form of the instruction?
	jz	@@1
	mov	PointType,offset T_DWORD
	mov	eaMode,4
	call	out_ea
	jmp	@@9
	;
@@1:	;Doing ST(i)
	;
	mov	es:b[edi],"s"
	inc	edi
	mov	es:b[edi],"t"
	inc	edi
	mov	es:b[edi],","
	inc	edi
	mov	es:b[edi],"s"
	inc	edi
	mov	es:b[edi],"t"
	inc	edi
	or	bl,bl
	jz	@@3
	mov	es:b[edi],"("
	inc	edi
	mov	al,bl		;get register number.
	mov	ecx,1
	call	Bin2Hex
	mov	es:b[edi],")"
	inc	edi
@@3:	mov	es:b[edi],0
	;
@@9:	ret
ESC_0_100	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
;
;Process word version of ESC 0 code 101.
;
ESC_0_101w	proc	near
	mov	al,1
	jmp	ESC_0_101
ESC_0_101w	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
ESC_0_101d	proc	near
	mov	al,2
	jmp	ESC_0_101
ESC_0_101d	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
ESC_0_101	proc	near
	;
	;Copy the FSUBR bit streight through.
	;
	push	esi
	mov	esi,offset T_FSUBR
@@0:	movsb
	cmp	b[esi-1],0
	jnz	@@0
	pop	esi
	dec	edi
	;
	push	eax
	call	get_modregrm		;find out more about the instruction.
	pop	eax
	cmp	ch,3		;which form of the instruction?
	jz	@@1
	mov	PointType,offset T_DWORD
	mov	eaMode,4
	call	out_ea
	jmp	@@9
	;
@@1:	;Doing ST(i)
	;
	mov	es:b[edi],"s"
	inc	edi
	mov	es:b[edi],"t"
	inc	edi
	mov	es:b[edi],","
	inc	edi
	mov	es:b[edi],"s"
	inc	edi
	mov	es:b[edi],"t"
	inc	edi
	or	bl,bl
	jz	@@3
	mov	es:b[edi],"("
	inc	edi
	mov	al,bl		;get register number.
	mov	ecx,1
	call	Bin2Hex
	mov	es:b[edi],")"
	inc	edi
@@3:	mov	es:b[edi],0
	;
@@9:	ret
ESC_0_101	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
;
;Process word version of ESC 0 code 110.
;
ESC_0_110w	proc	near
	mov	al,1
	jmp	ESC_0_110
ESC_0_110w	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
ESC_0_110d	proc	near
	mov	al,2
	jmp	ESC_0_110
ESC_0_110d	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
ESC_0_110	proc	near
	;
	;Copy the FDIV bit streight through.
	;
	push	esi
	mov	esi,offset T_FDIV
@@0:	movsb
	cmp	b[esi-1],0
	jnz	@@0
	pop	esi
	dec	edi
	;
	push	eax
	call	get_modregrm		;find out more about the instruction.
	pop	eax
	cmp	ch,3		;which form of the instruction?
	jz	@@1
	mov	PointType,offset T_DWORD
	mov	eaMode,4
	call	out_ea
	jmp	@@9
	;
@@1:	;Doing ST(i)
	;
	mov	es:b[edi],"s"
	inc	edi
	mov	es:b[edi],"t"
	inc	edi
	mov	es:b[edi],","
	inc	edi
	mov	es:b[edi],"s"
	inc	edi
	mov	es:b[edi],"t"
	inc	edi
	or	bl,bl
	jz	@@3
	mov	es:b[edi],"("
	inc	edi
	mov	al,bl		;get register number.
	mov	ecx,1
	call	Bin2Hex
	mov	es:b[edi],")"
	inc	edi
@@3:	mov	es:b[edi],0
	;
@@9:	ret
ESC_0_110	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
;
;Process word version of ESC 0 code 111.
;
ESC_0_111w	proc	near
	mov	al,1
	jmp	ESC_0_111
ESC_0_111w	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
ESC_0_111d	proc	near
	mov	al,2
	jmp	ESC_0_111
ESC_0_111d	endp


;==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
ESC_0_111	proc	near
	;
	;Copy the FDIVR bit streight through.
	;
	push	esi
	mov	esi,offset T_FDIVR
@@0:	movsb
	cmp	b[esi-1],0
	jnz	@@0
	pop	esi
	dec	edi
	;
	push	eax
	call	get_modregrm		;find out more about the instruction.
	pop	eax
	cmp	ch,3		;which form of the instruction?
	jz	@@1
	mov	PointType,offset T_DWORD
	mov	eaMode,4
	call	out_ea
	jmp	@@9
	;
@@1:	;Doing ST(i)
	;
	mov	es:b[edi],"s"
	inc	edi
	mov	es:b[edi],"t"
	inc	edi
	mov	es:b[edi],","
	inc	edi
	mov	es:b[edi],"s"
	inc	edi
	mov	es:b[edi],"t"
	inc	edi
	or	bl,bl
	jz	@@3
	mov	es:b[edi],"("
	inc	edi
	mov	al,bl		;get register number.
	mov	ecx,1
	call	Bin2Hex
	mov	es:b[edi],")"
	inc	edi
@@3:	mov	es:b[edi],0
	;
@@9:	ret
ESC_0_111	endp

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -