diff --git a/.gitignore b/.gitignore index 1b72d0a..3ca783d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ cmake-build-debug -.idea \ No newline at end of file +.idea +*.[oa] +*~ +*.out +*.save diff --git a/01_ENV/Testat/a.out b/01_ENV/Testat/a.out deleted file mode 100755 index bf54c6a..0000000 Binary files a/01_ENV/Testat/a.out and /dev/null differ diff --git a/01_ENV/Testat/func1.o b/01_ENV/Testat/func1.o deleted file mode 100644 index 913e388..0000000 Binary files a/01_ENV/Testat/func1.o and /dev/null differ diff --git a/01_ENV/Testat/main.o b/01_ENV/Testat/main.o deleted file mode 100644 index a3d69ce..0000000 Binary files a/01_ENV/Testat/main.o and /dev/null differ diff --git a/01_ENV/a.out b/01_ENV/a.out deleted file mode 100755 index 8959975..0000000 Binary files a/01_ENV/a.out and /dev/null differ diff --git a/01_ENV/func1.o b/01_ENV/func1.o deleted file mode 100644 index 68c0170..0000000 Binary files a/01_ENV/func1.o and /dev/null differ diff --git a/01_ENV/main.o b/01_ENV/main.o deleted file mode 100644 index 4f83c68..0000000 Binary files a/01_ENV/main.o and /dev/null differ diff --git a/01_ENV/objdump-S_a.out.txt b/01_ENV/objdump-S_a.out.txt deleted file mode 100644 index 68ae9a0..0000000 --- a/01_ENV/objdump-S_a.out.txt +++ /dev/null @@ -1,250 +0,0 @@ - -a.out: Dateiformat elf64-x86-64 - - -Disassembly of section .init: - -0000000000400378 <_init>: - 400378: 48 83 ec 08 sub $0x8,%rsp - 40037c: 48 8b 05 75 0c 20 00 mov 0x200c75(%rip),%rax # 600ff8 <__gmon_start__> - 400383: 48 85 c0 test %rax,%rax - 400386: 74 02 je 40038a <_init+0x12> - 400388: ff d0 callq *%rax - 40038a: e8 61 00 00 00 callq 4003f0 <__do_global_ctors_aux> - 40038f: 48 83 c4 08 add $0x8,%rsp - 400393: c3 retq - -Disassembly of section .plt: - -00000000004003a0 <.plt>: - 4003a0: ff 35 62 0c 20 00 pushq 0x200c62(%rip) # 601008 <_GLOBAL_OFFSET_TABLE_+0x8> - 4003a6: ff 25 64 0c 20 00 jmpq *0x200c64(%rip) # 601010 <_GLOBAL_OFFSET_TABLE_+0x10> - 4003ac: 0f 1f 40 00 nopl 0x0(%rax) - -00000000004003b0 : - 4003b0: ff 25 62 0c 20 00 jmpq *0x200c62(%rip) # 601018 - 4003b6: 68 00 00 00 00 pushq $0x0 - 4003bb: e9 e0 ff ff ff jmpq 4003a0 <.plt> - -Disassembly of section .text: - -00000000004003c0 <_start>: - 4003c0: 31 ed xor %ebp,%ebp - 4003c2: 49 89 d1 mov %rdx,%r9 - 4003c5: 5e pop %rsi - 4003c6: 48 89 e2 mov %rsp,%rdx - 4003c9: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp - 4003cd: 50 push %rax - 4003ce: 54 push %rsp - 4003cf: 49 c7 c0 00 06 40 00 mov $0x400600,%r8 - 4003d6: 48 c7 c1 90 05 40 00 mov $0x400590,%rcx - 4003dd: 48 c7 c7 28 05 40 00 mov $0x400528,%rdi - 4003e4: ff 15 06 0c 20 00 callq *0x200c06(%rip) # 600ff0 <__libc_start_main@GLIBC_2.2.5> - 4003ea: f4 hlt - 4003eb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) - -00000000004003f0 <__do_global_ctors_aux>: - 4003f0: 8b 05 36 0c 20 00 mov 0x200c36(%rip),%eax # 60102c - 4003f6: 85 c0 test %eax,%eax - 4003f8: 74 06 je 400400 <__do_global_ctors_aux+0x10> - 4003fa: f3 c3 repz retq - 4003fc: 0f 1f 40 00 nopl 0x0(%rax) - 400400: 55 push %rbp - 400401: 53 push %rbx - 400402: 48 83 ec 08 sub $0x8,%rsp - 400406: 48 8b 05 33 0a 20 00 mov 0x200a33(%rip),%rax # 600e40 <__CTOR_LIST__> - 40040d: c7 05 15 0c 20 00 01 movl $0x1,0x200c15(%rip) # 60102c - 400414: 00 00 00 - 400417: 48 83 f8 ff cmp $0xffffffffffffffff,%rax - 40041b: 48 89 c1 mov %rax,%rcx - 40041e: 74 38 je 400458 <__do_global_ctors_aux+0x68> - 400420: 48 8d 15 19 0a 20 00 lea 0x200a19(%rip),%rdx # 600e40 <__CTOR_LIST__> - 400427: 48 85 c0 test %rax,%rax - 40042a: 48 8d 58 ff lea -0x1(%rax),%rbx - 40042e: 48 8d 14 c2 lea (%rdx,%rax,8),%rdx - 400432: 74 1a je 40044e <__do_global_ctors_aux+0x5e> - 400434: 48 89 d8 mov %rbx,%rax - 400437: 48 f7 d8 neg %rax - 40043a: 48 8d 2c c2 lea (%rdx,%rax,8),%rbp - 40043e: 66 90 xchg %ax,%ax - 400440: ff 54 dd 00 callq *0x0(%rbp,%rbx,8) - 400444: 48 83 eb 01 sub $0x1,%rbx - 400448: 48 83 fb ff cmp $0xffffffffffffffff,%rbx - 40044c: 75 f2 jne 400440 <__do_global_ctors_aux+0x50> - 40044e: 48 83 c4 08 add $0x8,%rsp - 400452: 5b pop %rbx - 400453: 5d pop %rbp - 400454: c3 retq - 400455: 0f 1f 00 nopl (%rax) - 400458: 48 83 3d e8 09 20 00 cmpq $0x0,0x2009e8(%rip) # 600e48 <__CTOR_LIST__+0x8> - 40045f: 00 - 400460: 74 ec je 40044e <__do_global_ctors_aux+0x5e> - 400462: b8 01 00 00 00 mov $0x1,%eax - 400467: eb 0a jmp 400473 <__do_global_ctors_aux+0x83> - 400469: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) - 400470: 48 89 d0 mov %rdx,%rax - 400473: 48 85 c9 test %rcx,%rcx - 400476: 48 8d 50 01 lea 0x1(%rax),%rdx - 40047a: 75 f4 jne 400470 <__do_global_ctors_aux+0x80> - 40047c: eb a2 jmp 400420 <__do_global_ctors_aux+0x30> - 40047e: 66 90 xchg %ax,%ax - -0000000000400480 <__do_global_dtors_aux>: - 400480: 8b 05 a2 0b 20 00 mov 0x200ba2(%rip),%eax # 601028 <_edata> - 400486: 85 c0 test %eax,%eax - 400488: 75 46 jne 4004d0 <__do_global_dtors_aux+0x50> - 40048a: 48 8b 05 c7 09 20 00 mov 0x2009c7(%rip),%rax # 600e58 <__DTOR_LIST__+0x8> - 400491: 48 85 c0 test %rax,%rax - 400494: 74 2a je 4004c0 <__do_global_dtors_aux+0x40> - 400496: 53 push %rbx - 400497: 48 8d 1d ba 09 20 00 lea 0x2009ba(%rip),%rbx # 600e58 <__DTOR_LIST__+0x8> - 40049e: 66 90 xchg %ax,%ax - 4004a0: 48 83 c3 08 add $0x8,%rbx - 4004a4: ff d0 callq *%rax - 4004a6: 48 8b 03 mov (%rbx),%rax - 4004a9: 48 85 c0 test %rax,%rax - 4004ac: 75 f2 jne 4004a0 <__do_global_dtors_aux+0x20> - 4004ae: c7 05 70 0b 20 00 01 movl $0x1,0x200b70(%rip) # 601028 <_edata> - 4004b5: 00 00 00 - 4004b8: 5b pop %rbx - 4004b9: c3 retq - 4004ba: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) - 4004c0: c7 05 5e 0b 20 00 01 movl $0x1,0x200b5e(%rip) # 601028 <_edata> - 4004c7: 00 00 00 - 4004ca: c3 retq - 4004cb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) - 4004d0: f3 c3 repz retq - 4004d2: 0f 1f 40 00 nopl 0x0(%rax) - 4004d6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) - 4004dd: 00 00 00 - -00000000004004e0 <__call___do_global_ctors_aux>: - 4004e0: 48 83 ec 08 sub $0x8,%rsp - 4004e4: 48 83 c4 08 add $0x8,%rsp - 4004e8: c3 retq - 4004e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) - -00000000004004f0 <__call___do_global_dtors_aux>: - 4004f0: 48 83 ec 08 sub $0x8,%rsp - 4004f4: 48 83 c4 08 add $0x8,%rsp - 4004f8: c3 retq - 4004f9: 0f 1f 00 nopl (%rax) - -00000000004004fc : - -int global = 8150; - - -int sum(int,int); - - 4004fc: 55 push %rbp - 4004fd: 48 89 e5 mov %rsp,%rbp - 400500: 48 83 ec 10 sub $0x10,%rsp - 400504: 89 7d f8 mov %edi,-0x8(%rbp) - 400507: 89 75 f4 mov %esi,-0xc(%rbp) -int sum(int a, int b){ - 40050a: c7 45 fc c3 01 00 00 movl $0x1c3,-0x4(%rbp) - int result = 451; - 400511: 8b 45 f8 mov -0x8(%rbp),%eax - 400514: 03 45 f4 add -0xc(%rbp),%eax - 400517: 89 45 fc mov %eax,-0x4(%rbp) - result = a + b; - 40051a: 8b 45 fc mov -0x4(%rbp),%eax - 40051d: 89 45 f0 mov %eax,-0x10(%rbp) - 400520: eb 00 jmp 400522 - return result; - 400522: 8b 45 f0 mov -0x10(%rbp),%eax - 400525: c9 leaveq - 400526: c3 retq - 400527: 90 nop - -0000000000400528
: -} - - -int main(int argc, char **argv) - 400528: 55 push %rbp - 400529: 48 89 e5 mov %rsp,%rbp - 40052c: 48 83 ec 30 sub $0x30,%rsp - 400530: 89 7d f8 mov %edi,-0x8(%rbp) - 400533: 48 89 75 f0 mov %rsi,-0x10(%rbp) -{ - 400537: c7 45 fc 67 12 00 00 movl $0x1267,-0x4(%rbp) - int local=4711; - 40053e: 48 b8 18 06 40 00 00 movabs $0x400618,%rax - 400545: 00 00 00 - 400548: 48 89 45 e8 mov %rax,-0x18(%rbp) - 40054c: 8b 45 fc mov -0x4(%rbp),%eax - 40054f: 89 45 e4 mov %eax,-0x1c(%rbp) - 400552: 8b 55 e4 mov -0x1c(%rbp),%edx - 400555: 8b 35 c9 0a 20 00 mov 0x200ac9(%rip),%esi # 601024 - 40055b: 48 8b 7d e8 mov -0x18(%rbp),%rdi - 40055f: 31 c0 xor %eax,%eax - 400561: e8 4a fe ff ff callq 4003b0 - printf("Hello, world!\nglobal=%d local=%d\n", global, local); - 400566: 8b 45 fc mov -0x4(%rbp),%eax - 400569: 89 45 e0 mov %eax,-0x20(%rbp) - 40056c: 8b 75 e0 mov -0x20(%rbp),%esi - 40056f: 8b 3d af 0a 20 00 mov 0x200aaf(%rip),%edi # 601024 - 400575: e8 82 ff ff ff callq 4004fc - 40057a: 89 45 fc mov %eax,-0x4(%rbp) - printf(func1(2)); - 40057d: 8b 45 fc mov -0x4(%rbp),%eax - 400580: 89 45 dc mov %eax,-0x24(%rbp) - 400583: eb 00 jmp 400585 - local = sum(global, local); - 400585: 8b 45 dc mov -0x24(%rbp),%eax - 400588: c9 leaveq - 400589: c3 retq - 40058a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) - -0000000000400590 <__libc_csu_init>: - 400590: 41 57 push %r15 - 400592: 41 56 push %r14 - 400594: 41 89 ff mov %edi,%r15d - 400597: 41 55 push %r13 - 400599: 41 54 push %r12 - 40059b: 4c 8d 25 9e 08 20 00 lea 0x20089e(%rip),%r12 # 600e40 <__CTOR_LIST__> - 4005a2: 55 push %rbp - 4005a3: 48 8d 2d 96 08 20 00 lea 0x200896(%rip),%rbp # 600e40 <__CTOR_LIST__> - 4005aa: 53 push %rbx - 4005ab: 49 89 f6 mov %rsi,%r14 - 4005ae: 49 89 d5 mov %rdx,%r13 - 4005b1: 4c 29 e5 sub %r12,%rbp - 4005b4: 48 83 ec 08 sub $0x8,%rsp - 4005b8: 48 c1 fd 03 sar $0x3,%rbp - 4005bc: e8 b7 fd ff ff callq 400378 <_init> - 4005c1: 48 85 ed test %rbp,%rbp - 4005c4: 74 20 je 4005e6 <__libc_csu_init+0x56> - 4005c6: 31 db xor %ebx,%ebx - 4005c8: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) - 4005cf: 00 - 4005d0: 4c 89 ea mov %r13,%rdx - 4005d3: 4c 89 f6 mov %r14,%rsi - 4005d6: 44 89 ff mov %r15d,%edi - 4005d9: 41 ff 14 dc callq *(%r12,%rbx,8) - 4005dd: 48 83 c3 01 add $0x1,%rbx - 4005e1: 48 39 dd cmp %rbx,%rbp - 4005e4: 75 ea jne 4005d0 <__libc_csu_init+0x40> - 4005e6: 48 83 c4 08 add $0x8,%rsp - 4005ea: 5b pop %rbx - 4005eb: 5d pop %rbp - 4005ec: 41 5c pop %r12 - 4005ee: 41 5d pop %r13 - 4005f0: 41 5e pop %r14 - 4005f2: 41 5f pop %r15 - 4005f4: c3 retq - 4005f5: 90 nop - 4005f6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) - 4005fd: 00 00 00 - -0000000000400600 <__libc_csu_fini>: - 400600: f3 c3 repz retq - -Disassembly of section .fini: - -0000000000400604 <_fini>: - 400604: 48 83 ec 08 sub $0x8,%rsp - 400608: e8 73 fe ff ff callq 400480 <__do_global_dtors_aux> - 40060d: 48 83 c4 08 add $0x8,%rsp - 400611: c3 retq diff --git a/01_ENV/objdump-S_b.out.txt b/01_ENV/objdump-S_b.out.txt deleted file mode 100644 index 352b794..0000000 --- a/01_ENV/objdump-S_b.out.txt +++ /dev/null @@ -1,379 +0,0 @@ - -a.out: Dateiformat elf64-x86-64 - - -Disassembly of section .init: - -0000000000400408 <.init>: - 400408: 48 83 ec 08 sub $0x8,%rsp - 40040c: 48 8b 05 e5 0b 20 00 mov 0x200be5(%rip),%rax # 600ff8 - 400413: 48 85 c0 test %rax,%rax - 400416: 74 02 je 40041a - 400418: ff d0 callq *%rax - 40041a: 48 83 c4 08 add $0x8,%rsp - 40041e: c3 retq - -Disassembly of section .plt: - -0000000000400420 : - 400420: ff 35 e2 0b 20 00 pushq 0x200be2(%rip) # 601008 - 400426: ff 25 e4 0b 20 00 jmpq *0x200be4(%rip) # 601010 - 40042c: 0f 1f 40 00 nopl 0x0(%rax) - -0000000000400430 : - 400430: ff 25 e2 0b 20 00 jmpq *0x200be2(%rip) # 601018 - 400436: 68 00 00 00 00 pushq $0x0 - 40043b: e9 e0 ff ff ff jmpq 400420 - -0000000000400440 : - 400440: ff 25 da 0b 20 00 jmpq *0x200bda(%rip) # 601020 - 400446: 68 01 00 00 00 pushq $0x1 - 40044b: e9 d0 ff ff ff jmpq 400420 - -Disassembly of section .text: - -0000000000400450 <.text>: - 400450: 31 ed xor %ebp,%ebp - 400452: 49 89 d1 mov %rdx,%r9 - 400455: 5e pop %rsi - 400456: 48 89 e2 mov %rsp,%rdx - 400459: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp - 40045d: 50 push %rax - 40045e: 54 push %rsp - 40045f: 49 c7 c0 00 09 40 00 mov $0x400900,%r8 - 400466: 48 c7 c1 90 08 40 00 mov $0x400890,%rcx - 40046d: 48 c7 c7 b0 06 40 00 mov $0x4006b0,%rdi - 400474: ff 15 76 0b 20 00 callq *0x200b76(%rip) # 600ff0 - 40047a: f4 hlt - 40047b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) - 400480: 55 push %rbp - 400481: b8 40 10 60 00 mov $0x601040,%eax - 400486: 48 3d 40 10 60 00 cmp $0x601040,%rax - 40048c: 48 89 e5 mov %rsp,%rbp - 40048f: 74 17 je 4004a8 - 400491: b8 00 00 00 00 mov $0x0,%eax - 400496: 48 85 c0 test %rax,%rax - 400499: 74 0d je 4004a8 - 40049b: 5d pop %rbp - 40049c: bf 40 10 60 00 mov $0x601040,%edi - 4004a1: ff e0 jmpq *%rax - 4004a3: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) - 4004a8: 5d pop %rbp - 4004a9: c3 retq - 4004aa: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) - 4004b0: be 40 10 60 00 mov $0x601040,%esi - 4004b5: 55 push %rbp - 4004b6: 48 81 ee 40 10 60 00 sub $0x601040,%rsi - 4004bd: 48 89 e5 mov %rsp,%rbp - 4004c0: 48 c1 fe 03 sar $0x3,%rsi - 4004c4: 48 89 f0 mov %rsi,%rax - 4004c7: 48 c1 e8 3f shr $0x3f,%rax - 4004cb: 48 01 c6 add %rax,%rsi - 4004ce: 48 d1 fe sar %rsi - 4004d1: 74 15 je 4004e8 - 4004d3: b8 00 00 00 00 mov $0x0,%eax - 4004d8: 48 85 c0 test %rax,%rax - 4004db: 74 0b je 4004e8 - 4004dd: 5d pop %rbp - 4004de: bf 40 10 60 00 mov $0x601040,%edi - 4004e3: ff e0 jmpq *%rax - 4004e5: 0f 1f 00 nopl (%rax) - 4004e8: 5d pop %rbp - 4004e9: c3 retq - 4004ea: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) - 4004f0: 80 3d 45 0b 20 00 00 cmpb $0x0,0x200b45(%rip) # 60103c - 4004f7: 75 17 jne 400510 - 4004f9: 55 push %rbp - 4004fa: 48 89 e5 mov %rsp,%rbp - 4004fd: e8 7e ff ff ff callq 400480 - 400502: c6 05 33 0b 20 00 01 movb $0x1,0x200b33(%rip) # 60103c - 400509: 5d pop %rbp - 40050a: c3 retq - 40050b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) - 400510: f3 c3 repz retq - 400512: 0f 1f 40 00 nopl 0x0(%rax) - 400516: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) - 40051d: 00 00 00 - 400520: 55 push %rbp - 400521: 48 89 e5 mov %rsp,%rbp - 400524: 5d pop %rbp - 400525: eb 89 jmp 4004b0 - 400527: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) - 40052e: 00 00 - 400530: 55 push %rbp - 400531: 48 89 e5 mov %rsp,%rbp - 400534: 89 7d fc mov %edi,-0x4(%rbp) - 400537: 8b 7d fc mov -0x4(%rbp),%edi - 40053a: 83 ef 02 sub $0x2,%edi - 40053d: 8b 45 fc mov -0x4(%rbp),%eax - 400540: 83 e8 04 sub $0x4,%eax - 400543: 0f af f8 imul %eax,%edi - 400546: 8b 45 fc mov -0x4(%rbp),%eax - 400549: 83 e8 0b sub $0xb,%eax - 40054c: 0f af f8 imul %eax,%edi - 40054f: 8b 45 fc mov -0x4(%rbp),%eax - 400552: 83 e8 12 sub $0x12,%eax - 400555: 0f af f8 imul %eax,%edi - 400558: 89 f8 mov %edi,%eax - 40055a: 5d pop %rbp - 40055b: c3 retq - 40055c: 0f 1f 40 00 nopl 0x0(%rax) - 400560: 55 push %rbp - 400561: 48 89 e5 mov %rsp,%rbp - 400564: 48 83 ec 20 sub $0x20,%rsp - 400568: f2 0f 10 0d c0 03 00 movsd 0x3c0(%rip),%xmm1 # 400930 - 40056f: 00 - 400570: 89 7d fc mov %edi,-0x4(%rbp) - 400573: 8b 7d fc mov -0x4(%rbp),%edi - 400576: f2 0f 2a c7 cvtsi2sd %edi,%xmm0 - 40057a: e8 c1 fe ff ff callq 400440 - 40057f: f2 0f 10 0d a1 03 00 movsd 0x3a1(%rip),%xmm1 # 400928 - 400586: 00 - 400587: 8b 7d fc mov -0x4(%rbp),%edi - 40058a: f2 0f 2a d7 cvtsi2sd %edi,%xmm2 - 40058e: f2 0f 11 45 f0 movsd %xmm0,-0x10(%rbp) - 400593: 0f 28 c2 movaps %xmm2,%xmm0 - 400596: e8 a5 fe ff ff callq 400440 - 40059b: f2 0f 10 0d 7d 03 00 movsd 0x37d(%rip),%xmm1 # 400920 - 4005a2: 00 - 4005a3: f2 0f 10 15 6d 03 00 movsd 0x36d(%rip),%xmm2 # 400918 - 4005aa: 00 - 4005ab: f2 0f 59 d0 mulsd %xmm0,%xmm2 - 4005af: f2 0f 10 45 f0 movsd -0x10(%rbp),%xmm0 - 4005b4: f2 0f 5c c2 subsd %xmm2,%xmm0 - 4005b8: 8b 7d fc mov -0x4(%rbp),%edi - 4005bb: f2 0f 2a d7 cvtsi2sd %edi,%xmm2 - 4005bf: f2 0f 11 45 e8 movsd %xmm0,-0x18(%rbp) - 4005c4: 0f 28 c2 movaps %xmm2,%xmm0 - 4005c7: e8 74 fe ff ff callq 400440 - 4005cc: f2 0f 10 0d 44 03 00 movsd 0x344(%rip),%xmm1 # 400918 - 4005d3: 00 - 4005d4: f2 0f 10 55 e8 movsd -0x18(%rbp),%xmm2 - 4005d9: f2 0f 58 d0 addsd %xmm0,%xmm2 - 4005dd: f2 0f 58 d1 addsd %xmm1,%xmm2 - 4005e1: f2 0f 2c c2 cvttsd2si %xmm2,%eax - 4005e5: 48 83 c4 20 add $0x20,%rsp - 4005e9: 5d pop %rbp - 4005ea: c3 retq - 4005eb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) - 4005f0: 55 push %rbp - 4005f1: 48 89 e5 mov %rsp,%rbp - 4005f4: 48 83 ec 10 sub $0x10,%rsp - 4005f8: 89 7d fc mov %edi,-0x4(%rbp) - 4005fb: 83 7d fc 00 cmpl $0x0,-0x4(%rbp) - 4005ff: 0f 8c 2b 00 00 00 jl 400630 - 400605: 8b 7d fc mov -0x4(%rbp),%edi - 400608: e8 53 ff ff ff callq 400560 - 40060d: 48 bf 38 09 40 00 00 movabs $0x400938,%rdi - 400614: 00 00 00 - 400617: 89 c6 mov %eax,%esi - 400619: b0 00 mov $0x0,%al - 40061b: e8 10 fe ff ff callq 400430 - 400620: 8b 75 fc mov -0x4(%rbp),%esi - 400623: 83 ee 01 sub $0x1,%esi - 400626: 89 f7 mov %esi,%edi - 400628: 89 45 f8 mov %eax,-0x8(%rbp) - 40062b: e8 c0 ff ff ff callq 4005f0 - 400630: 48 83 c4 10 add $0x10,%rsp - 400634: 5d pop %rbp - 400635: c3 retq - 400636: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) - 40063d: 00 00 00 - 400640: 55 push %rbp - 400641: 48 89 e5 mov %rsp,%rbp - 400644: 48 83 ec 10 sub $0x10,%rsp - 400648: 89 7d fc mov %edi,-0x4(%rbp) - 40064b: 83 7d fc 00 cmpl $0x0,-0x4(%rbp) - 40064f: 0f 8c 2b 00 00 00 jl 400680 - 400655: 8b 45 fc mov -0x4(%rbp),%eax - 400658: 83 e8 01 sub $0x1,%eax - 40065b: 89 c7 mov %eax,%edi - 40065d: e8 8e ff ff ff callq 4005f0 - 400662: 8b 7d fc mov -0x4(%rbp),%edi - 400665: e8 f6 fe ff ff callq 400560 - 40066a: 48 bf 38 09 40 00 00 movabs $0x400938,%rdi - 400671: 00 00 00 - 400674: 89 c6 mov %eax,%esi - 400676: b0 00 mov $0x0,%al - 400678: e8 b3 fd ff ff callq 400430 - 40067d: 89 45 f8 mov %eax,-0x8(%rbp) - 400680: 48 83 c4 10 add $0x10,%rsp - 400684: 5d pop %rbp - 400685: c3 retq - 400686: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) - 40068d: 00 00 00 - 400690: 55 push %rbp - 400691: 48 89 e5 mov %rsp,%rbp - 400694: 89 7d fc mov %edi,-0x4(%rbp) - 400697: 89 75 f8 mov %esi,-0x8(%rbp) - 40069a: c7 45 f4 c3 01 00 00 movl $0x1c3,-0xc(%rbp) - 4006a1: 8b 75 fc mov -0x4(%rbp),%esi - 4006a4: 03 75 f8 add -0x8(%rbp),%esi - 4006a7: 89 75 f4 mov %esi,-0xc(%rbp) - 4006aa: 8b 45 f4 mov -0xc(%rbp),%eax - 4006ad: 5d pop %rbp - 4006ae: c3 retq - 4006af: 90 nop - 4006b0: 55 push %rbp - 4006b1: 48 89 e5 mov %rsp,%rbp - 4006b4: 48 83 ec 50 sub $0x50,%rsp - 4006b8: 48 b8 3c 09 40 00 00 movabs $0x40093c,%rax - 4006bf: 00 00 00 - 4006c2: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp) - 4006c9: 89 7d f8 mov %edi,-0x8(%rbp) - 4006cc: 48 89 75 f0 mov %rsi,-0x10(%rbp) - 4006d0: c7 45 ec 67 12 00 00 movl $0x1267,-0x14(%rbp) - 4006d7: 8b 34 25 38 10 60 00 mov 0x601038,%esi - 4006de: 8b 55 ec mov -0x14(%rbp),%edx - 4006e1: 48 89 c7 mov %rax,%rdi - 4006e4: b0 00 mov $0x0,%al - 4006e6: e8 45 fd ff ff callq 400430 - 4006eb: bf 02 00 00 00 mov $0x2,%edi - 4006f0: 89 45 d4 mov %eax,-0x2c(%rbp) - 4006f3: e8 68 fe ff ff callq 400560 - 4006f8: 48 bf 5e 09 40 00 00 movabs $0x40095e,%rdi - 4006ff: 00 00 00 - 400702: 89 c6 mov %eax,%esi - 400704: b0 00 mov $0x0,%al - 400706: e8 25 fd ff ff callq 400430 - 40070b: bf 02 00 00 00 mov $0x2,%edi - 400710: 89 45 d0 mov %eax,-0x30(%rbp) - 400713: e8 18 fe ff ff callq 400530 - 400718: 48 bf 6e 09 40 00 00 movabs $0x40096e,%rdi - 40071f: 00 00 00 - 400722: 89 c6 mov %eax,%esi - 400724: b0 00 mov $0x0,%al - 400726: e8 05 fd ff ff callq 400430 - 40072b: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%rbp) - 400732: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%rbp) - 400739: 89 45 cc mov %eax,-0x34(%rbp) - 40073c: 83 7d e4 05 cmpl $0x5,-0x1c(%rbp) - 400740: 0f 8f 1c 00 00 00 jg 400762 - 400746: 8b 7d e4 mov -0x1c(%rbp),%edi - 400749: e8 e2 fd ff ff callq 400530 - 40074e: 03 45 e8 add -0x18(%rbp),%eax - 400751: 89 45 e8 mov %eax,-0x18(%rbp) - 400754: 8b 45 e4 mov -0x1c(%rbp),%eax - 400757: 83 c0 01 add $0x1,%eax - 40075a: 89 45 e4 mov %eax,-0x1c(%rbp) - 40075d: e9 da ff ff ff jmpq 40073c - 400762: 48 bf 7e 09 40 00 00 movabs $0x40097e,%rdi - 400769: 00 00 00 - 40076c: 8b 75 e8 mov -0x18(%rbp),%esi - 40076f: b0 00 mov $0x0,%al - 400771: e8 ba fc ff ff callq 400430 - 400776: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%rbp) - 40077d: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%rbp) - 400784: 89 45 c8 mov %eax,-0x38(%rbp) - 400787: 83 7d e0 05 cmpl $0x5,-0x20(%rbp) - 40078b: 0f 8f 1c 00 00 00 jg 4007ad - 400791: 8b 7d e0 mov -0x20(%rbp),%edi - 400794: e8 97 fd ff ff callq 400530 - 400799: 03 45 e8 add -0x18(%rbp),%eax - 40079c: 89 45 e8 mov %eax,-0x18(%rbp) - 40079f: 8b 45 e0 mov -0x20(%rbp),%eax - 4007a2: 83 c0 01 add $0x1,%eax - 4007a5: 89 45 e0 mov %eax,-0x20(%rbp) - 4007a8: e9 da ff ff ff jmpq 400787 - 4007ad: 48 bf 87 09 40 00 00 movabs $0x400987,%rdi - 4007b4: 00 00 00 - 4007b7: 8b 75 e8 mov -0x18(%rbp),%esi - 4007ba: b0 00 mov $0x0,%al - 4007bc: e8 6f fc ff ff callq 400430 - 4007c1: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%rbp) - 4007c8: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%rbp) - 4007cf: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%rbp) - 4007d6: 89 45 c4 mov %eax,-0x3c(%rbp) - 4007d9: 83 7d d8 14 cmpl $0x14,-0x28(%rbp) - 4007dd: 0f 8f 2d 00 00 00 jg 400810 - 4007e3: 8b 7d d8 mov -0x28(%rbp),%edi - 4007e6: e8 45 fd ff ff callq 400530 - 4007eb: 83 f8 00 cmp $0x0,%eax - 4007ee: 0f 85 09 00 00 00 jne 4007fd - 4007f4: 8b 45 dc mov -0x24(%rbp),%eax - 4007f7: 83 c0 01 add $0x1,%eax - 4007fa: 89 45 dc mov %eax,-0x24(%rbp) - 4007fd: e9 00 00 00 00 jmpq 400802 - 400802: 8b 45 d8 mov -0x28(%rbp),%eax - 400805: 83 c0 01 add $0x1,%eax - 400808: 89 45 d8 mov %eax,-0x28(%rbp) - 40080b: e9 c9 ff ff ff jmpq 4007d9 - 400810: 48 bf 92 09 40 00 00 movabs $0x400992,%rdi - 400817: 00 00 00 - 40081a: 8b 75 dc mov -0x24(%rbp),%esi - 40081d: b0 00 mov $0x0,%al - 40081f: e8 0c fc ff ff callq 400430 - 400824: bf 14 00 00 00 mov $0x14,%edi - 400829: 89 45 c0 mov %eax,-0x40(%rbp) - 40082c: e8 bf fd ff ff callq 4005f0 - 400831: 48 bf 6c 09 40 00 00 movabs $0x40096c,%rdi - 400838: 00 00 00 - 40083b: 89 45 bc mov %eax,-0x44(%rbp) - 40083e: b0 00 mov $0x0,%al - 400840: e8 eb fb ff ff callq 400430 - 400845: bf 14 00 00 00 mov $0x14,%edi - 40084a: 89 45 b8 mov %eax,-0x48(%rbp) - 40084d: e8 ee fd ff ff callq 400640 - 400852: 48 bf 6c 09 40 00 00 movabs $0x40096c,%rdi - 400859: 00 00 00 - 40085c: 89 45 b4 mov %eax,-0x4c(%rbp) - 40085f: b0 00 mov $0x0,%al - 400861: e8 ca fb ff ff callq 400430 - 400866: 8b 3c 25 38 10 60 00 mov 0x601038,%edi - 40086d: 8b 75 ec mov -0x14(%rbp),%esi - 400870: 89 45 b0 mov %eax,-0x50(%rbp) - 400873: e8 18 fe ff ff callq 400690 - 400878: 89 45 ec mov %eax,-0x14(%rbp) - 40087b: 8b 45 ec mov -0x14(%rbp),%eax - 40087e: 48 83 c4 50 add $0x50,%rsp - 400882: 5d pop %rbp - 400883: c3 retq - 400884: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) - 40088b: 00 00 00 - 40088e: 66 90 xchg %ax,%ax - 400890: 41 57 push %r15 - 400892: 41 56 push %r14 - 400894: 41 89 ff mov %edi,%r15d - 400897: 41 55 push %r13 - 400899: 41 54 push %r12 - 40089b: 4c 8d 25 5e 05 20 00 lea 0x20055e(%rip),%r12 # 600e00 - 4008a2: 55 push %rbp - 4008a3: 48 8d 2d 5e 05 20 00 lea 0x20055e(%rip),%rbp # 600e08 - 4008aa: 53 push %rbx - 4008ab: 49 89 f6 mov %rsi,%r14 - 4008ae: 49 89 d5 mov %rdx,%r13 - 4008b1: 4c 29 e5 sub %r12,%rbp - 4008b4: 48 83 ec 08 sub $0x8,%rsp - 4008b8: 48 c1 fd 03 sar $0x3,%rbp - 4008bc: e8 47 fb ff ff callq 400408 - 4008c1: 48 85 ed test %rbp,%rbp - 4008c4: 74 20 je 4008e6 - 4008c6: 31 db xor %ebx,%ebx - 4008c8: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) - 4008cf: 00 - 4008d0: 4c 89 ea mov %r13,%rdx - 4008d3: 4c 89 f6 mov %r14,%rsi - 4008d6: 44 89 ff mov %r15d,%edi - 4008d9: 41 ff 14 dc callq *(%r12,%rbx,8) - 4008dd: 48 83 c3 01 add $0x1,%rbx - 4008e1: 48 39 dd cmp %rbx,%rbp - 4008e4: 75 ea jne 4008d0 - 4008e6: 48 83 c4 08 add $0x8,%rsp - 4008ea: 5b pop %rbx - 4008eb: 5d pop %rbp - 4008ec: 41 5c pop %r12 - 4008ee: 41 5d pop %r13 - 4008f0: 41 5e pop %r14 - 4008f2: 41 5f pop %r15 - 4008f4: c3 retq - 4008f5: 90 nop - 4008f6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) - 4008fd: 00 00 00 - 400900: f3 c3 repz retq - -Disassembly of section .fini: - -0000000000400904 <.fini>: - 400904: 48 83 ec 08 sub $0x8,%rsp - 400908: 48 83 c4 08 add $0x8,%rsp - 40090c: c3 retq diff --git a/01_ENV/objdump-S_c.out.txt b/01_ENV/objdump-S_c.out.txt deleted file mode 100644 index 5a2a8db..0000000 --- a/01_ENV/objdump-S_c.out.txt +++ /dev/null @@ -1,379 +0,0 @@ - -a.out: Dateiformat elf64-x86-64 - - -Disassembly of section .init: - -0000000000400408 <.init>: - 400408: 48 83 ec 08 sub $0x8,%rsp - 40040c: 48 8b 05 e5 0b 20 00 mov 0x200be5(%rip),%rax # 600ff8 - 400413: 48 85 c0 test %rax,%rax - 400416: 74 02 je 40041a - 400418: ff d0 callq *%rax - 40041a: 48 83 c4 08 add $0x8,%rsp - 40041e: c3 retq - -Disassembly of section .plt: - -0000000000400420 : - 400420: ff 35 e2 0b 20 00 pushq 0x200be2(%rip) # 601008 - 400426: ff 25 e4 0b 20 00 jmpq *0x200be4(%rip) # 601010 - 40042c: 0f 1f 40 00 nopl 0x0(%rax) - -0000000000400430 : - 400430: ff 25 e2 0b 20 00 jmpq *0x200be2(%rip) # 601018 - 400436: 68 00 00 00 00 pushq $0x0 - 40043b: e9 e0 ff ff ff jmpq 400420 - -0000000000400440 : - 400440: ff 25 da 0b 20 00 jmpq *0x200bda(%rip) # 601020 - 400446: 68 01 00 00 00 pushq $0x1 - 40044b: e9 d0 ff ff ff jmpq 400420 - -Disassembly of section .text: - -0000000000400450 <.text>: - 400450: 31 ed xor %ebp,%ebp - 400452: 49 89 d1 mov %rdx,%r9 - 400455: 5e pop %rsi - 400456: 48 89 e2 mov %rsp,%rdx - 400459: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp - 40045d: 50 push %rax - 40045e: 54 push %rsp - 40045f: 49 c7 c0 00 09 40 00 mov $0x400900,%r8 - 400466: 48 c7 c1 90 08 40 00 mov $0x400890,%rcx - 40046d: 48 c7 c7 b0 06 40 00 mov $0x4006b0,%rdi - 400474: ff 15 76 0b 20 00 callq *0x200b76(%rip) # 600ff0 - 40047a: f4 hlt - 40047b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) - 400480: 55 push %rbp - 400481: b8 40 10 60 00 mov $0x601040,%eax - 400486: 48 3d 40 10 60 00 cmp $0x601040,%rax - 40048c: 48 89 e5 mov %rsp,%rbp - 40048f: 74 17 je 4004a8 - 400491: b8 00 00 00 00 mov $0x0,%eax - 400496: 48 85 c0 test %rax,%rax - 400499: 74 0d je 4004a8 - 40049b: 5d pop %rbp - 40049c: bf 40 10 60 00 mov $0x601040,%edi - 4004a1: ff e0 jmpq *%rax - 4004a3: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) - 4004a8: 5d pop %rbp - 4004a9: c3 retq - 4004aa: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) - 4004b0: be 40 10 60 00 mov $0x601040,%esi - 4004b5: 55 push %rbp - 4004b6: 48 81 ee 40 10 60 00 sub $0x601040,%rsi - 4004bd: 48 89 e5 mov %rsp,%rbp - 4004c0: 48 c1 fe 03 sar $0x3,%rsi - 4004c4: 48 89 f0 mov %rsi,%rax - 4004c7: 48 c1 e8 3f shr $0x3f,%rax - 4004cb: 48 01 c6 add %rax,%rsi - 4004ce: 48 d1 fe sar %rsi - 4004d1: 74 15 je 4004e8 - 4004d3: b8 00 00 00 00 mov $0x0,%eax - 4004d8: 48 85 c0 test %rax,%rax - 4004db: 74 0b je 4004e8 - 4004dd: 5d pop %rbp - 4004de: bf 40 10 60 00 mov $0x601040,%edi - 4004e3: ff e0 jmpq *%rax - 4004e5: 0f 1f 00 nopl (%rax) - 4004e8: 5d pop %rbp - 4004e9: c3 retq - 4004ea: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) - 4004f0: 80 3d 45 0b 20 00 00 cmpb $0x0,0x200b45(%rip) # 60103c - 4004f7: 75 17 jne 400510 - 4004f9: 55 push %rbp - 4004fa: 48 89 e5 mov %rsp,%rbp - 4004fd: e8 7e ff ff ff callq 400480 - 400502: c6 05 33 0b 20 00 01 movb $0x1,0x200b33(%rip) # 60103c - 400509: 5d pop %rbp - 40050a: c3 retq - 40050b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) - 400510: f3 c3 repz retq - 400512: 0f 1f 40 00 nopl 0x0(%rax) - 400516: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) - 40051d: 00 00 00 - 400520: 55 push %rbp - 400521: 48 89 e5 mov %rsp,%rbp - 400524: 5d pop %rbp - 400525: eb 89 jmp 4004b0 - 400527: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) - 40052e: 00 00 - 400530: 55 push %rbp - 400531: 48 89 e5 mov %rsp,%rbp - 400534: 89 7d fc mov %edi,-0x4(%rbp) - 400537: 8b 7d fc mov -0x4(%rbp),%edi - 40053a: 83 ef 02 sub $0x2,%edi - 40053d: 8b 45 fc mov -0x4(%rbp),%eax - 400540: 83 e8 04 sub $0x4,%eax - 400543: 0f af f8 imul %eax,%edi - 400546: 8b 45 fc mov -0x4(%rbp),%eax - 400549: 83 e8 0b sub $0xb,%eax - 40054c: 0f af f8 imul %eax,%edi - 40054f: 8b 45 fc mov -0x4(%rbp),%eax - 400552: 83 e8 12 sub $0x12,%eax - 400555: 0f af f8 imul %eax,%edi - 400558: 89 f8 mov %edi,%eax - 40055a: 5d pop %rbp - 40055b: c3 retq - 40055c: 0f 1f 40 00 nopl 0x0(%rax) - 400560: 55 push %rbp - 400561: 48 89 e5 mov %rsp,%rbp - 400564: 48 83 ec 20 sub $0x20,%rsp - 400568: f2 0f 10 0d c0 03 00 movsd 0x3c0(%rip),%xmm1 # 400930 - 40056f: 00 - 400570: 89 7d fc mov %edi,-0x4(%rbp) - 400573: 8b 7d fc mov -0x4(%rbp),%edi - 400576: f2 0f 2a c7 cvtsi2sd %edi,%xmm0 - 40057a: e8 c1 fe ff ff callq 400440 - 40057f: f2 0f 10 0d a1 03 00 movsd 0x3a1(%rip),%xmm1 # 400928 - 400586: 00 - 400587: 8b 7d fc mov -0x4(%rbp),%edi - 40058a: f2 0f 2a d7 cvtsi2sd %edi,%xmm2 - 40058e: f2 0f 11 45 f0 movsd %xmm0,-0x10(%rbp) - 400593: 0f 28 c2 movaps %xmm2,%xmm0 - 400596: e8 a5 fe ff ff callq 400440 - 40059b: f2 0f 10 0d 7d 03 00 movsd 0x37d(%rip),%xmm1 # 400920 - 4005a2: 00 - 4005a3: f2 0f 10 15 6d 03 00 movsd 0x36d(%rip),%xmm2 # 400918 - 4005aa: 00 - 4005ab: f2 0f 59 d0 mulsd %xmm0,%xmm2 - 4005af: f2 0f 10 45 f0 movsd -0x10(%rbp),%xmm0 - 4005b4: f2 0f 5c c2 subsd %xmm2,%xmm0 - 4005b8: 8b 7d fc mov -0x4(%rbp),%edi - 4005bb: f2 0f 2a d7 cvtsi2sd %edi,%xmm2 - 4005bf: f2 0f 11 45 e8 movsd %xmm0,-0x18(%rbp) - 4005c4: 0f 28 c2 movaps %xmm2,%xmm0 - 4005c7: e8 74 fe ff ff callq 400440 - 4005cc: f2 0f 10 0d 44 03 00 movsd 0x344(%rip),%xmm1 # 400918 - 4005d3: 00 - 4005d4: f2 0f 10 55 e8 movsd -0x18(%rbp),%xmm2 - 4005d9: f2 0f 58 d0 addsd %xmm0,%xmm2 - 4005dd: f2 0f 58 d1 addsd %xmm1,%xmm2 - 4005e1: f2 0f 2c c2 cvttsd2si %xmm2,%eax - 4005e5: 48 83 c4 20 add $0x20,%rsp - 4005e9: 5d pop %rbp - 4005ea: c3 retq - 4005eb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) - 4005f0: 55 push %rbp - 4005f1: 48 89 e5 mov %rsp,%rbp - 4005f4: 48 83 ec 10 sub $0x10,%rsp - 4005f8: 89 7d fc mov %edi,-0x4(%rbp) - 4005fb: 83 7d fc 00 cmpl $0x0,-0x4(%rbp) - 4005ff: 0f 8c 2b 00 00 00 jl 400630 - 400605: 8b 7d fc mov -0x4(%rbp),%edi - 400608: e8 53 ff ff ff callq 400560 - 40060d: 48 bf 38 09 40 00 00 movabs $0x400938,%rdi - 400614: 00 00 00 - 400617: 89 c6 mov %eax,%esi - 400619: b0 00 mov $0x0,%al - 40061b: e8 10 fe ff ff callq 400430 - 400620: 8b 75 fc mov -0x4(%rbp),%esi - 400623: 83 ee 01 sub $0x1,%esi - 400626: 89 f7 mov %esi,%edi - 400628: 89 45 f8 mov %eax,-0x8(%rbp) - 40062b: e8 c0 ff ff ff callq 4005f0 - 400630: 48 83 c4 10 add $0x10,%rsp - 400634: 5d pop %rbp - 400635: c3 retq - 400636: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) - 40063d: 00 00 00 - 400640: 55 push %rbp - 400641: 48 89 e5 mov %rsp,%rbp - 400644: 48 83 ec 10 sub $0x10,%rsp - 400648: 89 7d fc mov %edi,-0x4(%rbp) - 40064b: 83 7d fc 00 cmpl $0x0,-0x4(%rbp) - 40064f: 0f 8c 2b 00 00 00 jl 400680 - 400655: 8b 45 fc mov -0x4(%rbp),%eax - 400658: 83 e8 01 sub $0x1,%eax - 40065b: 89 c7 mov %eax,%edi - 40065d: e8 8e ff ff ff callq 4005f0 - 400662: 8b 7d fc mov -0x4(%rbp),%edi - 400665: e8 f6 fe ff ff callq 400560 - 40066a: 48 bf 38 09 40 00 00 movabs $0x400938,%rdi - 400671: 00 00 00 - 400674: 89 c6 mov %eax,%esi - 400676: b0 00 mov $0x0,%al - 400678: e8 b3 fd ff ff callq 400430 - 40067d: 89 45 f8 mov %eax,-0x8(%rbp) - 400680: 48 83 c4 10 add $0x10,%rsp - 400684: 5d pop %rbp - 400685: c3 retq - 400686: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) - 40068d: 00 00 00 - 400690: 55 push %rbp - 400691: 48 89 e5 mov %rsp,%rbp - 400694: 89 7d fc mov %edi,-0x4(%rbp) - 400697: 89 75 f8 mov %esi,-0x8(%rbp) - 40069a: c7 45 f4 c3 01 00 00 movl $0x1c3,-0xc(%rbp) - 4006a1: 8b 75 fc mov -0x4(%rbp),%esi - 4006a4: 03 75 f8 add -0x8(%rbp),%esi - 4006a7: 89 75 f4 mov %esi,-0xc(%rbp) - 4006aa: 8b 45 f4 mov -0xc(%rbp),%eax - 4006ad: 5d pop %rbp - 4006ae: c3 retq - 4006af: 90 nop - 4006b0: 55 push %rbp - 4006b1: 48 89 e5 mov %rsp,%rbp - 4006b4: 48 83 ec 50 sub $0x50,%rsp - 4006b8: 48 b8 3c 09 40 00 00 movabs $0x40093c,%rax - 4006bf: 00 00 00 - 4006c2: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp) - 4006c9: 89 7d f8 mov %edi,-0x8(%rbp) - 4006cc: 48 89 75 f0 mov %rsi,-0x10(%rbp) - 4006d0: c7 45 ec 67 12 00 00 movl $0x1267,-0x14(%rbp) - 4006d7: 8b 34 25 38 10 60 00 mov 0x601038,%esi - 4006de: 8b 55 ec mov -0x14(%rbp),%edx - 4006e1: 48 89 c7 mov %rax,%rdi - 4006e4: b0 00 mov $0x0,%al - 4006e6: e8 45 fd ff ff callq 400430 - 4006eb: bf 02 00 00 00 mov $0x2,%edi - 4006f0: 89 45 d4 mov %eax,-0x2c(%rbp) - 4006f3: e8 38 fe ff ff callq 400530 - 4006f8: 48 bf 5e 09 40 00 00 movabs $0x40095e,%rdi - 4006ff: 00 00 00 - 400702: 89 c6 mov %eax,%esi - 400704: b0 00 mov $0x0,%al - 400706: e8 25 fd ff ff callq 400430 - 40070b: bf 02 00 00 00 mov $0x2,%edi - 400710: 89 45 d0 mov %eax,-0x30(%rbp) - 400713: e8 48 fe ff ff callq 400560 - 400718: 48 bf 6e 09 40 00 00 movabs $0x40096e,%rdi - 40071f: 00 00 00 - 400722: 89 c6 mov %eax,%esi - 400724: b0 00 mov $0x0,%al - 400726: e8 05 fd ff ff callq 400430 - 40072b: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%rbp) - 400732: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%rbp) - 400739: 89 45 cc mov %eax,-0x34(%rbp) - 40073c: 83 7d e4 05 cmpl $0x5,-0x1c(%rbp) - 400740: 0f 8f 1c 00 00 00 jg 400762 - 400746: 8b 7d e4 mov -0x1c(%rbp),%edi - 400749: e8 e2 fd ff ff callq 400530 - 40074e: 03 45 e8 add -0x18(%rbp),%eax - 400751: 89 45 e8 mov %eax,-0x18(%rbp) - 400754: 8b 45 e4 mov -0x1c(%rbp),%eax - 400757: 83 c0 01 add $0x1,%eax - 40075a: 89 45 e4 mov %eax,-0x1c(%rbp) - 40075d: e9 da ff ff ff jmpq 40073c - 400762: 48 bf 7e 09 40 00 00 movabs $0x40097e,%rdi - 400769: 00 00 00 - 40076c: 8b 75 e8 mov -0x18(%rbp),%esi - 40076f: b0 00 mov $0x0,%al - 400771: e8 ba fc ff ff callq 400430 - 400776: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%rbp) - 40077d: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%rbp) - 400784: 89 45 c8 mov %eax,-0x38(%rbp) - 400787: 83 7d e0 05 cmpl $0x5,-0x20(%rbp) - 40078b: 0f 8f 1c 00 00 00 jg 4007ad - 400791: 8b 7d e0 mov -0x20(%rbp),%edi - 400794: e8 97 fd ff ff callq 400530 - 400799: 03 45 e8 add -0x18(%rbp),%eax - 40079c: 89 45 e8 mov %eax,-0x18(%rbp) - 40079f: 8b 45 e0 mov -0x20(%rbp),%eax - 4007a2: 83 c0 01 add $0x1,%eax - 4007a5: 89 45 e0 mov %eax,-0x20(%rbp) - 4007a8: e9 da ff ff ff jmpq 400787 - 4007ad: 48 bf 87 09 40 00 00 movabs $0x400987,%rdi - 4007b4: 00 00 00 - 4007b7: 8b 75 e8 mov -0x18(%rbp),%esi - 4007ba: b0 00 mov $0x0,%al - 4007bc: e8 6f fc ff ff callq 400430 - 4007c1: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%rbp) - 4007c8: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%rbp) - 4007cf: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%rbp) - 4007d6: 89 45 c4 mov %eax,-0x3c(%rbp) - 4007d9: 83 7d d8 14 cmpl $0x14,-0x28(%rbp) - 4007dd: 0f 8f 2d 00 00 00 jg 400810 - 4007e3: 8b 7d d8 mov -0x28(%rbp),%edi - 4007e6: e8 45 fd ff ff callq 400530 - 4007eb: 83 f8 00 cmp $0x0,%eax - 4007ee: 0f 85 09 00 00 00 jne 4007fd - 4007f4: 8b 45 dc mov -0x24(%rbp),%eax - 4007f7: 83 c0 01 add $0x1,%eax - 4007fa: 89 45 dc mov %eax,-0x24(%rbp) - 4007fd: e9 00 00 00 00 jmpq 400802 - 400802: 8b 45 d8 mov -0x28(%rbp),%eax - 400805: 83 c0 01 add $0x1,%eax - 400808: 89 45 d8 mov %eax,-0x28(%rbp) - 40080b: e9 c9 ff ff ff jmpq 4007d9 - 400810: 48 bf 92 09 40 00 00 movabs $0x400992,%rdi - 400817: 00 00 00 - 40081a: 8b 75 dc mov -0x24(%rbp),%esi - 40081d: b0 00 mov $0x0,%al - 40081f: e8 0c fc ff ff callq 400430 - 400824: bf 14 00 00 00 mov $0x14,%edi - 400829: 89 45 c0 mov %eax,-0x40(%rbp) - 40082c: e8 bf fd ff ff callq 4005f0 - 400831: 48 bf 6c 09 40 00 00 movabs $0x40096c,%rdi - 400838: 00 00 00 - 40083b: 89 45 bc mov %eax,-0x44(%rbp) - 40083e: b0 00 mov $0x0,%al - 400840: e8 eb fb ff ff callq 400430 - 400845: bf 14 00 00 00 mov $0x14,%edi - 40084a: 89 45 b8 mov %eax,-0x48(%rbp) - 40084d: e8 ee fd ff ff callq 400640 - 400852: 48 bf 6c 09 40 00 00 movabs $0x40096c,%rdi - 400859: 00 00 00 - 40085c: 89 45 b4 mov %eax,-0x4c(%rbp) - 40085f: b0 00 mov $0x0,%al - 400861: e8 ca fb ff ff callq 400430 - 400866: 8b 3c 25 38 10 60 00 mov 0x601038,%edi - 40086d: 8b 75 ec mov -0x14(%rbp),%esi - 400870: 89 45 b0 mov %eax,-0x50(%rbp) - 400873: e8 18 fe ff ff callq 400690 - 400878: 89 45 ec mov %eax,-0x14(%rbp) - 40087b: 8b 45 ec mov -0x14(%rbp),%eax - 40087e: 48 83 c4 50 add $0x50,%rsp - 400882: 5d pop %rbp - 400883: c3 retq - 400884: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) - 40088b: 00 00 00 - 40088e: 66 90 xchg %ax,%ax - 400890: 41 57 push %r15 - 400892: 41 56 push %r14 - 400894: 41 89 ff mov %edi,%r15d - 400897: 41 55 push %r13 - 400899: 41 54 push %r12 - 40089b: 4c 8d 25 5e 05 20 00 lea 0x20055e(%rip),%r12 # 600e00 - 4008a2: 55 push %rbp - 4008a3: 48 8d 2d 5e 05 20 00 lea 0x20055e(%rip),%rbp # 600e08 - 4008aa: 53 push %rbx - 4008ab: 49 89 f6 mov %rsi,%r14 - 4008ae: 49 89 d5 mov %rdx,%r13 - 4008b1: 4c 29 e5 sub %r12,%rbp - 4008b4: 48 83 ec 08 sub $0x8,%rsp - 4008b8: 48 c1 fd 03 sar $0x3,%rbp - 4008bc: e8 47 fb ff ff callq 400408 - 4008c1: 48 85 ed test %rbp,%rbp - 4008c4: 74 20 je 4008e6 - 4008c6: 31 db xor %ebx,%ebx - 4008c8: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) - 4008cf: 00 - 4008d0: 4c 89 ea mov %r13,%rdx - 4008d3: 4c 89 f6 mov %r14,%rsi - 4008d6: 44 89 ff mov %r15d,%edi - 4008d9: 41 ff 14 dc callq *(%r12,%rbx,8) - 4008dd: 48 83 c3 01 add $0x1,%rbx - 4008e1: 48 39 dd cmp %rbx,%rbp - 4008e4: 75 ea jne 4008d0 - 4008e6: 48 83 c4 08 add $0x8,%rsp - 4008ea: 5b pop %rbx - 4008eb: 5d pop %rbp - 4008ec: 41 5c pop %r12 - 4008ee: 41 5d pop %r13 - 4008f0: 41 5e pop %r14 - 4008f2: 41 5f pop %r15 - 4008f4: c3 retq - 4008f5: 90 nop - 4008f6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) - 4008fd: 00 00 00 - 400900: f3 c3 repz retq - -Disassembly of section .fini: - -0000000000400904 <.fini>: - 400904: 48 83 ec 08 sub $0x8,%rsp - 400908: 48 83 c4 08 add $0x8,%rsp - 40090c: c3 retq diff --git a/01_ENV/objdump-S_d.out.txt b/01_ENV/objdump-S_d.out.txt deleted file mode 100644 index 405449d..0000000 --- a/01_ENV/objdump-S_d.out.txt +++ /dev/null @@ -1,378 +0,0 @@ - -a.out: Dateiformat elf64-x86-64 - - -Disassembly of section .init: - -0000000000400408 <.init>: - 400408: 48 83 ec 08 sub $0x8,%rsp - 40040c: 48 8b 05 e5 0b 20 00 mov 0x200be5(%rip),%rax # 600ff8 - 400413: 48 85 c0 test %rax,%rax - 400416: 74 02 je 40041a - 400418: ff d0 callq *%rax - 40041a: 48 83 c4 08 add $0x8,%rsp - 40041e: c3 retq - -Disassembly of section .plt: - -0000000000400420 : - 400420: ff 35 e2 0b 20 00 pushq 0x200be2(%rip) # 601008 - 400426: ff 25 e4 0b 20 00 jmpq *0x200be4(%rip) # 601010 - 40042c: 0f 1f 40 00 nopl 0x0(%rax) - -0000000000400430 : - 400430: ff 25 e2 0b 20 00 jmpq *0x200be2(%rip) # 601018 - 400436: 68 00 00 00 00 pushq $0x0 - 40043b: e9 e0 ff ff ff jmpq 400420 - -0000000000400440 : - 400440: ff 25 da 0b 20 00 jmpq *0x200bda(%rip) # 601020 - 400446: 68 01 00 00 00 pushq $0x1 - 40044b: e9 d0 ff ff ff jmpq 400420 - -Disassembly of section .text: - -0000000000400450 <.text>: - 400450: 31 ed xor %ebp,%ebp - 400452: 49 89 d1 mov %rdx,%r9 - 400455: 5e pop %rsi - 400456: 48 89 e2 mov %rsp,%rdx - 400459: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp - 40045d: 50 push %rax - 40045e: 54 push %rsp - 40045f: 49 c7 c0 00 09 40 00 mov $0x400900,%r8 - 400466: 48 c7 c1 90 08 40 00 mov $0x400890,%rcx - 40046d: 48 c7 c7 b0 06 40 00 mov $0x4006b0,%rdi - 400474: ff 15 76 0b 20 00 callq *0x200b76(%rip) # 600ff0 - 40047a: f4 hlt - 40047b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) - 400480: 55 push %rbp - 400481: b8 40 10 60 00 mov $0x601040,%eax - 400486: 48 3d 40 10 60 00 cmp $0x601040,%rax - 40048c: 48 89 e5 mov %rsp,%rbp - 40048f: 74 17 je 4004a8 - 400491: b8 00 00 00 00 mov $0x0,%eax - 400496: 48 85 c0 test %rax,%rax - 400499: 74 0d je 4004a8 - 40049b: 5d pop %rbp - 40049c: bf 40 10 60 00 mov $0x601040,%edi - 4004a1: ff e0 jmpq *%rax - 4004a3: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) - 4004a8: 5d pop %rbp - 4004a9: c3 retq - 4004aa: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) - 4004b0: be 40 10 60 00 mov $0x601040,%esi - 4004b5: 55 push %rbp - 4004b6: 48 81 ee 40 10 60 00 sub $0x601040,%rsi - 4004bd: 48 89 e5 mov %rsp,%rbp - 4004c0: 48 c1 fe 03 sar $0x3,%rsi - 4004c4: 48 89 f0 mov %rsi,%rax - 4004c7: 48 c1 e8 3f shr $0x3f,%rax - 4004cb: 48 01 c6 add %rax,%rsi - 4004ce: 48 d1 fe sar %rsi - 4004d1: 74 15 je 4004e8 - 4004d3: b8 00 00 00 00 mov $0x0,%eax - 4004d8: 48 85 c0 test %rax,%rax - 4004db: 74 0b je 4004e8 - 4004dd: 5d pop %rbp - 4004de: bf 40 10 60 00 mov $0x601040,%edi - 4004e3: ff e0 jmpq *%rax - 4004e5: 0f 1f 00 nopl (%rax) - 4004e8: 5d pop %rbp - 4004e9: c3 retq - 4004ea: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) - 4004f0: 80 3d 45 0b 20 00 00 cmpb $0x0,0x200b45(%rip) # 60103c - 4004f7: 75 17 jne 400510 - 4004f9: 55 push %rbp - 4004fa: 48 89 e5 mov %rsp,%rbp - 4004fd: e8 7e ff ff ff callq 400480 - 400502: c6 05 33 0b 20 00 01 movb $0x1,0x200b33(%rip) # 60103c - 400509: 5d pop %rbp - 40050a: c3 retq - 40050b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) - 400510: f3 c3 repz retq - 400512: 0f 1f 40 00 nopl 0x0(%rax) - 400516: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) - 40051d: 00 00 00 - 400520: 55 push %rbp - 400521: 48 89 e5 mov %rsp,%rbp - 400524: 5d pop %rbp - 400525: eb 89 jmp 4004b0 - 400527: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) - 40052e: 00 00 - 400530: 55 push %rbp - 400531: 48 89 e5 mov %rsp,%rbp - 400534: 89 7d fc mov %edi,-0x4(%rbp) - 400537: 8b 7d fc mov -0x4(%rbp),%edi - 40053a: 83 ef 02 sub $0x2,%edi - 40053d: 8b 45 fc mov -0x4(%rbp),%eax - 400540: 83 e8 04 sub $0x4,%eax - 400543: 0f af f8 imul %eax,%edi - 400546: 8b 45 fc mov -0x4(%rbp),%eax - 400549: 83 e8 0b sub $0xb,%eax - 40054c: 0f af f8 imul %eax,%edi - 40054f: 8b 45 fc mov -0x4(%rbp),%eax - 400552: 83 e8 12 sub $0x12,%eax - 400555: 0f af f8 imul %eax,%edi - 400558: 89 f8 mov %edi,%eax - 40055a: 5d pop %rbp - 40055b: c3 retq - 40055c: 0f 1f 40 00 nopl 0x0(%rax) - 400560: 55 push %rbp - 400561: 48 89 e5 mov %rsp,%rbp - 400564: 48 83 ec 20 sub $0x20,%rsp - 400568: f2 0f 10 0d c0 03 00 movsd 0x3c0(%rip),%xmm1 # 400930 - 40056f: 00 - 400570: 89 7d fc mov %edi,-0x4(%rbp) - 400573: 8b 7d fc mov -0x4(%rbp),%edi - 400576: f2 0f 2a c7 cvtsi2sd %edi,%xmm0 - 40057a: e8 c1 fe ff ff callq 400440 - 40057f: f2 0f 10 0d a1 03 00 movsd 0x3a1(%rip),%xmm1 # 400928 - 400586: 00 - 400587: 8b 7d fc mov -0x4(%rbp),%edi - 40058a: f2 0f 2a d7 cvtsi2sd %edi,%xmm2 - 40058e: f2 0f 11 45 f0 movsd %xmm0,-0x10(%rbp) - 400593: 0f 28 c2 movaps %xmm2,%xmm0 - 400596: e8 a5 fe ff ff callq 400440 - 40059b: f2 0f 10 0d 7d 03 00 movsd 0x37d(%rip),%xmm1 # 400920 - 4005a2: 00 - 4005a3: f2 0f 10 15 6d 03 00 movsd 0x36d(%rip),%xmm2 # 400918 - 4005aa: 00 - 4005ab: f2 0f 59 d0 mulsd %xmm0,%xmm2 - 4005af: f2 0f 10 45 f0 movsd -0x10(%rbp),%xmm0 - 4005b4: f2 0f 5c c2 subsd %xmm2,%xmm0 - 4005b8: 8b 7d fc mov -0x4(%rbp),%edi - 4005bb: f2 0f 2a d7 cvtsi2sd %edi,%xmm2 - 4005bf: f2 0f 11 45 e8 movsd %xmm0,-0x18(%rbp) - 4005c4: 0f 28 c2 movaps %xmm2,%xmm0 - 4005c7: e8 74 fe ff ff callq 400440 - 4005cc: f2 0f 10 0d 44 03 00 movsd 0x344(%rip),%xmm1 # 400918 - 4005d3: 00 - 4005d4: f2 0f 10 55 e8 movsd -0x18(%rbp),%xmm2 - 4005d9: f2 0f 58 d0 addsd %xmm0,%xmm2 - 4005dd: f2 0f 58 d1 addsd %xmm1,%xmm2 - 4005e1: f2 0f 2c c2 cvttsd2si %xmm2,%eax - 4005e5: 48 83 c4 20 add $0x20,%rsp - 4005e9: 5d pop %rbp - 4005ea: c3 retq - 4005eb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) - 4005f0: 55 push %rbp - 4005f1: 48 89 e5 mov %rsp,%rbp - 4005f4: 48 83 ec 10 sub $0x10,%rsp - 4005f8: 89 7d fc mov %edi,-0x4(%rbp) - 4005fb: 83 7d fc 00 cmpl $0x0,-0x4(%rbp) - 4005ff: 0f 8c 2b 00 00 00 jl 400630 - 400605: 8b 7d fc mov -0x4(%rbp),%edi - 400608: e8 53 ff ff ff callq 400560 - 40060d: 48 bf 38 09 40 00 00 movabs $0x400938,%rdi - 400614: 00 00 00 - 400617: 89 c6 mov %eax,%esi - 400619: b0 00 mov $0x0,%al - 40061b: e8 10 fe ff ff callq 400430 - 400620: 8b 75 fc mov -0x4(%rbp),%esi - 400623: 83 ee 01 sub $0x1,%esi - 400626: 89 f7 mov %esi,%edi - 400628: 89 45 f8 mov %eax,-0x8(%rbp) - 40062b: e8 c0 ff ff ff callq 4005f0 - 400630: 48 83 c4 10 add $0x10,%rsp - 400634: 5d pop %rbp - 400635: c3 retq - 400636: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) - 40063d: 00 00 00 - 400640: 55 push %rbp - 400641: 48 89 e5 mov %rsp,%rbp - 400644: 48 83 ec 10 sub $0x10,%rsp - 400648: 89 7d fc mov %edi,-0x4(%rbp) - 40064b: 83 7d fc 00 cmpl $0x0,-0x4(%rbp) - 40064f: 0f 8c 2b 00 00 00 jl 400680 - 400655: 8b 45 fc mov -0x4(%rbp),%eax - 400658: 83 e8 01 sub $0x1,%eax - 40065b: 89 c7 mov %eax,%edi - 40065d: e8 8e ff ff ff callq 4005f0 - 400662: 8b 7d fc mov -0x4(%rbp),%edi - 400665: e8 f6 fe ff ff callq 400560 - 40066a: 48 bf 38 09 40 00 00 movabs $0x400938,%rdi - 400671: 00 00 00 - 400674: 89 c6 mov %eax,%esi - 400676: b0 00 mov $0x0,%al - 400678: e8 b3 fd ff ff callq 400430 - 40067d: 89 45 f8 mov %eax,-0x8(%rbp) - 400680: 48 83 c4 10 add $0x10,%rsp - 400684: 5d pop %rbp - 400685: c3 retq - 400686: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) - 40068d: 00 00 00 - 400690: 55 push %rbp - 400691: 48 89 e5 mov %rsp,%rbp - 400694: 89 7d fc mov %edi,-0x4(%rbp) - 400697: 89 75 f8 mov %esi,-0x8(%rbp) - 40069a: c7 45 f4 c3 01 00 00 movl $0x1c3,-0xc(%rbp) - 4006a1: 8b 75 fc mov -0x4(%rbp),%esi - 4006a4: 03 75 f8 add -0x8(%rbp),%esi - 4006a7: 89 75 f4 mov %esi,-0xc(%rbp) - 4006aa: 8b 45 f4 mov -0xc(%rbp),%eax - 4006ad: 5d pop %rbp - 4006ae: c3 retq - 4006af: 90 nop - 4006b0: 55 push %rbp - 4006b1: 48 89 e5 mov %rsp,%rbp - 4006b4: 48 83 ec 60 sub $0x60,%rsp - 4006b8: 48 b8 3c 09 40 00 00 movabs $0x40093c,%rax - 4006bf: 00 00 00 - 4006c2: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp) - 4006c9: 89 7d f8 mov %edi,-0x8(%rbp) - 4006cc: 48 89 75 f0 mov %rsi,-0x10(%rbp) - 4006d0: c7 45 ec 67 12 00 00 movl $0x1267,-0x14(%rbp) - 4006d7: 8b 34 25 38 10 60 00 mov 0x601038,%esi - 4006de: 8b 55 ec mov -0x14(%rbp),%edx - 4006e1: 48 89 c7 mov %rax,%rdi - 4006e4: b0 00 mov $0x0,%al - 4006e6: e8 45 fd ff ff callq 400430 - 4006eb: bf 02 00 00 00 mov $0x2,%edi - 4006f0: 89 45 d0 mov %eax,-0x30(%rbp) - 4006f3: e8 38 fe ff ff callq 400530 - 4006f8: 48 bf 5e 09 40 00 00 movabs $0x40095e,%rdi - 4006ff: 00 00 00 - 400702: 89 c6 mov %eax,%esi - 400704: b0 00 mov $0x0,%al - 400706: e8 25 fd ff ff callq 400430 - 40070b: bf 02 00 00 00 mov $0x2,%edi - 400710: 89 45 cc mov %eax,-0x34(%rbp) - 400713: e8 48 fe ff ff callq 400560 - 400718: 48 bf 6e 09 40 00 00 movabs $0x40096e,%rdi - 40071f: 00 00 00 - 400722: 89 c6 mov %eax,%esi - 400724: b0 00 mov $0x0,%al - 400726: e8 05 fd ff ff callq 400430 - 40072b: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%rbp) - 400732: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%rbp) - 400739: 89 45 c8 mov %eax,-0x38(%rbp) - 40073c: 83 7d e4 05 cmpl $0x5,-0x1c(%rbp) - 400740: 0f 8f 1c 00 00 00 jg 400762 - 400746: 8b 7d e4 mov -0x1c(%rbp),%edi - 400749: e8 e2 fd ff ff callq 400530 - 40074e: 03 45 e8 add -0x18(%rbp),%eax - 400751: 89 45 e8 mov %eax,-0x18(%rbp) - 400754: 8b 45 e4 mov -0x1c(%rbp),%eax - 400757: 83 c0 01 add $0x1,%eax - 40075a: 89 45 e4 mov %eax,-0x1c(%rbp) - 40075d: e9 da ff ff ff jmpq 40073c - 400762: 48 bf 7e 09 40 00 00 movabs $0x40097e,%rdi - 400769: 00 00 00 - 40076c: 8b 75 e8 mov -0x18(%rbp),%esi - 40076f: b0 00 mov $0x0,%al - 400771: e8 ba fc ff ff callq 400430 - 400776: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%rbp) - 40077d: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%rbp) - 400784: 89 45 c4 mov %eax,-0x3c(%rbp) - 400787: 83 7d e0 05 cmpl $0x5,-0x20(%rbp) - 40078b: 0f 8f 1c 00 00 00 jg 4007ad - 400791: 8b 7d e0 mov -0x20(%rbp),%edi - 400794: e8 97 fd ff ff callq 400530 - 400799: 03 45 e8 add -0x18(%rbp),%eax - 40079c: 89 45 e8 mov %eax,-0x18(%rbp) - 40079f: 8b 45 e0 mov -0x20(%rbp),%eax - 4007a2: 83 c0 01 add $0x1,%eax - 4007a5: 89 45 e0 mov %eax,-0x20(%rbp) - 4007a8: e9 da ff ff ff jmpq 400787 - 4007ad: 48 bf 87 09 40 00 00 movabs $0x400987,%rdi - 4007b4: 00 00 00 - 4007b7: 8b 75 e8 mov -0x18(%rbp),%esi - 4007ba: b0 00 mov $0x0,%al - 4007bc: e8 6f fc ff ff callq 400430 - 4007c1: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%rbp) - 4007c8: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%rbp) - 4007cf: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%rbp) - 4007d6: 89 45 c0 mov %eax,-0x40(%rbp) - 4007d9: 83 7d d8 14 cmpl $0x14,-0x28(%rbp) - 4007dd: 0f 8f 2d 00 00 00 jg 400810 - 4007e3: 8b 7d d8 mov -0x28(%rbp),%edi - 4007e6: e8 45 fd ff ff callq 400530 - 4007eb: 83 f8 00 cmp $0x0,%eax - 4007ee: 0f 85 09 00 00 00 jne 4007fd - 4007f4: 8b 45 dc mov -0x24(%rbp),%eax - 4007f7: 83 c0 01 add $0x1,%eax - 4007fa: 89 45 dc mov %eax,-0x24(%rbp) - 4007fd: e9 00 00 00 00 jmpq 400802 - 400802: 8b 45 d8 mov -0x28(%rbp),%eax - 400805: 83 c0 01 add $0x1,%eax - 400808: 89 45 d8 mov %eax,-0x28(%rbp) - 40080b: e9 c9 ff ff ff jmpq 4007d9 - 400810: 48 bf 92 09 40 00 00 movabs $0x400992,%rdi - 400817: 00 00 00 - 40081a: 8b 75 dc mov -0x24(%rbp),%esi - 40081d: b0 00 mov $0x0,%al - 40081f: e8 0c fc ff ff callq 400430 - 400824: bf 14 00 00 00 mov $0x14,%edi - 400829: c7 45 d4 05 00 00 00 movl $0x5,-0x2c(%rbp) - 400830: 89 45 bc mov %eax,-0x44(%rbp) - 400833: e8 b8 fd ff ff callq 4005f0 - 400838: 48 bf 6c 09 40 00 00 movabs $0x40096c,%rdi - 40083f: 00 00 00 - 400842: 89 45 b8 mov %eax,-0x48(%rbp) - 400845: b0 00 mov $0x0,%al - 400847: e8 e4 fb ff ff callq 400430 - 40084c: bf 14 00 00 00 mov $0x14,%edi - 400851: 89 45 b4 mov %eax,-0x4c(%rbp) - 400854: e8 e7 fd ff ff callq 400640 - 400859: 48 bf 6c 09 40 00 00 movabs $0x40096c,%rdi - 400860: 00 00 00 - 400863: 89 45 b0 mov %eax,-0x50(%rbp) - 400866: b0 00 mov $0x0,%al - 400868: e8 c3 fb ff ff callq 400430 - 40086d: 8b 3c 25 38 10 60 00 mov 0x601038,%edi - 400874: 8b 75 ec mov -0x14(%rbp),%esi - 400877: 89 45 ac mov %eax,-0x54(%rbp) - 40087a: e8 11 fe ff ff callq 400690 - 40087f: 89 45 ec mov %eax,-0x14(%rbp) - 400882: 8b 45 ec mov -0x14(%rbp),%eax - 400885: 48 83 c4 60 add $0x60,%rsp - 400889: 5d pop %rbp - 40088a: c3 retq - 40088b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) - 400890: 41 57 push %r15 - 400892: 41 56 push %r14 - 400894: 41 89 ff mov %edi,%r15d - 400897: 41 55 push %r13 - 400899: 41 54 push %r12 - 40089b: 4c 8d 25 5e 05 20 00 lea 0x20055e(%rip),%r12 # 600e00 - 4008a2: 55 push %rbp - 4008a3: 48 8d 2d 5e 05 20 00 lea 0x20055e(%rip),%rbp # 600e08 - 4008aa: 53 push %rbx - 4008ab: 49 89 f6 mov %rsi,%r14 - 4008ae: 49 89 d5 mov %rdx,%r13 - 4008b1: 4c 29 e5 sub %r12,%rbp - 4008b4: 48 83 ec 08 sub $0x8,%rsp - 4008b8: 48 c1 fd 03 sar $0x3,%rbp - 4008bc: e8 47 fb ff ff callq 400408 - 4008c1: 48 85 ed test %rbp,%rbp - 4008c4: 74 20 je 4008e6 - 4008c6: 31 db xor %ebx,%ebx - 4008c8: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) - 4008cf: 00 - 4008d0: 4c 89 ea mov %r13,%rdx - 4008d3: 4c 89 f6 mov %r14,%rsi - 4008d6: 44 89 ff mov %r15d,%edi - 4008d9: 41 ff 14 dc callq *(%r12,%rbx,8) - 4008dd: 48 83 c3 01 add $0x1,%rbx - 4008e1: 48 39 dd cmp %rbx,%rbp - 4008e4: 75 ea jne 4008d0 - 4008e6: 48 83 c4 08 add $0x8,%rsp - 4008ea: 5b pop %rbx - 4008eb: 5d pop %rbp - 4008ec: 41 5c pop %r12 - 4008ee: 41 5d pop %r13 - 4008f0: 41 5e pop %r14 - 4008f2: 41 5f pop %r15 - 4008f4: c3 retq - 4008f5: 90 nop - 4008f6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) - 4008fd: 00 00 00 - 400900: f3 c3 repz retq - -Disassembly of section .fini: - -0000000000400904 <.fini>: - 400904: 48 83 ec 08 sub $0x8,%rsp - 400908: 48 83 c4 08 add $0x8,%rsp - 40090c: c3 retq diff --git a/02_MENT/Testat/a.out b/02_MENT/Testat/a.out deleted file mode 100755 index 6eb0bf4..0000000 Binary files a/02_MENT/Testat/a.out and /dev/null differ diff --git a/02_MENT/Testat2/a.out b/02_MENT/Testat2/a.out deleted file mode 100755 index 2060c68..0000000 Binary files a/02_MENT/Testat2/a.out and /dev/null differ diff --git a/02_MENT/a.out b/02_MENT/a.out deleted file mode 100755 index 0ba37c6..0000000 Binary files a/02_MENT/a.out and /dev/null differ diff --git a/02_MENT/limits.out b/02_MENT/limits.out deleted file mode 100755 index 9fabb90..0000000 Binary files a/02_MENT/limits.out and /dev/null differ diff --git a/02_MENT/main_02_MENT.cpp.save b/02_MENT/main_02_MENT.cpp.save deleted file mode 100644 index 3a1f59d..0000000 --- a/02_MENT/main_02_MENT.cpp.save +++ /dev/null @@ -1,164 +0,0 @@ -// file: main_02_MENT.cpp -// THIS IS C++, use clang++ - -#include - -#include "../helpers/println.hpp" - -struct PascalString{ - int length; // number of chars used - char characters[256]; // chars of some character string -}; - -char cStringArea[1024]; - -int hexDigitToInt(char hexDigit) { -int value = 0; - -if(hexDigit > 47 && hexDigit < 58) - value = hexDigit - 48; - -if(hexDigit > 96 && hexDigit < 103) - value = hexDigit - 97 + 10; - -return value; -} - -int hexStringToInt(PascalString binaryDigits) { - int returnValue = 0; - - for(int i = 0; i <= binaryDigits.length; ++i) { - returnValue += binaryDigits.characters[i]; - } - - return returnValue; -} - -void printPascalString(PascalString s) { - for(int i = 0; i <= s.length; i++) { - print(s.characters[i]); - } - println("" -); -} - -PascalString intToDual(int n) { - - int i = std::to_string(n).length() * 4; - PascalString string = {i}; - while(n >= 1) { - string.characters[i] = (n % 2) + '0'; - n = n / 2; - i--; - } - return string; -} - -char intToHexChar(int n) { - if(n > 9) { - switch(n) { - case 10: return 'A'; - case 11: return 'B'; - case 12: return 'C'; - case 13: return 'D'; - case 14: return 'E'; - case 15: return 'F'; - default: return 'X'; - } - } - else return n + '0'; -} - -PascalString intToHex(int n) { - int i = std::to_string(n).length(); - PascalString string = {i}; - while(n >= 1) { - string.characters[i] = intToHexChar(n % 16); - n = n / 16; - i--; - } - return string; - -} - -PascalString bitwiseDualAnd(PascalString a, PascalString b) { - PascalString shortString = a.length < b.length ? a : b; - PascalString longString = a.length > b.length ? a : b; - PascalString result = {longString.length, '0'}; - - for(int i = longString.length; i >= 0; --i) { - if(shortString.length < i) result.characters[i] = longString.characters[i]; - result.characters[i] = longString.characters[i] & shortString.characters[i]; - } - - return result; -} - -PascalString bitwiseHexAnd(PascalString a, PascalString b) { - PascalString shortString = a.length < b.length ? a : b; - PascalString longString = a.length > b.length ? a : b; - PascalString result = {longString.length, '0'}; - - for(int i = longString.length; i >= 0; --i) { - if(shortString.length < i) result.characters[i] = longString.characters[i]; - result.characters[i] = longString.characters[i] & shortString.characters[i]; - } - - return result; -} - -int to_c_string(PascalString s) { - -} - -void line() { -println("==================================="); -} - -int main(int argc, char** argv, char** envp) { - - PascalString s = {3, '1', '0', '0'}; - PascalString s2 = {4, 'f', 'f', 'f', 'f'}; - println(hexStringToInt(s)); - line(); - println(hexStringToInt(s2)); - line(); - println(hexDigitToInt('d')); - line(); - println(hexDigitToInt('9')); - line(); - println(hexDigitToInt('2')); - - printPascalString(s2); - line(); - - int controlRegister = 128; - controlRegister |= 64+32; - controlRegister ^=16; - controlRegister &= 128+64; - controlRegister <<= 1; - - println(controlRegister); - line(); - println(intToHexChar(6)); - line(); - println(intToHexChar(10)); - line(); - printPascalString(intToDual(4106)); - line(); - printPascalString(intToHex(965)); - line(); - printPascalString(intToHex(1956)); - - line(); - printPascalString(bitwiseDualAnd({3, '1', '1', '0'}, {4, '1', '1', '1', '0'})); - line(); - printPascalString(bitwiseDualAnd({3, '1', '1', '1'}, {4, '1', '1', '1', '0'})); - line(); - printPascalString(bitwiseDualAnd({3, '1', '1', '0'}, {4, '1', '1', '1', '1'})); - line(); - printPascalString(bitwiseDualAnd({3, '0', '1', '0'}, {4, '1', '0', '1', '1'})); - - return 0; -} - diff --git a/02_MENT/println.out b/02_MENT/println.out deleted file mode 100755 index 9a4b5b8..0000000 Binary files a/02_MENT/println.out and /dev/null differ diff --git a/02_MENT/typedMemory/typedMemory.xcodeproj/project.pbxproj b/02_MENT/typedMemory/typedMemory.xcodeproj/project.pbxproj deleted file mode 100644 index 814f6de..0000000 --- a/02_MENT/typedMemory/typedMemory.xcodeproj/project.pbxproj +++ /dev/null @@ -1,259 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 654370B41E9788E30085F153 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 654370B31E9788E30085F153 /* main.cpp */; }; - 654371471E9ED16D0085F153 /* typedMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 654371451E9ED16D0085F153 /* typedMemory.cpp */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 654370AE1E9788E30085F153 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 654370B01E9788E30085F153 /* typedMemory */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = typedMemory; sourceTree = BUILT_PRODUCTS_DIR; }; - 654370B31E9788E30085F153 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; }; - 654371451E9ED16D0085F153 /* typedMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = typedMemory.cpp; sourceTree = ""; }; - 654371461E9ED16D0085F153 /* typedMemory.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = typedMemory.hpp; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 654370AD1E9788E30085F153 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 654370A71E9788E30085F153 = { - isa = PBXGroup; - children = ( - 654370B21E9788E30085F153 /* typedMemory */, - 654370B11E9788E30085F153 /* Products */, - ); - sourceTree = ""; - }; - 654370B11E9788E30085F153 /* Products */ = { - isa = PBXGroup; - children = ( - 654370B01E9788E30085F153 /* typedMemory */, - ); - name = Products; - sourceTree = ""; - }; - 654370B21E9788E30085F153 /* typedMemory */ = { - isa = PBXGroup; - children = ( - 654370B31E9788E30085F153 /* main.cpp */, - 654371451E9ED16D0085F153 /* typedMemory.cpp */, - 654371461E9ED16D0085F153 /* typedMemory.hpp */, - ); - path = typedMemory; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 654370AF1E9788E30085F153 /* typedMemory */ = { - isa = PBXNativeTarget; - buildConfigurationList = 654370B71E9788E30085F153 /* Build configuration list for PBXNativeTarget "typedMemory" */; - buildPhases = ( - 654370AC1E9788E30085F153 /* Sources */, - 654370AD1E9788E30085F153 /* Frameworks */, - 654370AE1E9788E30085F153 /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = typedMemory; - productName = typedMemory; - productReference = 654370B01E9788E30085F153 /* typedMemory */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 654370A81E9788E30085F153 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0820; - ORGANIZATIONNAME = HSEL; - TargetAttributes = { - 654370AF1E9788E30085F153 = { - CreatedOnToolsVersion = 8.2.1; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 654370AB1E9788E30085F153 /* Build configuration list for PBXProject "typedMemory" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 654370A71E9788E30085F153; - productRefGroup = 654370B11E9788E30085F153 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 654370AF1E9788E30085F153 /* typedMemory */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 654370AC1E9788E30085F153 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 654370B41E9788E30085F153 /* main.cpp in Sources */, - 654371471E9ED16D0085F153 /* typedMemory.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 654370B51E9788E30085F153 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - 654370B61E9788E30085F153 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - }; - name = Release; - }; - 654370B81E9788E30085F153 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 654370B91E9788E30085F153 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 654370AB1E9788E30085F153 /* Build configuration list for PBXProject "typedMemory" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 654370B51E9788E30085F153 /* Debug */, - 654370B61E9788E30085F153 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 654370B71E9788E30085F153 /* Build configuration list for PBXNativeTarget "typedMemory" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 654370B81E9788E30085F153 /* Debug */, - 654370B91E9788E30085F153 /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; -/* End XCConfigurationList section */ - }; - rootObject = 654370A81E9788E30085F153 /* Project object */; -} diff --git a/02_MENT/typedMemory/typedMemory.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/02_MENT/typedMemory/typedMemory.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 536168f..0000000 --- a/02_MENT/typedMemory/typedMemory.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/02_MENT/typedMemory/typedMemory.xcodeproj/project.xcworkspace/xcuserdata/clink.xcuserdatad/UserInterfaceState.xcuserstate b/02_MENT/typedMemory/typedMemory.xcodeproj/project.xcworkspace/xcuserdata/clink.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 781d911..0000000 Binary files a/02_MENT/typedMemory/typedMemory.xcodeproj/project.xcworkspace/xcuserdata/clink.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/02_MENT/typedMemory/typedMemory.xcodeproj/xcuserdata/clink.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/02_MENT/typedMemory/typedMemory.xcodeproj/xcuserdata/clink.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist deleted file mode 100644 index fe2b454..0000000 --- a/02_MENT/typedMemory/typedMemory.xcodeproj/xcuserdata/clink.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/02_MENT/typedMemory/typedMemory.xcodeproj/xcuserdata/clink.xcuserdatad/xcschemes/typedMemory.xcscheme b/02_MENT/typedMemory/typedMemory.xcodeproj/xcuserdata/clink.xcuserdatad/xcschemes/typedMemory.xcscheme deleted file mode 100644 index 8ad5a88..0000000 --- a/02_MENT/typedMemory/typedMemory.xcodeproj/xcuserdata/clink.xcuserdatad/xcschemes/typedMemory.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/02_MENT/typedMemory/typedMemory.xcodeproj/xcuserdata/clink.xcuserdatad/xcschemes/xcschememanagement.plist b/02_MENT/typedMemory/typedMemory.xcodeproj/xcuserdata/clink.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 25d6d3f..0000000 --- a/02_MENT/typedMemory/typedMemory.xcodeproj/xcuserdata/clink.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - SchemeUserState - - typedMemory.xcscheme - - orderHint - 0 - - - SuppressBuildableAutocreation - - 654370AF1E9788E30085F153 - - primary - - - - - diff --git a/03_FLOW_a/Testat/flow.out b/03_FLOW_a/Testat/flow.out deleted file mode 100755 index 7759582..0000000 Binary files a/03_FLOW_a/Testat/flow.out and /dev/null differ diff --git a/03_FLOW_a/flow.out b/03_FLOW_a/flow.out deleted file mode 100755 index cb7fd54..0000000 Binary files a/03_FLOW_a/flow.out and /dev/null differ diff --git a/06_POLY/main_mp5_POLY.cpp b/06_POLY/main_mp5_POLY.cpp index 0fc6517..9be2177 100644 --- a/06_POLY/main_mp5_POLY.cpp +++ b/06_POLY/main_mp5_POLY.cpp @@ -117,7 +117,7 @@ void Derived_2::virtualMethod(void){ compile time vs. run time binding */ -void foobar(void){ +void foobar(){ std::cout << "6a) "; Derived_2* pR = new Derived_2(); @@ -136,7 +136,7 @@ void foobar(void){ pDerived_2->virtualMethod(); // 3) std::cout << "4) "; - pDerived_2->nonVirtualMethod(); // 4) + pDerived_2->nonVirtualMethod(); // 4) std::cout << "5) "; static_cast(pDerived_2)->nonVirtualMethod(); // 5) diff --git a/10_PITF/banking_base_rawptr.cpp b/10_PITF/banking_base_rawptr.cpp index 94adf9d..1497bb6 100644 --- a/10_PITF/banking_base_rawptr.cpp +++ b/10_PITF/banking_base_rawptr.cpp @@ -1,7 +1,7 @@ #include #include #include -#include "println.hpp" +#include "../helpers/println.hpp" struct StackObject { @@ -67,7 +67,7 @@ Wallet consumerWallet_A; Wallet consumerWallet_B; Cash * createCashFor(int i){ - return new Cash(static_cast(i)); + return new Cash(i); } void flushWallet(Wallet& toBeEmptied){ // should be in dtor of sorrounding class diff --git a/11_PUTT/Test.cpp b/11_PUTT/Test.cpp index d6cc256..b25351d 100644 --- a/11_PUTT/Test.cpp +++ b/11_PUTT/Test.cpp @@ -1,16 +1,36 @@ -// -// Created by JThei on 17.06.2018. -// - +#include +#include +#include +#include #include "Test.h" - - - int main() { Derived * derived = new Derived(); bar(derived); delete derived; + + std::vector v(100); + + for (int j = 0; j < 10; ++j) { + v[j*j] = j; + } + v.push_back(17); + printVector(v); + + std::sort(v.begin(), v.end()); + printVector(v); + + std::transform(v.begin(), v.end(), v.begin(), [] (int i) {return i * 10;}); + printVector(v); +} + +void printVector(std::vector vector) { + if(!vector.empty()) { + std::cout << "Neuer Vector" << std::endl; + for(int i = 0; i < vector.size(); i++) { + std::cout <<"i=" << i << "|" << vector[i] << std::endl; + } + } } \ No newline at end of file diff --git a/11_PUTT/Test.h b/11_PUTT/Test.h index 2ae9d51..5020256 100644 --- a/11_PUTT/Test.h +++ b/11_PUTT/Test.h @@ -21,5 +21,7 @@ void bar(Derived* derived) { } +void printVector(std::vector vector); + #endif //TEST_BUILD_TEST_H diff --git a/CMakeLists.txt b/CMakeLists.txt index 902741b..e74b036 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,8 @@ project(test_build) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") +add_executable(MentalModel 02_MENT/main_02_MENT.cpp) + add_executable(UDEF_1 04_UDEF/main_04_UDEF_e.cpp) #add_executable(UDEF_2 04_UDEF/main_04_UDEF_a.cpp) add_executable(UDEF_Testat 04_UDEF/Testat/Testat.cpp) @@ -13,10 +15,14 @@ add_executable(OO_A 05_OO/main_mp4_OO_a_vehicles.cpp) #add_executable(OO_Shapes 05_OO/shapes_main.cpp) +add_executable(Poly 06_POLY/main_mp5_POLY.cpp) + add_executable(SequenceDiagram 11_PUTT/05_OO_b/SequenceDiagramCreator.cpp 11_PUTT/05_OO_b/main.cpp) add_executable(LCDDisplay 11_PUTT/02_Ment/LCDDisplay.cpp) add_executable(CopyOnWrite 11_PUTT/CopyOnWrite/OneByOneMatrix.cpp 11_PUTT/CopyOnWrite/LargeCowMatrix.cpp 11_PUTT/CopyOnWrite/main.cpp) -#add_executable(Test 11_PUTT/Test.cpp) \ No newline at end of file +add_executable(Banking 10_PITF/banking_base_rawptr.cpp) + +add_executable(Test 11_PUTT/Test.cpp) \ No newline at end of file