codigo abaixo

1. codigo abaixo

ale
aoshi001

(usa Kurumin)

Enviado em 16/10/2008 - 12:48h

ALGUEM, SABE Qual é a diferença básica entre o assembly e o miniassembly.

VALEU


Primeiro codigo em assembly
.text

_fail:
movl 1028(%ebx),%eax
jmp *-4(%eax)
.p2align 4,,15
.globl _X7072696E74737472696E67_1

_X7072696E74737472696E67_1:
movl $_Lpred1_1+0,%eax
movl $_Lpred1_2+0,%edx
movl $_Lpred1_4+0,%ecx
call _Switch_On_Term_Var_Atm_Lst
jmp *%eax

_Lpred1_1:
movl $_Lpred1_3+0,%eax
call _Create_Choice_Point1

_Lpred1_2:
movl 0(%ebx),%eax
call _Get_Nil
testl %eax,%eax
je _fail
jmp *1040(%ebx)

_Lpred1_3:
call _Delete_Choice_Point1

_Lpred1_4:
movl $1,%eax
call _Allocate
movl 0(%ebx),%eax
call _Get_List
testl %eax,%eax
je _fail
call _Unify_Variable
movl %eax,0(%ebx)
call _Unify_Variable
movl 1044(%ebx),%edi
movl %eax,-16(%edi)
movl $.Lcont0,1040(%ebx)
jmp _X707574_1
.Lcont0:
movl 1044(%ebx),%edi
movl -16(%edi),%eax
movl %eax,0(%ebx)
call _Deallocate
jmp _X7072696E74737472696E67_1
.p2align 4,,15
.globl _X7072696E7473_1

_X7072696E7473_1:
jmp _X7072696E74737472696E67_1
.p2align 4,,15
.globl _X6D61696E_0

_X6D61696E_0:
movl $_Lpred3_1+0,%eax
movl $0,%edx
call _Create_Choice_Point
call _Put_List
movl %eax,0(%ebx)
movl $-2147483325,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483189,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483225,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483209,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483241,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483225,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483189,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483201,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483517,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483325,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483189,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483201,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483233,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483189,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483257,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483209,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483257,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483517,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483245,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483241,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483517,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483325,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483189,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483201,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483213,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483201,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_List
testl %eax,%eax
je _fail
movl $-2147483233,%eax
call _Unify_Integer_Tagged
testl %eax,%eax
je _fail
call _Unify_Nil
testl %eax,%eax
je _fail
jmp _X7072696E7473_1

_Lpred3_1:
movl $0,%eax
call _Delete_Choice_Point
jmp *1040(%ebx)
.p2align 4,,15

_Object_Initializer:
pushl %esi
subl $132,%esp
movl $_Prolog_Object_Initializer+0,0(%esp)
movl $_System_Directives+0,4(%esp)
movl $_User_Directives+0,8(%esp)
call _New_Object
addl $132,%esp
popl %esi
ret
.p2align 4,,15

_Prolog_Object_Initializer:
pushl %esi
subl $132,%esp
movl $.LC0,%eax
call _Create_Atom
movl %eax,_at+0
movl $.LC1,%eax
call _Create_Atom
movl %eax,_at+12
movl $.LC2,%eax
call _Create_Atom
movl %eax,_at+8
movl $.LC3,%eax
call _Create_Atom
movl %eax,_at+4
movl _at+4,%eax
movl $1,%edx
movl _at+0,%ecx
movl $2,0(%esp)
movl $1,4(%esp)
movl $_X7072696E74737472696E67_1+0,8(%esp)
call _Create_Pred
movl _at+8,%eax
movl $1,%edx
movl _at+0,%ecx
movl $4,0(%esp)
movl $1,4(%esp)
movl $_X7072696E7473_1+0,8(%esp)
call _Create_Pred
movl _at+12,%eax
movl $0,%edx
movl _at+0,%ecx
movl $5,0(%esp)
movl $1,4(%esp)
movl $_X6D61696E_0+0,8(%esp)
call _Create_Pred
addl $132,%esp
popl %esi
ret
.p2align 4,,15

_System_Directives:
pushl %esi
subl $132,%esp
addl $132,%esp
popl %esi
ret
.p2align 4,,15

_User_Directives:
pushl %esi
subl $132,%esp
addl $132,%esp
popl %esi
ret
.section .ctors,"aw"
.align 4
.long _Object_Initializer
.section .rdata,"dr"
.LC0:
.string "C:\\atividade04\\primeiro.pl"
.LC1:
.string "main"
.LC2:
.string "prints"
.LC3:
.string "printstring"
.data
.align 4
.lcomm _at,16


SEGUNDO CODIGO EM MINI- ASSEMBLY



pl_code global X7072696E74737472696E67_1
call_c fast Switch_On_Term_Var_Atm_Lst(&Lpred1_1,&Lpred1_2,&Lpred1_4)
jump_ret

Lpred1_1:
call_c fast Create_Choice_Point1(&Lpred1_3)

Lpred1_2:
call_c fast Get_Nil(X(0))
fail_ret
pl_ret

Lpred1_3:
call_c fast Delete_Choice_Point1()

Lpred1_4:
call_c fast Allocate(1)
call_c fast Get_List(X(0))
fail_ret
call_c fast Unify_Variable()
move_ret X(0)
call_c fast Unify_Variable()
move_ret Y(0)
pl_call X707574_1
move Y(0),X(0)
call_c fast Deallocate()
pl_jump X7072696E74737472696E67_1


pl_code global X7072696E7473_1
pl_jump X7072696E74737472696E67_1


pl_code global X6D61696E_0
call_c fast Create_Choice_Point(&Lpred3_1,0)
call_c fast Put_List()
move_ret X(0)
call_c fast Unify_Integer_Tagged(-2147483325)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483189)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483225)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483209)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483241)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483225)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483189)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483201)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483517)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483325)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483189)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483201)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483233)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483189)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483257)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483209)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483257)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483517)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483245)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483241)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483517)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483325)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483189)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483201)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483213)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483201)
fail_ret
call_c fast Unify_List()
fail_ret
call_c fast Unify_Integer_Tagged(-2147483233)
fail_ret
call_c fast Unify_Nil()
fail_ret
pl_jump X7072696E7473_1

Lpred3_1:
call_c fast Delete_Choice_Point(0)
pl_ret


long local at(4)


c_code initializer Object_Initializer

call_c New_Object(&Prolog_Object_Initializer,&System_Directives,&User_Directives)
c_ret


c_code local Prolog_Object_Initializer

call_c fast Create_Atom("C:\\atividade04\\primeiro.pl")
move_ret at(0)
call_c fast Create_Atom("main")
move_ret at(3)
call_c fast Create_Atom("prints")
move_ret at(2)
call_c fast Create_Atom("printstring")
move_ret at(1)

call_c fast Create_Pred(at(1),1,at(0),2,1,&X7072696E74737472696E67_1)

call_c fast Create_Pred(at(2),1,at(0),4,1,&X7072696E7473_1)

call_c fast Create_Pred(at(3),0,at(0),5,1,&X6D61696E_0)
c_ret

c_code local System_Directives

c_ret

c_code local User_Directives

c_ret




  






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts