Skip to content

Instantly share code, notes, and snippets.

@duckinator
Created December 7, 2017 04:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duckinator/c265f75fea8baefc514c0b910edb8b8d to your computer and use it in GitHub Desktop.
Save duckinator/c265f75fea8baefc514c0b910edb8b8d to your computer and use it in GitHub Desktop.
src/kernel.exe: file format elf32-i386
Disassembly of section .text:
00100000 <kernel_code_start>:
100000: 02 b0 ad 1b 03 00 add 0x31bad(%eax),%dh
100006: 00 00 add %al,(%eax)
100008: fb sti
100009: 4f dec %edi
10000a: 52 push %edx
10000b: e4 .byte 0xe4
0010000c <_start>:
10000c: bc 00 60 10 00 mov $0x106000,%esp
100011: 53 push %ebx
100012: 50 push %eax
100013: e8 38 00 00 00 call 100050 <kernel_main>
100018: fa cli
100019: f4 hlt
10001a: 66 90 xchg %ax,%ax
10001c: 66 90 xchg %ax,%ax
10001e: 66 90 xchg %ax,%ax
00100020 <x>:
100020: 55 push %ebp
100021: 89 e5 mov %esp,%ebp
100023: 83 ec 10 sub $0x10,%esp
100026: 8b 45 0c mov 0xc(%ebp),%eax
100029: 8b 4d 08 mov 0x8(%ebp),%ecx
10002c: ba 01 00 00 00 mov $0x1,%edx
100031: 89 4d f8 mov %ecx,-0x8(%ebp)
100034: 89 45 fc mov %eax,-0x4(%ebp)
100037: 8b 45 f8 mov -0x8(%ebp),%eax
10003a: 8b 4d fc mov -0x4(%ebp),%ecx
10003d: 83 c0 01 add $0x1,%eax
100040: 83 d1 00 adc $0x0,%ecx
100043: 89 45 f0 mov %eax,-0x10(%ebp)
100046: 89 4d f4 mov %ecx,-0xc(%ebp)
100049: 89 d0 mov %edx,%eax
10004b: 83 c4 10 add $0x10,%esp
10004e: 5d pop %ebp
10004f: c3 ret
00100050 <kernel_main>:
100050: 55 push %ebp
100051: 89 e5 mov %esp,%ebp
100053: 53 push %ebx
100054: 83 ec 24 sub $0x24,%esp
100057: e8 00 00 00 00 call 10005c <kernel_main+0xc>
10005c: 58 pop %eax
10005d: 81 c0 b4 0f 00 00 add $0xfb4,%eax
100063: 8b 4d 0c mov 0xc(%ebp),%ecx
100066: 8b 55 08 mov 0x8(%ebp),%edx
100069: 89 55 f8 mov %edx,-0x8(%ebp)
10006c: 89 4d f4 mov %ecx,-0xc(%ebp)
10006f: 89 c3 mov %eax,%ebx
100071: 89 45 f0 mov %eax,-0x10(%ebp)
100074: e8 67 00 00 00 call 1000e0 <hal_init>
100079: 8b 45 f0 mov -0x10(%ebp),%eax
10007c: 8d 88 3f f9 ff ff lea -0x6c1(%eax),%ecx
100082: 89 0c 24 mov %ecx,(%esp)
100085: 89 c3 mov %eax,%ebx
100087: e8 c4 00 00 00 call 100150 <kprint>
10008c: 8b 45 f0 mov -0x10(%ebp),%eax
10008f: 8d 88 59 f9 ff ff lea -0x6a7(%eax),%ecx
100095: 89 0c 24 mov %ecx,(%esp)
100098: 89 c3 mov %eax,%ebx
10009a: e8 b1 00 00 00 call 100150 <kprint>
10009f: 89 e0 mov %esp,%eax
1000a1: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
1000a8: c7 00 01 00 00 00 movl $0x1,(%eax)
1000ae: 8b 5d f0 mov -0x10(%ebp),%ebx
1000b1: e8 6a ff ff ff call 100020 <x>
1000b6: 8b 4d f0 mov -0x10(%ebp),%ecx
1000b9: 8d 91 5f f9 ff ff lea -0x6a1(%ecx),%edx
1000bf: 89 14 24 mov %edx,(%esp)
1000c2: 89 cb mov %ecx,%ebx
1000c4: 89 45 ec mov %eax,-0x14(%ebp)
1000c7: e8 84 00 00 00 call 100150 <kprint>
1000cc: 8b 5d f0 mov -0x10(%ebp),%ebx
1000cf: e8 cc 00 00 00 call 1001a0 <hal_hard_shutdown>
1000d4: 83 c4 24 add $0x24,%esp
1000d7: 5b pop %ebx
1000d8: 5d pop %ebp
1000d9: c3 ret
1000da: 66 90 xchg %ax,%ax
1000dc: 66 90 xchg %ax,%ax
1000de: 66 90 xchg %ax,%ax
001000e0 <hal_init>:
1000e0: 55 push %ebp
1000e1: 89 e5 mov %esp,%ebp
1000e3: 53 push %ebx
1000e4: 50 push %eax
1000e5: e8 00 00 00 00 call 1000ea <hal_init+0xa>
1000ea: 58 pop %eax
1000eb: 81 c0 26 0f 00 00 add $0xf26,%eax
1000f1: 89 c3 mov %eax,%ebx
1000f3: 89 45 f8 mov %eax,-0x8(%ebp)
1000f6: e8 65 05 00 00 call 100660 <hal_basic_display_init>
1000fb: 8b 5d f8 mov -0x8(%ebp),%ebx
1000fe: e8 7d 05 00 00 call 100680 <hal_basic_uart_init>
100103: 83 c4 04 add $0x4,%esp
100106: 5b pop %ebx
100107: 5d pop %ebp
100108: c3 ret
100109: 0f 1f 80 00 00 00 00 nopl 0x0(%eax)
00100110 <hal_shutdown>:
100110: 55 push %ebp
100111: 89 e5 mov %esp,%ebp
100113: 53 push %ebx
100114: 83 ec 14 sub $0x14,%esp
100117: e8 00 00 00 00 call 10011c <hal_shutdown+0xc>
10011c: 58 pop %eax
10011d: 81 c0 f4 0e 00 00 add $0xef4,%eax
100123: 8d 88 a9 f9 ff ff lea -0x657(%eax),%ecx
100129: 89 0c 24 mov %ecx,(%esp)
10012c: 89 c3 mov %eax,%ebx
10012e: 89 45 f8 mov %eax,-0x8(%ebp)
100131: e8 1a 00 00 00 call 100150 <kprint>
100136: 8b 45 f8 mov -0x8(%ebp),%eax
100139: 8d 88 65 f9 ff ff lea -0x69b(%eax),%ecx
10013f: 89 0c 24 mov %ecx,(%esp)
100142: 89 c3 mov %eax,%ebx
100144: e8 07 00 00 00 call 100150 <kprint>
100149: 83 c4 14 add $0x14,%esp
10014c: 5b pop %ebx
10014d: 5d pop %ebp
10014e: c3 ret
10014f: 90 nop
00100150 <kprint>:
100150: 55 push %ebp
100151: 89 e5 mov %esp,%ebp
100153: 53 push %ebx
100154: 83 ec 14 sub $0x14,%esp
100157: e8 00 00 00 00 call 10015c <kprint+0xc>
10015c: 58 pop %eax
10015d: 81 c0 b4 0e 00 00 add $0xeb4,%eax
100163: 8b 4d 08 mov 0x8(%ebp),%ecx
100166: 89 4d f8 mov %ecx,-0x8(%ebp)
100169: 8b 4d f8 mov -0x8(%ebp),%ecx
10016c: 89 0c 24 mov %ecx,(%esp)
10016f: 89 c3 mov %eax,%ebx
100171: 89 45 f4 mov %eax,-0xc(%ebp)
100174: e8 47 02 00 00 call 1003c0 <hal_basic_display_print>
100179: 8b 45 f8 mov -0x8(%ebp),%eax
10017c: 89 04 24 mov %eax,(%esp)
10017f: 8b 5d f4 mov -0xc(%ebp),%ebx
100182: e8 09 07 00 00 call 100890 <hal_basic_uart_print>
100187: 83 c4 14 add $0x14,%esp
10018a: 5b pop %ebx
10018b: 5d pop %ebp
10018c: c3 ret
10018d: 0f 1f 00 nopl (%eax)
00100190 <hal_disable_interrupts>:
100190: 55 push %ebp
100191: 89 e5 mov %esp,%ebp
100193: fa cli
100194: 5d pop %ebp
100195: c3 ret
100196: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%eax,%eax,1)
10019d: 00 00 00
001001a0 <hal_hard_shutdown>:
1001a0: 55 push %ebp
1001a1: 89 e5 mov %esp,%ebp
1001a3: 53 push %ebx
1001a4: 83 ec 24 sub $0x24,%esp
1001a7: e8 00 00 00 00 call 1001ac <hal_hard_shutdown+0xc>
1001ac: 58 pop %eax
1001ad: 81 c0 64 0e 00 00 add $0xe64,%eax
1001b3: 8d 88 a9 f9 ff ff lea -0x657(%eax),%ecx
1001b9: 89 0c 24 mov %ecx,(%esp)
1001bc: 89 c3 mov %eax,%ebx
1001be: 89 45 f8 mov %eax,-0x8(%ebp)
1001c1: e8 8a ff ff ff call 100150 <kprint>
1001c6: 8b 45 f8 mov -0x8(%ebp),%eax
1001c9: 8d 88 93 f9 ff ff lea -0x66d(%eax),%ecx
1001cf: 89 0c 24 mov %ecx,(%esp)
1001d2: 89 c3 mov %eax,%ebx
1001d4: e8 77 ff ff ff call 100150 <kprint>
1001d9: 8b 5d f8 mov -0x8(%ebp),%ebx
1001dc: e8 af ff ff ff call 100190 <hal_disable_interrupts>
1001e1: b8 64 00 00 00 mov $0x64,%eax
1001e6: c7 04 24 64 00 00 00 movl $0x64,(%esp)
1001ed: 8b 5d f8 mov -0x8(%ebp),%ebx
1001f0: 89 45 f4 mov %eax,-0xc(%ebp)
1001f3: e8 18 07 00 00 call 100910 <hal_inb>
1001f8: 0f b6 d8 movzbl %al,%ebx
1001fb: 83 e3 02 and $0x2,%ebx
1001fe: 83 fb 00 cmp $0x0,%ebx
100201: 0f 84 05 00 00 00 je 10020c <hal_hard_shutdown+0x6c>
100207: e9 d5 ff ff ff jmp 1001e1 <hal_hard_shutdown+0x41>
10020c: b8 64 00 00 00 mov $0x64,%eax
100211: b9 d1 00 00 00 mov $0xd1,%ecx
100216: c7 04 24 64 00 00 00 movl $0x64,(%esp)
10021d: c7 44 24 04 d1 00 00 movl $0xd1,0x4(%esp)
100224: 00
100225: 8b 5d f8 mov -0x8(%ebp),%ebx
100228: 89 45 f0 mov %eax,-0x10(%ebp)
10022b: 89 4d ec mov %ecx,-0x14(%ebp)
10022e: e8 bd 06 00 00 call 1008f0 <hal_outb>
100233: b8 64 00 00 00 mov $0x64,%eax
100238: c7 04 24 64 00 00 00 movl $0x64,(%esp)
10023f: 8b 5d f8 mov -0x8(%ebp),%ebx
100242: 89 45 e8 mov %eax,-0x18(%ebp)
100245: e8 c6 06 00 00 call 100910 <hal_inb>
10024a: 0f b6 d8 movzbl %al,%ebx
10024d: 83 e3 02 and $0x2,%ebx
100250: 83 fb 00 cmp $0x0,%ebx
100253: 0f 84 05 00 00 00 je 10025e <hal_hard_shutdown+0xbe>
100259: e9 d5 ff ff ff jmp 100233 <hal_hard_shutdown+0x93>
10025e: b8 60 00 00 00 mov $0x60,%eax
100263: b9 fe 00 00 00 mov $0xfe,%ecx
100268: c7 04 24 60 00 00 00 movl $0x60,(%esp)
10026f: c7 44 24 04 fe 00 00 movl $0xfe,0x4(%esp)
100276: 00
100277: 8b 5d f8 mov -0x8(%ebp),%ebx
10027a: 89 45 e4 mov %eax,-0x1c(%ebp)
10027d: 89 4d e0 mov %ecx,-0x20(%ebp)
100280: e8 6b 06 00 00 call 1008f0 <hal_outb>
100285: 83 c4 24 add $0x24,%esp
100288: 5b pop %ebx
100289: 5d pop %ebp
10028a: c3 ret
10028b: 0f 1f 44 00 00 nopl 0x0(%eax,%eax,1)
00100290 <hal_test_fail_shutdown>:
100290: 55 push %ebp
100291: 89 e5 mov %esp,%ebp
100293: 53 push %ebx
100294: 83 ec 14 sub $0x14,%esp
100297: e8 00 00 00 00 call 10029c <hal_test_fail_shutdown+0xc>
10029c: 58 pop %eax
10029d: 81 c0 74 0d 00 00 add $0xd74,%eax
1002a3: b9 f4 00 00 00 mov $0xf4,%ecx
1002a8: 31 d2 xor %edx,%edx
1002aa: c7 04 24 f4 00 00 00 movl $0xf4,(%esp)
1002b1: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1002b8: 00
1002b9: 89 c3 mov %eax,%ebx
1002bb: 89 45 f8 mov %eax,-0x8(%ebp)
1002be: 89 4d f4 mov %ecx,-0xc(%ebp)
1002c1: 89 55 f0 mov %edx,-0x10(%ebp)
1002c4: e8 27 06 00 00 call 1008f0 <hal_outb>
1002c9: 8b 5d f8 mov -0x8(%ebp),%ebx
1002cc: e8 cf fe ff ff call 1001a0 <hal_hard_shutdown>
1002d1: 83 c4 14 add $0x14,%esp
1002d4: 5b pop %ebx
1002d5: 5d pop %ebp
1002d6: c3 ret
1002d7: 66 90 xchg %ax,%ax
1002d9: 66 90 xchg %ax,%ax
1002db: 66 90 xchg %ax,%ax
1002dd: 66 90 xchg %ax,%ax
1002df: 90 nop
001002e0 <hal_basic_display_move_cursor>:
1002e0: 55 push %ebp
1002e1: 89 e5 mov %esp,%ebp
1002e3: 53 push %ebx
1002e4: 57 push %edi
1002e5: 56 push %esi
1002e6: 83 ec 1c sub $0x1c,%esp
1002e9: e8 00 00 00 00 call 1002ee <hal_basic_display_move_cursor+0xe>
1002ee: 58 pop %eax
1002ef: 81 c0 22 0d 00 00 add $0xd22,%eax
1002f5: 66 8b 4d 0c mov 0xc(%ebp),%cx
1002f9: 66 8b 55 08 mov 0x8(%ebp),%dx
1002fd: be 0e 00 00 00 mov $0xe,%esi
100302: 66 89 55 f2 mov %dx,-0xe(%ebp)
100306: 66 89 4d f0 mov %cx,-0x10(%ebp)
10030a: 0f b7 7d f2 movzwl -0xe(%ebp),%edi
10030e: 0f b7 98 f4 ff ff ff movzwl -0xc(%eax),%ebx
100315: 0f af fb imul %ebx,%edi
100318: 0f b7 5d f0 movzwl -0x10(%ebp),%ebx
10031c: 01 df add %ebx,%edi
10031e: 66 89 f9 mov %di,%cx
100321: 66 89 4d ee mov %cx,-0x12(%ebp)
100325: 0f b7 b8 f6 ff ff ff movzwl -0xa(%eax),%edi
10032c: 89 3c 24 mov %edi,(%esp)
10032f: c7 44 24 04 0e 00 00 movl $0xe,0x4(%esp)
100336: 00
100337: 89 c3 mov %eax,%ebx
100339: 89 45 e8 mov %eax,-0x18(%ebp)
10033c: 89 75 e4 mov %esi,-0x1c(%ebp)
10033f: e8 ac 05 00 00 call 1008f0 <hal_outb>
100344: 8b 45 e8 mov -0x18(%ebp),%eax
100347: 66 8b 88 f8 ff ff ff mov -0x8(%eax),%cx
10034e: 0f b7 75 ee movzwl -0x12(%ebp),%esi
100352: c1 fe 08 sar $0x8,%esi
100355: 89 f3 mov %esi,%ebx
100357: 88 d8 mov %bl,%al
100359: 0f b7 f1 movzwl %cx,%esi
10035c: 89 34 24 mov %esi,(%esp)
10035f: 0f b6 f0 movzbl %al,%esi
100362: 89 74 24 04 mov %esi,0x4(%esp)
100366: 8b 5d e8 mov -0x18(%ebp),%ebx
100369: e8 82 05 00 00 call 1008f0 <hal_outb>
10036e: be 0f 00 00 00 mov $0xf,%esi
100373: 8b 7d e8 mov -0x18(%ebp),%edi
100376: 0f b7 9f f6 ff ff ff movzwl -0xa(%edi),%ebx
10037d: 89 1c 24 mov %ebx,(%esp)
100380: c7 44 24 04 0f 00 00 movl $0xf,0x4(%esp)
100387: 00
100388: 89 fb mov %edi,%ebx
10038a: 89 75 e0 mov %esi,-0x20(%ebp)
10038d: e8 5e 05 00 00 call 1008f0 <hal_outb>
100392: 8b 75 e8 mov -0x18(%ebp),%esi
100395: 66 8b 8e f8 ff ff ff mov -0x8(%esi),%cx
10039c: 66 8b 55 ee mov -0x12(%ebp),%dx
1003a0: 88 d0 mov %dl,%al
1003a2: 0f b7 f9 movzwl %cx,%edi
1003a5: 89 3c 24 mov %edi,(%esp)
1003a8: 0f b6 f8 movzbl %al,%edi
1003ab: 89 7c 24 04 mov %edi,0x4(%esp)
1003af: 89 f3 mov %esi,%ebx
1003b1: e8 3a 05 00 00 call 1008f0 <hal_outb>
1003b6: 83 c4 1c add $0x1c,%esp
1003b9: 5e pop %esi
1003ba: 5f pop %edi
1003bb: 5b pop %ebx
1003bc: 5d pop %ebp
1003bd: c3 ret
1003be: 66 90 xchg %ax,%ax
001003c0 <hal_basic_display_print>:
1003c0: 55 push %ebp
1003c1: 89 e5 mov %esp,%ebp
1003c3: 53 push %ebx
1003c4: 56 push %esi
1003c5: 83 ec 20 sub $0x20,%esp
1003c8: e8 00 00 00 00 call 1003cd <hal_basic_display_print+0xd>
1003cd: 58 pop %eax
1003ce: 81 c0 43 0c 00 00 add $0xc43,%eax
1003d4: 8b 4d 08 mov 0x8(%ebp),%ecx
1003d7: 89 4d f4 mov %ecx,-0xc(%ebp)
1003da: 83 b8 f0 4f 00 00 00 cmpl $0x0,0x4ff0(%eax)
1003e1: 89 45 ec mov %eax,-0x14(%ebp)
1003e4: 0f 85 0f 00 00 00 jne 1003f9 <hal_basic_display_print+0x39>
1003ea: 8b 45 ec mov -0x14(%ebp),%eax
1003ed: 8b 88 f0 ff ff ff mov -0x10(%eax),%ecx
1003f3: 89 88 f0 4f 00 00 mov %ecx,0x4ff0(%eax)
1003f9: e9 00 00 00 00 jmp 1003fe <hal_basic_display_print+0x3e>
1003fe: 31 c0 xor %eax,%eax
100400: 8b 4d f4 mov -0xc(%ebp),%ecx
100403: 0f be 09 movsbl (%ecx),%ecx
100406: 39 c8 cmp %ecx,%eax
100408: 0f 84 27 01 00 00 je 100535 <kernel_debug_info_end+0xc>
10040e: 8b 45 f4 mov -0xc(%ebp),%eax
100411: 0f be 00 movsbl (%eax),%eax
100414: 83 f8 0d cmp $0xd,%eax
100417: 0f 85 0f 00 00 00 jne 10042c <hal_basic_display_print+0x6c>
10041d: 8b 45 ec mov -0x14(%ebp),%eax
100420: c6 80 f4 4f 00 00 00 movb $0x0,0x4ff4(%eax)
100427: e9 f6 00 00 00 jmp 100522 <hal_basic_display_print+0x162>
10042c: 8b 45 f4 mov -0xc(%ebp),%eax
10042f: 0f be 00 movsbl (%eax),%eax
100432: 83 f8 0a cmp $0xa,%eax
100435: 0f 85 21 00 00 00 jne 10045c <hal_basic_display_print+0x9c>
10043b: 8b 45 ec mov -0x14(%ebp),%eax
10043e: c6 80 f4 4f 00 00 00 movb $0x0,0x4ff4(%eax)
100445: 0f b6 88 f5 4f 00 00 movzbl 0x4ff5(%eax),%ecx
10044c: 83 c1 01 add $0x1,%ecx
10044f: 88 ca mov %cl,%dl
100451: 88 90 f5 4f 00 00 mov %dl,0x4ff5(%eax)
100457: e9 c1 00 00 00 jmp 10051d <hal_basic_display_print+0x15d>
10045c: 8b 45 ec mov -0x14(%ebp),%eax
10045f: 0f b6 88 f4 4f 00 00 movzbl 0x4ff4(%eax),%ecx
100466: 0f b7 90 f4 ff ff ff movzwl -0xc(%eax),%edx
10046d: 39 d1 cmp %edx,%ecx
10046f: 0f 8c 1c 00 00 00 jl 100491 <hal_basic_display_print+0xd1>
100475: 8b 45 ec mov -0x14(%ebp),%eax
100478: c6 80 f4 4f 00 00 00 movb $0x0,0x4ff4(%eax)
10047f: 0f b6 88 f5 4f 00 00 movzbl 0x4ff5(%eax),%ecx
100486: 83 c1 01 add $0x1,%ecx
100489: 88 ca mov %cl,%dl
10048b: 88 90 f5 4f 00 00 mov %dl,0x4ff5(%eax)
100491: 8b 45 ec mov -0x14(%ebp),%eax
100494: 0f b6 88 f5 4f 00 00 movzbl 0x4ff5(%eax),%ecx
10049b: 0f b7 90 fa ff ff ff movzwl -0x6(%eax),%edx
1004a2: 39 d1 cmp %edx,%ecx
1004a4: 0f 8c 0a 00 00 00 jl 1004b4 <hal_basic_display_print+0xf4>
1004aa: 8b 45 ec mov -0x14(%ebp),%eax
1004ad: c6 80 f5 4f 00 00 00 movb $0x0,0x4ff5(%eax)
1004b4: 8b 45 ec mov -0x14(%ebp),%eax
1004b7: 0f b6 88 f5 4f 00 00 movzbl 0x4ff5(%eax),%ecx
1004be: 0f b7 90 f4 ff ff ff movzwl -0xc(%eax),%edx
1004c5: 0f af ca imul %edx,%ecx
1004c8: 0f b6 90 f4 4f 00 00 movzbl 0x4ff4(%eax),%edx
1004cf: 01 d1 add %edx,%ecx
1004d1: c1 e1 01 shl $0x1,%ecx
1004d4: 66 89 ce mov %cx,%si
1004d7: 66 89 75 f2 mov %si,-0xe(%ebp)
1004db: 0f b7 4d f2 movzwl -0xe(%ebp),%ecx
1004df: 83 c1 01 add $0x1,%ecx
1004e2: 66 89 ce mov %cx,%si
1004e5: 66 89 75 f0 mov %si,-0x10(%ebp)
1004e9: 8b 4d f4 mov -0xc(%ebp),%ecx
1004ec: 8a 19 mov (%ecx),%bl
1004ee: 8b 88 f0 4f 00 00 mov 0x4ff0(%eax),%ecx
1004f4: 0f b7 55 f2 movzwl -0xe(%ebp),%edx
1004f8: 88 1c 11 mov %bl,(%ecx,%edx,1)
1004fb: 8a 98 fc ff ff ff mov -0x4(%eax),%bl
100501: 8b 88 f0 4f 00 00 mov 0x4ff0(%eax),%ecx
100507: 0f b7 55 f0 movzwl -0x10(%ebp),%edx
10050b: 88 1c 11 mov %bl,(%ecx,%edx,1)
10050e: 8a 98 f4 4f 00 00 mov 0x4ff4(%eax),%bl
100514: 80 c3 01 add $0x1,%bl
100517: 88 98 f4 4f 00 00 mov %bl,0x4ff4(%eax)
10051d: e9 00 00 00 00 jmp 100522 <hal_basic_display_print+0x162>
100522: e9 00 00 00 00 jmp 100527 <hal_basic_display_print+0x167>
100527: 8b 45 f4 mov -0xc(%ebp),%eax
10052a: 83 c0 01 add $0x1,%eax
10052d: 89 45 f4 mov %eax,-0xc(%ebp)
100530: e9 c9 fe ff ff jmp 1003fe <hal_basic_display_print+0x3e>
100535: 8b 45 ec mov -0x14(%ebp),%eax
100538: 0f b6 88 f5 4f 00 00 movzbl 0x4ff5(%eax),%ecx
10053f: 66 89 ca mov %cx,%dx
100542: 8a 98 f4 4f 00 00 mov 0x4ff4(%eax),%bl
100548: 0f b6 cb movzbl %bl,%ecx
10054b: 66 89 ce mov %cx,%si
10054e: 0f b7 ca movzwl %dx,%ecx
100551: 89 0c 24 mov %ecx,(%esp)
100554: 0f b7 ce movzwl %si,%ecx
100557: 89 4c 24 04 mov %ecx,0x4(%esp)
10055b: 89 c3 mov %eax,%ebx
10055d: e8 7e fd ff ff call 1002e0 <hal_basic_display_move_cursor>
100562: 83 c4 20 add $0x20,%esp
100565: 5e pop %esi
100566: 5b pop %ebx
100567: 5d pop %ebp
100568: c3 ret
100569: 0f 1f 80 00 00 00 00 nopl 0x0(%eax)
00100570 <hal_basic_display_clear>:
100570: 55 push %ebp
100571: 89 e5 mov %esp,%ebp
100573: 53 push %ebx
100574: 56 push %esi
100575: 83 ec 20 sub $0x20,%esp
100578: e8 00 00 00 00 call 10057d <hal_basic_display_clear+0xd>
10057d: 58 pop %eax
10057e: 81 c0 93 0a 00 00 add $0xa93,%eax
100584: 0f b7 88 fa ff ff ff movzwl -0x6(%eax),%ecx
10058b: 0f b7 90 f4 ff ff ff movzwl -0xc(%eax),%edx
100592: 0f af ca imul %edx,%ecx
100595: 66 89 ce mov %cx,%si
100598: 66 89 75 f6 mov %si,-0xa(%ebp)
10059c: 0f b7 4d f6 movzwl -0xa(%ebp),%ecx
1005a0: 89 e2 mov %esp,%edx
1005a2: 89 55 f0 mov %edx,-0x10(%ebp)
1005a5: 83 c1 10 add $0x10,%ecx
1005a8: 81 e1 f0 ff 01 00 and $0x1fff0,%ecx
1005ae: 89 e2 mov %esp,%edx
1005b0: 29 ca sub %ecx,%edx
1005b2: 89 d4 mov %edx,%esp
1005b4: 0f b7 4d f6 movzwl -0xa(%ebp),%ecx
1005b8: 83 e9 01 sub $0x1,%ecx
1005bb: c6 04 0a 00 movb $0x0,(%edx,%ecx,1)
1005bf: 66 c7 45 ee 00 00 movw $0x0,-0x12(%ebp)
1005c5: 89 45 e8 mov %eax,-0x18(%ebp)
1005c8: 89 55 e4 mov %edx,-0x1c(%ebp)
1005cb: 0f b7 45 ee movzwl -0x12(%ebp),%eax
1005cf: 0f b7 4d f6 movzwl -0xa(%ebp),%ecx
1005d3: 39 c8 cmp %ecx,%eax
1005d5: 0f 8f 1c 00 00 00 jg 1005f7 <hal_basic_display_clear+0x87>
1005db: 0f b7 45 ee movzwl -0x12(%ebp),%eax
1005df: 8b 4d e4 mov -0x1c(%ebp),%ecx
1005e2: c6 04 01 20 movb $0x20,(%ecx,%eax,1)
1005e6: 66 8b 45 ee mov -0x12(%ebp),%ax
1005ea: 66 83 c0 01 add $0x1,%ax
1005ee: 66 89 45 ee mov %ax,-0x12(%ebp)
1005f2: e9 d4 ff ff ff jmp 1005cb <hal_basic_display_clear+0x5b>
1005f7: 83 ec 10 sub $0x10,%esp
1005fa: 89 e0 mov %esp,%eax
1005fc: 8b 4d e4 mov -0x1c(%ebp),%ecx
1005ff: 89 08 mov %ecx,(%eax)
100601: 8b 5d e8 mov -0x18(%ebp),%ebx
100604: e8 b7 fd ff ff call 1003c0 <hal_basic_display_print>
100609: 83 c4 10 add $0x10,%esp
10060c: 8b 45 e8 mov -0x18(%ebp),%eax
10060f: c6 80 f5 4f 00 00 00 movb $0x0,0x4ff5(%eax)
100616: c6 80 f4 4f 00 00 00 movb $0x0,0x4ff4(%eax)
10061d: 0f b6 88 f5 4f 00 00 movzbl 0x4ff5(%eax),%ecx
100624: 66 89 ca mov %cx,%dx
100627: 8a 80 f4 4f 00 00 mov 0x4ff4(%eax),%al
10062d: 0f b6 c8 movzbl %al,%ecx
100630: 66 89 ce mov %cx,%si
100633: 83 ec 10 sub $0x10,%esp
100636: 0f b7 ca movzwl %dx,%ecx
100639: 89 0c 24 mov %ecx,(%esp)
10063c: 0f b7 ce movzwl %si,%ecx
10063f: 89 4c 24 04 mov %ecx,0x4(%esp)
100643: 8b 5d e8 mov -0x18(%ebp),%ebx
100646: e8 95 fc ff ff call 1002e0 <hal_basic_display_move_cursor>
10064b: 83 c4 10 add $0x10,%esp
10064e: 8b 4d f0 mov -0x10(%ebp),%ecx
100651: 89 cc mov %ecx,%esp
100653: 8d 65 f8 lea -0x8(%ebp),%esp
100656: 5e pop %esi
100657: 5b pop %ebx
100658: 5d pop %ebp
100659: c3 ret
10065a: 66 0f 1f 44 00 00 nopw 0x0(%eax,%eax,1)
00100660 <hal_basic_display_init>:
100660: 55 push %ebp
100661: 89 e5 mov %esp,%ebp
100663: 53 push %ebx
100664: 50 push %eax
100665: e8 00 00 00 00 call 10066a <hal_basic_display_init+0xa>
10066a: 58 pop %eax
10066b: 81 c0 a6 09 00 00 add $0x9a6,%eax
100671: 89 c3 mov %eax,%ebx
100673: e8 f8 fe ff ff call 100570 <hal_basic_display_clear>
100678: 83 c4 04 add $0x4,%esp
10067b: 5b pop %ebx
10067c: 5d pop %ebp
10067d: c3 ret
10067e: 66 90 xchg %ax,%ax
00100680 <hal_basic_uart_init>:
100680: 55 push %ebp
100681: 89 e5 mov %esp,%ebp
100683: 53 push %ebx
100684: 56 push %esi
100685: 83 ec 30 sub $0x30,%esp
100688: e8 00 00 00 00 call 10068d <hal_basic_uart_init+0xd>
10068d: 58 pop %eax
10068e: 81 c0 83 09 00 00 add $0x983,%eax
100694: 31 c9 xor %ecx,%ecx
100696: 0f b7 90 fe ff ff ff movzwl -0x2(%eax),%edx
10069d: 83 c2 05 add $0x5,%edx
1006a0: 66 89 d6 mov %dx,%si
1006a3: 66 89 b0 f6 4f 00 00 mov %si,0x4ff6(%eax)
1006aa: 0f b7 90 fe ff ff ff movzwl -0x2(%eax),%edx
1006b1: 83 c2 01 add $0x1,%edx
1006b4: 66 89 d6 mov %dx,%si
1006b7: 0f b7 d6 movzwl %si,%edx
1006ba: 89 14 24 mov %edx,(%esp)
1006bd: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1006c4: 00
1006c5: 89 c3 mov %eax,%ebx
1006c7: 89 45 f4 mov %eax,-0xc(%ebp)
1006ca: 89 4d f0 mov %ecx,-0x10(%ebp)
1006cd: e8 1e 02 00 00 call 1008f0 <hal_outb>
1006d2: b8 80 00 00 00 mov $0x80,%eax
1006d7: 8b 4d f4 mov -0xc(%ebp),%ecx
1006da: 0f b7 91 fe ff ff ff movzwl -0x2(%ecx),%edx
1006e1: 83 c2 03 add $0x3,%edx
1006e4: 66 89 d6 mov %dx,%si
1006e7: 0f b7 d6 movzwl %si,%edx
1006ea: 89 14 24 mov %edx,(%esp)
1006ed: c7 44 24 04 80 00 00 movl $0x80,0x4(%esp)
1006f4: 00
1006f5: 89 cb mov %ecx,%ebx
1006f7: 89 45 ec mov %eax,-0x14(%ebp)
1006fa: e8 f1 01 00 00 call 1008f0 <hal_outb>
1006ff: b8 03 00 00 00 mov $0x3,%eax
100704: 8b 4d f4 mov -0xc(%ebp),%ecx
100707: 0f b7 91 fe ff ff ff movzwl -0x2(%ecx),%edx
10070e: 83 c2 00 add $0x0,%edx
100711: 66 89 d6 mov %dx,%si
100714: 0f b7 d6 movzwl %si,%edx
100717: 89 14 24 mov %edx,(%esp)
10071a: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp)
100721: 00
100722: 89 cb mov %ecx,%ebx
100724: 89 45 e8 mov %eax,-0x18(%ebp)
100727: e8 c4 01 00 00 call 1008f0 <hal_outb>
10072c: 31 c0 xor %eax,%eax
10072e: 8b 4d f4 mov -0xc(%ebp),%ecx
100731: 0f b7 91 fe ff ff ff movzwl -0x2(%ecx),%edx
100738: 83 c2 01 add $0x1,%edx
10073b: 66 89 d6 mov %dx,%si
10073e: 0f b7 d6 movzwl %si,%edx
100741: 89 14 24 mov %edx,(%esp)
100744: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10074b: 00
10074c: 89 cb mov %ecx,%ebx
10074e: 89 45 e4 mov %eax,-0x1c(%ebp)
100751: e8 9a 01 00 00 call 1008f0 <hal_outb>
100756: b8 03 00 00 00 mov $0x3,%eax
10075b: 8b 4d f4 mov -0xc(%ebp),%ecx
10075e: 0f b7 91 fe ff ff ff movzwl -0x2(%ecx),%edx
100765: 83 c2 03 add $0x3,%edx
100768: 66 89 d6 mov %dx,%si
10076b: 0f b7 d6 movzwl %si,%edx
10076e: 89 14 24 mov %edx,(%esp)
100771: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp)
100778: 00
100779: 89 cb mov %ecx,%ebx
10077b: 89 45 e0 mov %eax,-0x20(%ebp)
10077e: e8 6d 01 00 00 call 1008f0 <hal_outb>
100783: b8 c7 00 00 00 mov $0xc7,%eax
100788: 8b 4d f4 mov -0xc(%ebp),%ecx
10078b: 0f b7 91 fe ff ff ff movzwl -0x2(%ecx),%edx
100792: 83 c2 02 add $0x2,%edx
100795: 66 89 d6 mov %dx,%si
100798: 0f b7 d6 movzwl %si,%edx
10079b: 89 14 24 mov %edx,(%esp)
10079e: c7 44 24 04 c7 00 00 movl $0xc7,0x4(%esp)
1007a5: 00
1007a6: 89 cb mov %ecx,%ebx
1007a8: 89 45 dc mov %eax,-0x24(%ebp)
1007ab: e8 40 01 00 00 call 1008f0 <hal_outb>
1007b0: b8 0b 00 00 00 mov $0xb,%eax
1007b5: 8b 4d f4 mov -0xc(%ebp),%ecx
1007b8: 0f b7 91 fe ff ff ff movzwl -0x2(%ecx),%edx
1007bf: 83 c2 04 add $0x4,%edx
1007c2: 66 89 d6 mov %dx,%si
1007c5: 0f b7 d6 movzwl %si,%edx
1007c8: 89 14 24 mov %edx,(%esp)
1007cb: c7 44 24 04 0b 00 00 movl $0xb,0x4(%esp)
1007d2: 00
1007d3: 89 cb mov %ecx,%ebx
1007d5: 89 45 d8 mov %eax,-0x28(%ebp)
1007d8: e8 13 01 00 00 call 1008f0 <hal_outb>
1007dd: 83 c4 30 add $0x30,%esp
1007e0: 5e pop %esi
1007e1: 5b pop %ebx
1007e2: 5d pop %ebp
1007e3: c3 ret
1007e4: 66 66 66 2e 0f 1f 84 data16 data16 nopw %cs:0x0(%eax,%eax,1)
1007eb: 00 00 00 00 00
001007f0 <hal_basic_uart_transmit_empty>:
1007f0: 55 push %ebp
1007f1: 89 e5 mov %esp,%ebp
1007f3: 53 push %ebx
1007f4: 50 push %eax
1007f5: e8 00 00 00 00 call 1007fa <hal_basic_uart_transmit_empty+0xa>
1007fa: 58 pop %eax
1007fb: 81 c0 16 08 00 00 add $0x816,%eax
100801: 0f b7 88 f6 4f 00 00 movzwl 0x4ff6(%eax),%ecx
100808: 89 0c 24 mov %ecx,(%esp)
10080b: 89 c3 mov %eax,%ebx
10080d: e8 fe 00 00 00 call 100910 <hal_inb>
100812: 0f b6 c8 movzbl %al,%ecx
100815: 83 e1 20 and $0x20,%ecx
100818: 88 c8 mov %cl,%al
10081a: 0f b6 c0 movzbl %al,%eax
10081d: 83 c4 04 add $0x4,%esp
100820: 5b pop %ebx
100821: 5d pop %ebp
100822: c3 ret
100823: 66 66 66 66 2e 0f 1f data16 data16 data16 nopw %cs:0x0(%eax,%eax,1)
10082a: 84 00 00 00 00 00
00100830 <hal_basic_uart_print_character>:
100830: 55 push %ebp
100831: 89 e5 mov %esp,%ebp
100833: 53 push %ebx
100834: 83 ec 14 sub $0x14,%esp
100837: e8 00 00 00 00 call 10083c <hal_basic_uart_print_character+0xc>
10083c: 58 pop %eax
10083d: 81 c0 d4 07 00 00 add $0x7d4,%eax
100843: 8a 4d 08 mov 0x8(%ebp),%cl
100846: 88 4d fb mov %cl,-0x5(%ebp)
100849: 89 45 f4 mov %eax,-0xc(%ebp)
10084c: 8b 5d f4 mov -0xc(%ebp),%ebx
10084f: e8 9c ff ff ff call 1007f0 <hal_basic_uart_transmit_empty>
100854: 0f b6 d8 movzbl %al,%ebx
100857: 83 fb 00 cmp $0x0,%ebx
10085a: 0f 85 05 00 00 00 jne 100865 <hal_basic_uart_print_character+0x35>
100860: e9 e7 ff ff ff jmp 10084c <hal_basic_uart_print_character+0x1c>
100865: 8b 45 f4 mov -0xc(%ebp),%eax
100868: 66 8b 88 fe ff ff ff mov -0x2(%eax),%cx
10086f: 0f b7 d1 movzwl %cx,%edx
100872: 89 14 24 mov %edx,(%esp)
100875: 0f b6 55 fb movzbl -0x5(%ebp),%edx
100879: 89 54 24 04 mov %edx,0x4(%esp)
10087d: 89 c3 mov %eax,%ebx
10087f: e8 6c 00 00 00 call 1008f0 <hal_outb>
100884: 83 c4 14 add $0x14,%esp
100887: 5b pop %ebx
100888: 5d pop %ebp
100889: c3 ret
10088a: 66 0f 1f 44 00 00 nopw 0x0(%eax,%eax,1)
00100890 <hal_basic_uart_print>:
100890: 55 push %ebp
100891: 89 e5 mov %esp,%ebp
100893: 53 push %ebx
100894: 83 ec 14 sub $0x14,%esp
100897: e8 00 00 00 00 call 10089c <hal_basic_uart_print+0xc>
10089c: 58 pop %eax
10089d: 81 c0 74 07 00 00 add $0x774,%eax
1008a3: 8b 4d 08 mov 0x8(%ebp),%ecx
1008a6: 89 4d f8 mov %ecx,-0x8(%ebp)
1008a9: 89 45 f4 mov %eax,-0xc(%ebp)
1008ac: 31 c0 xor %eax,%eax
1008ae: 8b 4d f8 mov -0x8(%ebp),%ecx
1008b1: 0f be 09 movsbl (%ecx),%ecx
1008b4: 39 c8 cmp %ecx,%eax
1008b6: 0f 84 1f 00 00 00 je 1008db <hal_basic_uart_print+0x4b>
1008bc: 8b 45 f8 mov -0x8(%ebp),%eax
1008bf: 0f b6 00 movzbl (%eax),%eax
1008c2: 89 04 24 mov %eax,(%esp)
1008c5: 8b 5d f4 mov -0xc(%ebp),%ebx
1008c8: e8 63 ff ff ff call 100830 <hal_basic_uart_print_character>
1008cd: 8b 45 f8 mov -0x8(%ebp),%eax
1008d0: 83 c0 01 add $0x1,%eax
1008d3: 89 45 f8 mov %eax,-0x8(%ebp)
1008d6: e9 d1 ff ff ff jmp 1008ac <hal_basic_uart_print+0x1c>
1008db: 83 c4 14 add $0x14,%esp
1008de: 5b pop %ebx
1008df: 5d pop %ebp
1008e0: c3 ret
1008e1: 66 90 xchg %ax,%ax
1008e3: 66 90 xchg %ax,%ax
1008e5: 66 90 xchg %ax,%ax
1008e7: 66 90 xchg %ax,%ax
1008e9: 66 90 xchg %ax,%ax
1008eb: 66 90 xchg %ax,%ax
1008ed: 66 90 xchg %ax,%ax
1008ef: 90 nop
001008f0 <hal_outb>:
1008f0: 55 push %ebp
1008f1: 89 e5 mov %esp,%ebp
1008f3: 50 push %eax
1008f4: 8a 45 0c mov 0xc(%ebp),%al
1008f7: 66 8b 4d 08 mov 0x8(%ebp),%cx
1008fb: 66 89 4d fe mov %cx,-0x2(%ebp)
1008ff: 88 45 fd mov %al,-0x3(%ebp)
100902: 8a 45 fd mov -0x3(%ebp),%al
100905: 66 8b 55 fe mov -0x2(%ebp),%dx
100909: ee out %al,(%dx)
10090a: 83 c4 04 add $0x4,%esp
10090d: 5d pop %ebp
10090e: c3 ret
10090f: 90 nop
00100910 <hal_inb>:
100910: 55 push %ebp
100911: 89 e5 mov %esp,%ebp
100913: 50 push %eax
100914: 66 8b 45 08 mov 0x8(%ebp),%ax
100918: 66 89 45 fe mov %ax,-0x2(%ebp)
10091c: 66 8b 55 fe mov -0x2(%ebp),%dx
100920: ec in (%dx),%al
100921: 88 45 fd mov %al,-0x3(%ebp)
100924: 0f b6 45 fd movzbl -0x3(%ebp),%eax
100928: 83 c4 04 add $0x4,%esp
10092b: 5d pop %ebp
10092c: c3 ret
10092d: 0f 1f 00 nopl (%eax)
00100930 <hal_inw>:
100930: 55 push %ebp
100931: 89 e5 mov %esp,%ebp
100933: 50 push %eax
100934: 66 8b 45 08 mov 0x8(%ebp),%ax
100938: 66 89 45 fe mov %ax,-0x2(%ebp)
10093c: 66 8b 55 fe mov -0x2(%ebp),%dx
100940: 66 ed in (%dx),%ax
100942: 66 89 45 fc mov %ax,-0x4(%ebp)
100946: 0f b7 45 fc movzwl -0x4(%ebp),%eax
10094a: 83 c4 04 add $0x4,%esp
10094d: 5d pop %ebp
10094e: c3 ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment