// Kitchen Sink Public Test Program // EE382N Spring 2008 // 0x0: b8 00 02 0c 00 //movl $0x000c0200, %eax // eax = 0x000c0200 0x5: 66 8e d8 //movw %ax, %ds // DS = 0x0200 0x8: bb 00 0b 00 00 //movl $0x00000b00, %ebx // ebx = 0x00000b00 0xd: 66 8e d3 //movw %bx, %ss // SS = 0x0b00 0x10: c1 f8 10 //sarl $0x10, %eax // eax = 0x0000000c, CF=0,SF=0,ZF=0,PF=1,others undef 0x13: 75 05 //jne 0x5 // eip += 5 0x15: bb ff ff ff ff //movl $0xffffffff, %ebx // (skip) 0x1a: 66 81 c3 50 f5 //addw $0xf550, %bx // bx = 0x0050, CF=1,SF=0,ZF=0,PF=1,AF=0,OF=0 0x1f: 89 dc //movl %ebx, %esp // esp = 0x00000050 0x21: 50 //pushl %eax // esp = 0x0000004c; M[VA=0x0b00004c] = 0x0000000c 0x22: ff 30 //pushl (%eax) // esp = 0x48; M[VA=0x0b000048] = M[VA=0x0200000c] = 0x00000002 0x24: fe c4 //incb %ah // ah = 0x01 (eax=0x0000010c), SF=0,ZF=0,PF=0,AF=0,OF=0 0x26: 58 //popl %eax // eax = M[0x0b000048] = 0x0000002; esp = 0x4c 0x27: 9a 3f 00 00 00 //calll 0x0400:0x0000003f // far call: push cs,eip; // esp = 0x48; M[VA=0x0b000048] = 0x00000000; // esp = 0x44; M[VA=0x0b000044] = eip; 00 04 // cs=0x0400, eip= 0x0000003f // after return... 0x2e: 5c //popl %esp // esp = 0x50; esp = M[0xb000004c] = 0x0000000c 0x2f: f4 //hlt 0x2000: 00 00 ed fe ef 0x2005: be 00 00 00 00 0x200a: 00 00 02 00 00 0x200f: 00 00 00 00 00 0x204a: 00 00 06 00 00 0x204f: 00 00 00 00 00 0x503f: 81 c3 f2 ff ff //addl $0xfffffff2, %ebx // ebx = 0x42, CF=1,ZF=0,PF=1,AF=0,OF=0,SF=0 ff // 0x5045: 66 0f 42 08 // cmovcw (%eax),%cx // cx = M[VA=0x02000002] = fe_ed, 0x5049: 66 c1 fb 03 //sarw $0x3, %bx // bx = 0x8, CF=0,SF=0,ZF=0,PF=0, others undef 0x504d: 8b 4c 18 42 //movl 0x42(%eax, %ebx, 1), %ecx // ecx = M[0x02000000+0x02+0x42+0x8<<0] = 0x00000006 0x5051: 04 08 //addb $0x8, %al // al= 0A, eax = 0x0000000A, CF=0, ZF=0, PF=1, AF=0, OF=0, SF=0 0x5053: cb //far-return-word // eip =popw(); // cs = popw(); // (new fetch address is VA=0x2e) // esp = 0x4C