代码拉取完成,页面将自动刷新
同步操作将从 西边/asm_fragment 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
.text
.data
.comm window,8,32
.comm pixmap,8,32
.comm x,4,32
.comm y,4,32
.comm direct,4,32
.comm ybak,4,32
x:
.long 0
y:
.long 0
direct:
.long 1
ybak:
.long 0
.section .rodata
.LC0:
.string "绘图软件"
.LC1:
.long 0x0
.long 0x40080000 /* 3 */
.LC2:
.long 0x0
.long 0x40180000 /* 6 */
.LC3:
.string "delete_event"
.LC4:
.string "<u>绘图区域</u>"
.LC5:
.string "expose_event"
.LC6:
.string "configure_event"
.LC7:
.string "motion_notify_event"
.LC8:
.string "button_press_event"
.text
.globl main
scribble_configure_event:
pushq %rbp
movq %rsp,%rbp
subq $0x1000,%rsp
movq %fs:40,%rax
movq %rax,-0x1000(%rbp)
movq %rdi,-0xff8(%rbp) /* widget */
movq %rsi,-0xff0(%rbp) /* event */
movq %rdx,-0xfe8(%rbp) /* data */
movq pixmap(%rip),%rax
testq %rax,%rax
je .Lscribble_configure_event_400
movl $80,%esi
movq pixmap(%rip),%rdi
movl $0,%eax
call g_type_check_instance_cast
movq %rax,%rdi
movl $0,%eax
call g_object_unref
.Lscribble_configure_event_400:
movl $-1,%ecx
movq -0xff8(%rbp),%rdi /* widget */
leaq 72(%rdi),%rdi /* widget->allocation */
movl 4(%rdi),%edx /* widget->allocation.height */
movl 0(%rdi),%esi /* widget->allocation.width */
movq -0xff8(%rbp),%rdi /* widget */
movq 80(%rdi),%rdi /* widget->window */
movl $0,%eax
call gdk_pixmap_new
movq %rax,pixmap(%rip)
movq -0xff8(%rbp),%rdi /* widget */
leaq 72(%rdi),%rdi /* widget->allocation */
movl 4(%rdi),%eax /* widget->allocation.height */
movslq %eax,%rax
pushq %rax
movl 0(%rdi),%r9d /* widget->allocation.width */
movl $0,%r8d
movl $0,%ecx
movl $1,%edx
movq -0xff8(%rbp),%rdi /* widget */
movq 48(%rdi),%rdi
movq 872(%rdi),%rsi /* widget->style->white_gc */
movq pixmap(%rip),%rdi
movl $0,%eax
call gdk_draw_rectangle
movl $1,%eax
movq -0x1000(%rbp),%rcx
xorq %fs:40,%rcx
je .Lscribble_configure_event_0
movl $0,%eax
call __stack_chk_fail
.Lscribble_configure_event_0:
leave
ret
scribble_expose_event:
pushq %rbp
movq %rsp,%rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1000,%rsp
movq %rdi,-0x1000(%rbp) /* widget */
movq %rsi,-0xff8(%rbp) /* event */
movq %rdx,-0xff0(%rbp) /* data */
movq -0xff8(%rbp),%rdi /* event */
leaq 20(%rdi),%rdi /* event->area */
movl 12(%rdi),%eax /* event->area.height */
movl %eax,%r15d
movl 8(%rdi),%eax /* event->area.width */
movl %eax,%r14d
movl 4(%rdi),%eax /* event->area.y*/
movl %eax,%r13d
movl 0(%rdi),%eax /* event->area.x */
movl %eax,%r12d
movl 0(%rdi),%r9d /* event->area.x */
movl 4(%rdi),%r8d /* event->area.y */
movl 0(%rdi),%ecx /* event->area.x */
movq pixmap(%rip),%rbx
call gtk_widget_get_type
movq %rax,%rsi
movq -0x1000(%rbp),%rdi /* widget */
call g_type_check_instance_cast
movq -0xff8(%rbp),%rdi /* event */
leaq 20(%rdi),%rdi /* event->area */
pushq %r15
pushq %r14
pushq %r13
movl 0(%rdi),%r9d /* event->area.x */
movl 4(%rdi),%r8d /* event->area.y */
movl 0(%rdi),%ecx /* event->area.x */
movq pixmap(%rip),%rdx
movq %rax,%rdi
movl 34(%rdi),%eax
sall $3,%eax
movslq %eax,%rax
movq -0x1000(%rbp),%rdi /* widget */
movq 48(%rdi),%rdi /* widget->style */
leaq 544(%rdi),%rdi /* widget->style->fg_gc */
movq 0(%rdi,%rax,1),%rsi /* widget->style->fg_gc[GTK_WIDGET_STATE(widget)] */
movq -0x1000(%rbp),%rdi /* widget */
movq 80(%rdi),%rdi /* widget->window */
call gdk_draw_drawable
addq $24,%rsp
movl $0, %eax
leaq -40(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
leave
ret
draw_brush:
pushq %rbp
movq %rsp,%rbp
subq $0x1000,%rsp
movq %rdi,-0x1000(%rbp) /* widget */
movsd %xmm0,-0xff8(%rbp) /* x */
movsd %xmm1,-0xff0(%rbp) /* y */
movl $0,-0xfe0(%rbp) /* update_rect */
movsd -0xff8(%rbp),%xmm0 /* x */
subsd .LC1(%rip),%xmm0 /* 3 */
cvtsd2si %xmm0,%eax
leaq -0xfe0(%rbp),%rdi /* */
movl %eax,0(%rdi) /* update_rect.x */
movsd -0xff0(%rbp),%xmm0 /* y */
subsd .LC1(%rip),%xmm0 /* 3 */
cvtsd2si %xmm0,%eax
movl %eax,4(%rdi) /* update_rect.y */
// movl $6,8(%rdi) /* update_rect.width */
movl $36,8(%rdi) /* update_rect.width */
// movl $6,12(%rdi) /* update_rect.height */
movl $36,12(%rdi) /* update_rect.height */
leaq -0xfe0(%rbp),%rdi /* update_rect */
movl 12(%rdi),%eax /*update_rect.height */
movslq %eax,%rax
pushq %rax
movl 8(%rdi),%r9d /* update_rect.width */
movl 4(%rdi),%r8d /* update_rect.y */
movl 0(%rdi),%ecx /* update_rect.x */
movl $1,%edx
movq -0x1000(%rbp),%rdi /* widget */
movq 48(%rdi),%rdi /* widget->style */
movq 864(%rdi),%rsi /* widget->style->black_gc */
movq pixmap(%rip),%rdi
movl $0,%eax
call gdk_draw_rectangle
movl $0,%edx
leaq -0xfe0(%rbp),%rsi /* update_rect */
movq -0x1000(%rbp),%rdi /* widget */
movq 80(%rdi),%rdi /* widget->window */
movl $0,%eax
call gdk_window_invalidate_rect
movl $0,%eax
leave
ret
scribble_button_press_event:
pushq %rbp
movq %rsp,%rbp
subq $0x1000,%rsp
movq %rdi,-0x1000(%rbp) /* widget */
movq %rsi,-0xff8(%rbp) /* event */
movq %rdx,-0xff0(%rbp) /* data */
movq pixmap(%rip),%rax /* */
cmpq $0,%rax
jne .Lscribble_button_press_event_400
movl $0,%eax
jmp .Lscribble_button_press_event_0
.Lscribble_button_press_event_400:
movq -0xff8(%rbp),%rdi /* event */
cmpl $1,52(%rdi) /* event->button */
jne .Lscribble_button_press_event_390
movq -0xff8(%rbp),%rdi /* event */
movsd 32(%rdi),%xmm1 /* event->y */
movsd 24(%rdi),%xmm0 /* event->x */
movq -0x1000(%rbp),%rdi /* widget */
movl $0,%eax
call draw_brush
.Lscribble_button_press_event_390:
movl $1,%eax
.Lscribble_button_press_event_0:
leave
ret
scribble_motion_notify_event:
pushq %rbp
movq %rsp,%rbp
subq $0x1000,%rsp
movq %rdi,-0x1000(%rbp) /* widget */
movq %rsi,-0xff8(%rbp) /* event */
movq %rdx,-0xff0(%rbp) /* data */
movl $0,-0xfe0(%rbp) /* x */
movl $0,-0xfdc(%rbp) /* y */
movl $0,-0xfd8(%rbp) /* state */
cmpq $0,pixmap(%rip)
jne .Lscribble_motion_notify_event_400
movl $0,%eax
jmp .Lscribble_motion_notify_event_0
.Lscribble_motion_notify_event_400:
leaq -0xfd8(%rbp),%rcx /* state */
leaq -0xfdc(%rbp),%rdx /* y */
leaq -0xfe0(%rbp),%rsi /* x */
movq -0xff8(%rbp),%rdi /* event */
movq 8(%rdi),%rdi /* event->window */
movl $0,%eax
call gdk_window_get_pointer
movl -0xfd8(%rbp),%eax /* state */
andl $256,%eax
testl %eax,%eax
je .Lscribble_motion_notify_event_1
movl -0xfdc(%rbp),%edx /* y */
movl -0xfe0(%rbp),%esi /* x */
movq -0x1000(%rbp),%rdi /* widget */
movl $0,%eax
call draw_brush
.Lscribble_motion_notify_event_1:
movl $1,%eax
.Lscribble_motion_notify_event_0:
leave
ret
checkerboard_expose:
pushq %rbp
movq %rsp,%rbp
subq $0x1000,%rsp
movq %rdi,-0x1000(%rbp) /* da */
movq %rsi,-0xff8(%rbp) /* event */
movq %rdx,-0xff0(%rbp) /* data */
movl $0,-0xfe0(%rbp) /* i */
movl $0,-0xfdc(%rbp) /* j */
movl $0,-0xfd8(%rbp) /* xcount */
movl $0,-0xfd4(%rbp) /* ycount */
movq $0,-0xfd0(%rbp) /* gc1 */
movq $0,-0xfc8(%rbp) /* gc2 */
movl $0,-0xfc0(%rbp) /* color */
movq $0,-0xf80(%rbp) /* gc */
movq -0x1000(%rbp),%rdi /* da */
movq 80(%rdi),%rdi /* da->window */
movl $0,%eax
call gdk_gc_new
movq %rax,-0xfd0(%rbp) /* gc1 */
leaq -0xfc0(%rbp),%rdi /* color */
movw $30000,0(%rdi) /* color.red */
movw $0,2(%rdi) /* color.green */
movw $30000,4(%rdi) /* color.blue */
leaq -0xfc0(%rbp),%rsi /* color */
movq -0xfd0(%rbp),%rdi /* gc1 */
movl $0,%eax
call gdk_gc_set_rgb_fg_color
movq -0x1000(%rbp),%rdi /* da */
movq 80(%rdi),%rdi /* da->window */
movl $0,%eax
call gdk_gc_new
movq %rax,-0xfc8(%rbp) /* gc2 */
leaq -0xfc0(%rbp),%rdi /* color */
movw $65535,0(%rdi) /* color.red */
movw $65535,2(%rdi) /* color.green */
movw $65535,4(%rdi) /* color.blue */
leaq -0xfc0(%rbp),%rsi /* color */
movq -0xfc8(%rbp),%rdi /* gc2 */
call gdk_gc_set_rgb_fg_color
movl $0,-0xfd8(%rbp) /* xcount */
movl $2,-0xfe0(%rbp) /* i */
jmp .Lcheckerboard_expose_400
.Lcheckerboard_expose_500:
movl $2,-0xfdc(%rbp) /* j */
movl -0xfd8(%rbp),%eax /* xcount */
movl $2,%ebx
xorq %rdx,%rdx
idivl %ebx
movl %edx,-0xfd4(%rbp) /* ycount */
jmp .Lcheckerboard_expose_410
.Lcheckerboard_expose_490:
// movq $0,-0xf80(%rbp) /* gc */
movl -0xfd4(%rbp),%eax /* ycount */
movl $2,%ebx
xorq %rdx,%rdx
idivl %ebx
testl %edx,%edx
je .Lcheckerboard_expose_485
movq -0xfd0(%rbp),%rax /* gc1 */
movq %rax,-0xf80(%rbp) /* gc */
jmp .Lcheckerboard_expose_480
.Lcheckerboard_expose_485:
movq -0xfc8(%rbp),%rax /* gc2 */
movq %rax,-0xf80(%rbp) /* gc */
.Lcheckerboard_expose_480:
pushq $10
movl $10,%r9d
movl -0xfdc(%rbp),%r8d /* j */
movl -0xfe0(%rbp),%ecx /* i */
movl $1,%edx
movq -0xf80(%rbp),%rsi /* gc */
movq -0x1000(%rbp),%rdi /* da */
movq 80(%rdi),%rdi /* da->window */
movl $0,%eax
call gdk_draw_rectangle
movl -0xfdc(%rbp),%eax /* j */
addl $10,%eax
addl $2,%eax
movl %eax,-0xfdc(%rbp) /* j */
addl $1,-0xfd4(%rbp) /* ycount */
.Lcheckerboard_expose_410:
movq -0x1000(%rbp),%rdi /* da */
leaq 64(%rdi),%rdi /* da->allocation */
movl 12(%rdi),%eax /*da->allocation.height */
cmpl -0xfdc(%rbp),%eax /* j */
jg .Lcheckerboard_expose_490
addl $12,-0xfe0(%rbp) /* i */
addl $1,-0xfd8(%rbp) /* xcount */
.Lcheckerboard_expose_400:
movq -0x1000(%rbp),%rdi /* da */
leaq 64(%rdi),%rdi /* da->allocation */
movl 8(%rdi),%eax /* da->allocation.width */
cmpl -0xfe0(%rbp),%eax /* i */
jg .Lcheckerboard_expose_500
movl $80,%esi
movq -0xfd0(%rbp),%rdi /* gc1 */
call g_type_check_instance_cast
movq %rax,%rdi
call g_object_unref
movl $80,%esi
movq -0xfc8(%rbp),%rdi /* gc2 */
call g_type_check_instance_cast
movq %rax,%rdi
call g_object_unref
movl $1,%eax
leave
ret
time_handler:
pushq %rbp
movq %rsp,%rbp
subq $0x1000,%rsp
movq %rdi,-0x1000(%rbp) /* widget */
movq -0x1000(%rbp),%rdi /* widget */
cmpq $0,80(%rdi) /* widget->window */
jne .Ltime_handler_400
movl $0,%eax
jmp .Ltime_handler_0
.Ltime_handler_400:
cvtsi2sd y(%rip),%xmm1
cvtsi2sd x(%rip),%xmm0
movq -0x1000(%rbp),%rdi /* widget */
movl $0,%eax
call draw_brush
/*************************************/
// cmpl $1,direct(%rip)
// jne .Ltime_handler_390
//
// addl $3,x(%rip)
// cmpl $700,x(%rip)
// jle .Ltime_handler_391
// movl $2,direct(%rip)
// movl y(%rip),%eax
// movl %eax,ybak(%rip)
//.Ltime_handler_391:
// jmp .Ltime_handler_1
//
//.Ltime_handler_390:
// cmpl $2,direct(%rip)
// jne .Ltime_handler_380
// addl $3,y(%rip)
// movl ybak(%rip),%eax
// addl $40,%eax
// cmpl y(%rip),%eax
// jge .Ltime_handler_381
//
// movl $3,direct(%rip)
//
//.Ltime_handler_381:
// jmp .Ltime_handler_1
//
//.Ltime_handler_380:
// cmpl $3,direct(%rip)
// jne .Ltime_handler_370
//
// subl $3,x(%rip)
// cmpl $20,x(%rip)
// jge .Ltime_handler_371
// movl $4,direct(%rip)
// movl y(%rip),%eax
// movl %eax,ybak(%rip)
//
//.Ltime_handler_371:
// jmp .Ltime_handler_1
//.Ltime_handler_370:
// cmpl $4,direct(%rip)
// jne .Ltime_handler_1
//
// addl $3,y(%rip)
// movl ybak(%rip),%eax
// addl $40,%eax
// cmpl y(%rip),%eax
// jge .Ltime_handler_1
// movl $1,direct(%rip)
/*************************************/
.Ltime_handler_1:
movl $1,%eax
.Ltime_handler_0:
leave
ret
main:
pushq %rbp
movq %rsp,%rbp
subq $0x1000,%rsp
movl %edi,-0x1000(%rbp) /* argc */
movq %rsi,-0xff8(%rbp) /* argv */
movq $0,-0xff0(%rbp) /* frame */
movq $0,-0xfe8(%rbp) /* vbox */
movq $0,-0xfe0(%rbp) /* da */
movq $0,-0xfd8(%rbp) /* label */
leaq -0xff8(%rbp),%rsi /* argv */
leaq -0x1000(%rbp),%rdi /* argc */
movl $0,%eax
call gtk_init
movl $0,%edi
movl $0,%eax
call gtk_window_new
movq %rax,window(%rip)
call gtk_window_get_type
movq %rax,%rsi
movq window(%rip),%rdi
call g_type_check_instance_cast
leaq .LC0(%rip),%rsi
movq %rax,%rdi
movl $0,%eax
call gtk_window_set_title
movl $80,%esi
movq window(%rip),%rdi
call g_type_check_instance_cast
movl $0,%r9d
movl $0,%r8d
movl $0,%ecx
movq gtk_main_quit@GOTPCREL(%rip),%rdx
leaq .LC3(%rip),%rsi
movq %rax,%rdi
call g_signal_connect_data
call gtk_container_get_type
movq %rax,%rsi
movq window(%rip),%rdi
call g_type_check_instance_cast
movl $10,%esi
movq %rax,%rdi
movl $0,%eax
call gtk_container_set_border_width
movl $8,%esi
movl $0,%edi
call gtk_vbox_new
movq %rax,-0xfe8(%rbp) /* vbox */
call gtk_container_get_type
movq %rax,%rsi
movq -0xfe8(%rbp),%rdi /* vbox */
call g_type_check_instance_cast
movl $8,%esi
movq %rax,%rdi
call gtk_container_set_border_width
call gtk_container_get_type
movq %rax,%rsi
movq window(%rip),%rdi
call g_type_check_instance_cast
movq -0xfe8(%rbp),%rsi /* vbox */
movq %rax,%rdi
call gtk_container_add
movl $0,%edi
call gtk_label_new
movq %rax,-0xfd8(%rbp) /* label */
call gtk_label_get_type
movq %rax,%rsi
movq -0xfd8(%rbp),%rdi
call g_type_check_instance_cast
leaq .LC4(%rip),%rsi
movq %rax,%rdi
call gtk_label_set_markup
movl $0,%edi
call gtk_frame_new
movq %rax,-0xff0(%rbp) /* frame */
call gtk_frame_get_type
movq %rax,%rsi
movq -0xff0(%rbp),%rdi /* frame */
call g_type_check_instance_cast
movl $1,%esi
movq %rax,%rdi
call gtk_frame_set_shadow_type
call gtk_box_get_type
movq %rax,%rsi
movq -0xfe8(%rbp),%rdi /* vbox */
call g_type_check_instance_cast
movl $0,%r8d
movl $1,%ecx
movl $1,%edx
movq -0xff0(%rbp),%rsi /* frame */
movq %rax,%rdi
call gtk_box_pack_start
call gtk_drawing_area_new
movq %rax,-0xfe0(%rbp) /* da */
movl $800,%edx
movl $800,%esi
movq -0xfe0(%rbp),%rdi /* da */
call gtk_widget_set_size_request
call gtk_container_get_type
movq %rax,%rsi
movq -0xff0(%rbp),%rdi /* frame */
call g_type_check_instance_cast
movq -0xfe0(%rbp),%rsi /* da */
movq %rax,%rdi
call gtk_container_add
movl $0,%r9d
movl $0,%r8d
movl $0,%ecx
leaq scribble_expose_event(%rip),%rdx
leaq .LC5(%rip),%rsi
movq -0xfe0(%rbp),%rdi /* da */
call g_signal_connect_data
movl $0,%r9d
movl $0,%r8d
movl $0,%ecx
leaq scribble_configure_event(%rip),%rdx
leaq .LC6(%rip),%rsi
movq -0xfe0(%rbp),%rdi /* da */
call g_signal_connect_data
movl $0,%r9d
movl $0,%r8d
movl $0,%ecx
leaq scribble_motion_notify_event(%rip),%rdx
leaq .LC7(%rip),%rsi
movq -0xfe0(%rbp),%rdi /* da */
call g_signal_connect_data
movl $0,%r9d
movl $0,%r8d
movl $0,%ecx
leaq scribble_button_press_event(%rip),%rdx
leaq .LC8(%rip),%rsi
movq -0xfe0(%rbp),%rdi /* da */
call g_signal_connect_data
movq -0xfe0(%rbp),%rdi /* da */
call gtk_widget_get_events
orl $8192,%eax /* GDK_LEAVE_NOTIFY_MASK*/
orl $256,%eax /*GDK_BUTTON_PRESS_MASK */
orl $4,%eax /*GDK_POINTER_MOTION_MASK */
orl $8,%eax /*GDK_POINTER_MOTION_HINT_MASK */
movl %eax,%esi
movq -0xfe0(%rbp),%rdi /* da */
call gtk_widget_set_events
movq -0xfe0(%rbp),%rdx /* da */
leaq time_handler(%rip),%rsi
movl $100,%edi
call g_timeout_add
movq window(%rip),%rdi
call gtk_widget_show_all
call gtk_main
movl $0,%eax
leave
ret
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。