亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? asm_io.asm

?? PC Assembly Tutorial running the code in the tutorial, you need get the appropriate zip file of thi
?? ASM
字號:
;
; file: asm_io.asm
; Assembly I/O routines
; To assemble for DJGPP
;   nasm -f coff -d COFF_TYPE asm_io.asm
; To assemble for Borland C++ 5.x
;   nasm -f obj -d OBJ_TYPE asm_io.asm
; To assemble for Microsoft Visual Studio
;   nasm -f win32 -d COFF_TYPE asm_io.asm
; To assemble for Linux
;   nasm -f elf -d ELF_TYPE asm_io.asm

%define NL 10
%define CF_MASK 00000001h
%define PF_MASK 00000004h
%define AF_MASK 00000010h
%define ZF_MASK 00000040h
%define SF_MASK 00000080h
%define DF_MASK 00000400h
%define OF_MASK 00000800h


;
; Linux C doesn't put underscores on labels
;
%ifdef ELF_TYPE
  %define _scanf   scanf
  %define _printf  printf
  %define _getchar getchar
  %define _putchar putchar
  %define _fputs   fputs
%endif

%ifdef OBJ_TYPE
segment .data public align=4 class=data use32
%else
segment .data
%endif

int_format	    db  "%i", 0
string_format       db  "%s", 0
reg_format	    db  "Register Dump # %d", NL
		    db  "EAX = %.8X EBX = %.8X ECX = %.8X EDX = %.8X", NL
                    db  "ESI = %.8X EDI = %.8X EBP = %.8X ESP = %.8X", NL
                    db  "EIP = %.8X FLAGS = %.4X %s %s %s %s %s %s %s", NL
	            db  0
carry_flag	    db  "CF", 0
zero_flag	    db  "ZF", 0
sign_flag	    db  "SF", 0
parity_flag	    db	"PF", 0
overflow_flag	    db	"OF", 0
dir_flag	    db	"DF", 0
aux_carry_flag	    db	"AF", 0
unset_flag	    db	"  ", 0
mem_format1         db  "Memory Dump # %d Address = %.8X", NL, 0
mem_format2         db  "%.8X ", 0
mem_format3         db  "%.2X ", 0
stack_format        db  "Stack Dump # %d", NL
	            db  "EBP = %.8X ESP = %.8X", NL, 0
stack_line_format   db  "%+4d  %.8X  %.8X", NL, 0
math_format1        db  "Math Coprocessor Dump # %d Control Word = %.4X"
                    db  " Status Word = %.4X", NL, 0
valid_st_format     db  "ST%d: %.10g", NL, 0
invalid_st_format   db  "ST%d: Invalid ST", NL, 0
empty_st_format     db  "ST%d: Empty", NL, 0

;
; code is put in the _TEXT segment
;
%ifdef OBJ_TYPE
segment text public align=1 class=code use32
%else
segment .text
%endif
	global	read_int, print_int, print_string, read_char
	global  print_char, print_nl, sub_dump_regs, sub_dump_mem
        global  sub_dump_math, sub_dump_stack
        extern  _scanf, _printf, _getchar, _putchar, _fputs

read_int:
	enter	4,0
	pusha
	pushf

	lea	eax, [ebp-4]
	push	eax
	push	dword int_format
	call	_scanf
	pop	ecx
	pop	ecx
	
	popf
	popa
	mov	eax, [ebp-4]
	leave
	ret

print_int:
	enter	0,0
	pusha
	pushf

	push	eax
	push	dword int_format
	call	_printf
	pop	ecx
	pop	ecx

	popf
	popa
	leave
	ret

print_string:
	enter	0,0
	pusha
	pushf

	push	eax
	push    dword string_format
	call	_printf
	pop	ecx
	pop	ecx

	popf
	popa
	leave
	ret

read_char:
	enter	4,0
	pusha
	pushf

	call	_getchar
	mov	[ebp-4], eax

	popf
	popa
	mov	eax, [ebp-4]
	leave
	ret

print_char:
	enter	0,0
	pusha
	pushf

	push	eax
	call	_putchar
	pop	ecx

	popf
	popa
	leave
	ret


print_nl:
	enter	0,0
	pusha
	pushf

	push	dword 10	; 10 == ASCII code for \n
	call	_putchar
	pop	ecx

	popf
	popa
	leave
	ret


sub_dump_regs:
	enter   4,0
	pusha
	pushf
	mov     eax, [esp]      ; read FLAGS back off stack
	mov	[ebp-4], eax    ; save flags

;
; show which FLAGS are set
;
	test	eax, CF_MASK
	jz	cf_off
	mov	eax, carry_flag
	jmp	short push_cf
cf_off:
	mov	eax, unset_flag
push_cf:
	push	eax

	test	dword [ebp-4], PF_MASK
	jz	pf_off
	mov	eax, parity_flag
	jmp	short push_pf
pf_off:
	mov	eax, unset_flag
push_pf:
	push	eax

	test	dword [ebp-4], AF_MASK
	jz	af_off
	mov	eax, aux_carry_flag
	jmp	short push_af
af_off:
	mov	eax, unset_flag
push_af:
	push	eax

	test	dword [ebp-4], ZF_MASK
	jz	zf_off
	mov	eax, zero_flag
	jmp	short push_zf
zf_off:
	mov	eax, unset_flag
push_zf:
	push	eax

	test	dword [ebp-4], SF_MASK
	jz	sf_off
	mov	eax, sign_flag
	jmp	short push_sf
sf_off:
	mov	eax, unset_flag
push_sf:
	push	eax

	test	dword [ebp-4], DF_MASK
	jz	df_off
	mov	eax, dir_flag
	jmp	short push_df
df_off:
	mov	eax, unset_flag
push_df:
	push	eax

	test	dword [ebp-4], OF_MASK
	jz	of_off
	mov	eax, overflow_flag
	jmp	short push_of
of_off:
	mov	eax, unset_flag
push_of:
	push	eax

	push    dword [ebp-4]   ; FLAGS
	mov	eax, [ebp+4]
	sub	eax, 10         ; EIP on stack is 10 bytes ahead of orig
	push	eax             ; EIP
	lea     eax, [ebp+12]
	push    eax             ; original ESP
	push    dword [ebp]     ; original EBP
        push    edi
        push    esi
	push    edx
	push	ecx
	push	ebx
	push	dword [ebp-8]   ; original EAX
	push	dword [ebp+8]   ; # of dump
	push	dword reg_format
	call	_printf
	add	esp, 76
	popf
	popa
	leave
	ret     4

sub_dump_stack:
	enter   0,0
	pusha
	pushf

	lea     eax, [ebp+20]
	push    eax             ; original ESP
	push    dword [ebp]     ; original EBP
	push	dword [ebp+8]   ; # of dump
	push	dword stack_format
	call	_printf
	add	esp, 16

	mov	ebx, [ebp]	; ebx = original ebp
	mov	eax, [ebp+16]   ; eax = # dwords above ebp
	shl	eax, 2          ; eax *= 4
	add	ebx, eax	; ebx = & highest dword in stack to display
	mov	edx, [ebp+16]
	mov	ecx, edx
	add	ecx, [ebp+12]
	inc	ecx		; ecx = # of dwords to display

stack_line_loop:
	push	edx
	push	ecx		; save ecx & edx

	push	dword [ebx]	; value on stack
	push	ebx		; address of value on stack
	mov	eax, edx
	sal	eax, 2		; eax = 4*edx
	push	eax		; offset from ebp
	push	dword stack_line_format
	call	_printf
	add	esp, 16

	pop	ecx
	pop	edx

	sub	ebx, 4
	dec	edx
	loop	stack_line_loop

	popf
	popa
	leave
	ret     12


sub_dump_mem:
	enter	0,0
	pusha
	pushf

	push	dword [ebp+12]
	push	dword [ebp+16]
	push	dword mem_format1
	call	_printf
	add	esp, 12		
	mov	esi, [ebp+12]      ; address
	and	esi, 0FFFFFFF0h    ; move to start of paragraph
	mov	ecx, [ebp+8]
	inc	ecx
mem_outer_loop:
	push	ecx
	push	esi
	push	dword mem_format2
	call	_printf
	add	esp, 8

	xor	ebx, ebx
mem_hex_loop:
	xor	eax, eax
	mov	al, [esi + ebx]
	push	eax
	push	dword mem_format3
	call	_printf
	add	esp, 8
	inc	ebx
	cmp	ebx, 16
	jl	mem_hex_loop
	
	mov	eax, '"'
	call	print_char
	xor	ebx, ebx
mem_char_loop:
	xor	eax, eax
	mov	al, [esi+ebx]
	cmp	al, 32
	jl	non_printable
	cmp	al, 126
	jg	non_printable
	jmp	short mem_char_loop_continue
non_printable:
	mov	eax, '?'
mem_char_loop_continue:
	call	print_char

	inc	ebx
	cmp	ebx, 16
	jl	mem_char_loop

	mov	eax, '"'
	call	print_char
	call	print_nl

	add	esi, 16
	pop	ecx
	loop	mem_outer_loop

	popf
	popa
	leave
	ret	12

; function sub_dump_math
;   prints out state of math coprocessor without modifying the coprocessor
;   or regular processor state
; Parameters:
;  dump number - dword at [ebp+8]
; Local variables:
;   ebp-108 start of fsave buffer
;   ebp-116 temp double
; Notes: This procedure uses the Pascal convention.
;   fsave buffer structure:
;   ebp-108   control word
;   ebp-104   status word
;   ebp-100   tag word
;   ebp-80    ST0
;   ebp-70    ST1
;   ebp-60    ST2 ...
;   ebp-10    ST7
;
sub_dump_math:
	enter	116,0
	pusha
	pushf

	fsave	[ebp-108]	; save coprocessor state to memory
	mov	eax, [ebp-104]  ; status word
	and	eax, 0FFFFh
	push	eax
	mov	eax, [ebp-108]  ; control word
	and	eax, 0FFFFh
	push	eax
	push	dword [ebp+8]
	push	dword math_format1
	call	_printf
	add	esp, 16
;
; rotate tag word so that tags in same order as numbers are
; in the stack
;
	mov	cx, [ebp-104]	; ax = status word
	shr	cx, 11
	and	cx, 7           ; cl = physical state of number on stack top
	mov	bx, [ebp-100]   ; bx = tag word
	shl     cl,1		; cl *= 2
	ror	bx, cl		; move top of stack tag to lowest bits

	mov	edi, 0		; edi = stack number of number
	lea	esi, [ebp-80]   ; esi = address of ST0
	mov	ecx, 8          ; ecx = loop counter
tag_loop:
	push	ecx
	mov	ax, 3
	and	ax, bx		; ax = current tag
	or	ax, ax		; 00 -> valid number
	je	valid_st
	cmp	ax, 1		; 01 -> zero
	je	zero_st
	cmp	ax, 2		; 10 -> invalid number
	je	invalid_st
	push	edi		; 11 -> empty
	push	dword empty_st_format
	call	_printf
	add	esp, 8
	jmp	short cont_tag_loop
zero_st:
	fldz
	jmp	short print_real
valid_st:
	fld	tword [esi]
print_real:
	fstp	qword [ebp-116]
	push	dword [ebp-112]
	push	dword [ebp-116]
	push	edi
	push	dword valid_st_format
	call	_printf
	add	esp, 16
	jmp	short cont_tag_loop
invalid_st:
	push	edi
	push	dword invalid_st_format
	call	_printf
	add	esp, 8
cont_tag_loop:
	ror	bx, 2		; mov next tag into lowest bits
	inc	edi
	add	esi, 10         ; mov to next number on stack
	pop	ecx
	loop    tag_loop

	frstor	[ebp-108]       ; restore coprocessor state
	popf
	popa
	leave
	ret	4


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本韩国欧美在线| 欧美色综合网站| 88在线观看91蜜桃国自产| 精品剧情在线观看| 亚洲自拍偷拍av| 国产精品资源在线| 51久久夜色精品国产麻豆| 最新国产成人在线观看| 国产酒店精品激情| 日韩欧美一区二区不卡| 亚洲国产日韩在线一区模特| 成人短视频下载| 久久亚洲一级片| 日韩高清欧美激情| 在线视频一区二区免费| 亚洲男女一区二区三区| 成人ar影院免费观看视频| 精品国产乱码久久久久久图片 | 国产麻豆欧美日韩一区| 欧美亚洲禁片免费| 夜夜嗨av一区二区三区四季av| 成人app下载| |精品福利一区二区三区| 成人h动漫精品| 久久久五月婷婷| 国产一区二区美女诱惑| 日韩精品一区二区三区老鸭窝| 性欧美疯狂xxxxbbbb| 欧亚洲嫩模精品一区三区| 亚洲欧美日韩在线播放| 色噜噜狠狠色综合欧洲selulu| 日本一区二区免费在线观看视频 | 国产日韩欧美一区二区三区综合| 日本视频一区二区| 欧美一区二区三区系列电影| 日韩avvvv在线播放| 日韩一卡二卡三卡四卡| 久久精品国产亚洲高清剧情介绍| 欧美日韩国产bt| 免费观看91视频大全| 精品久久久久av影院| 97超碰欧美中文字幕| 国产精品毛片久久久久久| 成人动漫av在线| 一区二区不卡在线播放 | 亚洲成人福利片| 欧美久久久久中文字幕| 久久成人免费日本黄色| 久久久亚洲国产美女国产盗摄| 国产999精品久久| 国产精品久久国产精麻豆99网站| 99久久久久免费精品国产 | 欧洲精品一区二区| 性久久久久久久| 欧美一区二区播放| 国产真实乱偷精品视频免| 欧美国产精品一区二区三区| 成人av手机在线观看| 一区二区国产视频| 欧美xxx久久| 成人av在线资源| 亚洲已满18点击进入久久| 日韩欧美一区中文| 国产成人av电影在线观看| 有码一区二区三区| 日韩一级二级三级| 成人福利视频在线| 日韩av电影天堂| 最新中文字幕一区二区三区| 欧美挠脚心视频网站| 国产不卡免费视频| 亚洲二区在线视频| 国产亚洲一区二区在线观看| 欧洲精品一区二区| 高清不卡一二三区| 三级欧美在线一区| 中文字幕一区三区| 精品福利一区二区三区| 欧美午夜精品电影| 成人动漫一区二区在线| 激情综合五月婷婷| 亚洲综合图片区| 国产精品视频一二| 精品国产麻豆免费人成网站| 欧美日韩精品专区| 91欧美一区二区| 极品美女销魂一区二区三区| 无吗不卡中文字幕| 中文字幕亚洲视频| 国产亚洲美州欧州综合国| 91精品国产麻豆| 精品1区2区3区| 91麻豆.com| aaa欧美色吧激情视频| 国产精品18久久久久久vr| 日本麻豆一区二区三区视频| 亚洲国产成人av网| 亚洲青青青在线视频| 国产日韩v精品一区二区| 日韩一区二区免费高清| 欧美肥妇free| 欧美日韩成人激情| 精品视频在线看| 欧美性猛交一区二区三区精品 | 亚洲精选视频免费看| 国产精品日韩成人| 亚洲国产经典视频| 国产精品视频在线看| 欧美—级在线免费片| 精品国内片67194| 日韩亚洲国产中文字幕欧美| 5858s免费视频成人| 欧美日韩五月天| 欧美日韩国产成人在线91| 欧美日本精品一区二区三区| 欧美精品乱人伦久久久久久| 欧美日韩www| 日韩一区二区精品| 久久午夜国产精品| 中文字幕二三区不卡| 国产精品久久久久久久浪潮网站| 欧美韩国一区二区| 亚洲视频综合在线| 亚洲午夜一区二区| 日本一不卡视频| 国产综合色产在线精品| 国产激情一区二区三区| 成人性生交大片免费看中文网站| av电影天堂一区二区在线观看| 色综合天天视频在线观看| 欧美日韩午夜精品| 精品少妇一区二区三区| 国产午夜亚洲精品羞羞网站| 国产精品国产三级国产aⅴ原创 | 国产在线精品免费| www.在线成人| 欧美日韩中文字幕精品| 日韩欧美国产一区二区在线播放| 精品欧美乱码久久久久久1区2区 | 久久久久国产成人精品亚洲午夜| 国产精品欧美久久久久无广告| 一区二区三区在线观看动漫| 免费xxxx性欧美18vr| 国产精品一区二区不卡| 91视视频在线观看入口直接观看www | 成人av在线网站| 欧美三电影在线| 国产午夜亚洲精品羞羞网站| 亚洲永久精品大片| 久久国产免费看| 色综合天天综合网天天看片| 日韩精品一区二区三区在线观看 | 国产美女av一区二区三区| 日本韩国一区二区| 久久在线免费观看| 亚洲一区二区视频在线观看| 国产一区二区三区av电影| 91黄色免费网站| 国产婷婷色一区二区三区四区 | 波多野结衣亚洲一区| 这里只有精品视频在线观看| 国产精品亲子乱子伦xxxx裸| 日韩电影在线免费| 91啪亚洲精品| 国产女人水真多18毛片18精品视频 | 不卡一区中文字幕| 精品国产免费人成在线观看| 亚洲小说欧美激情另类| 国产精品中文字幕欧美| 欧美精品在线观看播放| 亚洲嫩草精品久久| 国产成人亚洲综合a∨婷婷| 91精品国产综合久久精品| 最新国产精品久久精品| 国产一区二区视频在线| 这里只有精品免费| 亚洲一区二区三区四区中文字幕| 国产精品99久久久久久宅男| 欧美福利视频一区| 亚洲精品日日夜夜| 91啪在线观看| 中文字幕亚洲欧美在线不卡| 国产精品一二三| 久久影院视频免费| 久久er精品视频| 欧美一区二区在线看| 亚洲第一激情av| 欧美色涩在线第一页| 一区二区三区成人| 色婷婷狠狠综合| 亚洲人成在线播放网站岛国| 成人精品高清在线| 国产精品全国免费观看高清 | 亚洲电影在线免费观看| 色av成人天堂桃色av| 亚洲男同性视频| 91福利视频网站| 亚洲一区二区三区在线看| 欧美亚洲国产一区二区三区va| 一区二区三区国产|