<bochs:3> info break Num Type Disp Enb Address 1 pbreakpoint keep y 0x00000000b000 <bochs:4> s Next at t=16227014 (0) [0x00000000b005] 0008:0000b005 (unk. ctxt): call .+2 (0x0000b00c) ; e802000000 <bochs:5> s Next at t=16227015 (0) [0x00000000b00c] 0008:0000b00c (unk. ctxt): push ebp ; 55 <bochs:6> s Next at t=16227016 (0) [0x00000000b00d] 0008:0000b00d (unk. ctxt): mov ebp, esp ; 89e5 <bochs:7> s Next at t=16227017 (0) [0x00000000b00f] 0008:0000b00f (unk. ctxt): call .+8 (0x0000b01c) ; e808000000 <bochs:8> s Next at t=16227018 (0) [0x00000000b01c] 0008:0000b01c (unk. ctxt): mov eax, dword ptr ss:[esp] ; 8b0424 <bochs:9> s Next at t=16227019 (0) [0x00000000b01f] 0008:0000b01f (unk. ctxt): ret ; c3 <bochs:10> s Next at t=16227020 (0) [0x00000000b014] 0008:0000b014 (unk. ctxt): add eax, 0x00002fe8 ; 05e82f0000 <bochs:11> s Next at t=16227021 (0) [0x00000000b019] 0008:0000b019 (unk. ctxt): nop ; 90 <bochs:12> s Next at t=16227022 (0) [0x00000000b01a] 0008:0000b01a (unk. ctxt): pop ebp ; 5d <bochs:13> s Next at t=16227023 (0) [0x00000000b01b] 0008:0000b01b (unk. ctxt): ret ; c3 <bochs:14> s Next at t=16227024 (0) [0x00000000b00a] 0008:0000b00a (unk. ctxt): jmp .-2 (0x0000b00a) ; ebfe <bochs:15> s Next at t=16227025 (0) [0x00000000b00a] 0008:0000b00a (unk. ctxt): jmp .-2 (0x0000b00a) ; ebfe <bochs:16>
intPrintString(constchar* s) { int ret = 0; if( s != NULL ) { while( *s ) { ret += PrintChar(*s++); } } else { ret = -1; } return ret; }
intPrintIntHex(unsignedint n) { char hex[11] = {'0', 'x', 0}; int i = 0; for(i=9; i>=2; i--) { int p = n & 0xF; if( p < 10 ) { hex[i] = ('0' + p); } else { hex[i] = ('A' + p - 10); } n = n >> 4; } return PrintString(hex); }
intPrintIntDec(int n) { int ret = 0; if( n < 0 ) { ret += PrintChar('-'); n = -n; ret += PrintIntDec(n); } else { if( n < 10 ) { ret += PrintChar('0' + n); } else { ret += PrintIntDec(n/10); ret += PrintIntDec(n%10); } } return ret; }