From f04d52c2c23ac1e76f8b4f290499582c89e5005a Mon Sep 17 00:00:00 2001 From: os Date: Wed, 29 Nov 2023 14:19:51 -0500 Subject: [PATCH] ran sh command --- Part4/10_scheduler/e_compile.sh | 0 Part4/10_scheduler/globals.s | 182 ++++ Part4/10_scheduler/hello.s | 871 ++++++++++++++++++ Part4/10_scheduler/idt.s | 560 ++++++++++++ Part4/10_scheduler/interrupt.o | Bin 0 -> 2128 bytes Part4/10_scheduler/isr.s | 1518 +++++++++++++++++++++++++++++++ Part4/10_scheduler/keyboard.s | 965 ++++++++++++++++++++ Part4/10_scheduler/mem.s | 673 ++++++++++++++ Part4/10_scheduler/ports.s | 501 ++++++++++ Part4/10_scheduler/s_compile.sh | 0 Part4/10_scheduler/screen.s | 1345 +++++++++++++++++++++++++++ Part4/10_scheduler/string.s | 998 ++++++++++++++++++++ Part4/10_scheduler/timer.s | 601 ++++++++++++ 13 files changed, 8214 insertions(+) mode change 100644 => 100755 Part4/10_scheduler/e_compile.sh create mode 100644 Part4/10_scheduler/globals.s create mode 100644 Part4/10_scheduler/hello.s create mode 100644 Part4/10_scheduler/idt.s create mode 100644 Part4/10_scheduler/interrupt.o create mode 100644 Part4/10_scheduler/isr.s create mode 100644 Part4/10_scheduler/keyboard.s create mode 100644 Part4/10_scheduler/mem.s create mode 100644 Part4/10_scheduler/ports.s mode change 100644 => 100755 Part4/10_scheduler/s_compile.sh create mode 100644 Part4/10_scheduler/screen.s create mode 100644 Part4/10_scheduler/string.s create mode 100644 Part4/10_scheduler/timer.s diff --git a/Part4/10_scheduler/e_compile.sh b/Part4/10_scheduler/e_compile.sh old mode 100644 new mode 100755 diff --git a/Part4/10_scheduler/globals.s b/Part4/10_scheduler/globals.s new file mode 100644 index 0000000..9271d10 --- /dev/null +++ b/Part4/10_scheduler/globals.s @@ -0,0 +1,182 @@ + .file "globals.c" + .text +.Ltext0: + .comm free_mem_addr,4,4 + .comm global_id,4,4 + .comm memory_limit,4,4 +.Letext0: + .file 1 "./libc/globals.c" + .file 2 "./libc/../cpu/types.h" + .section .debug_info,"",@progbits +.Ldebug_info0: + .long 0x82 + .value 0x4 + .long .Ldebug_abbrev0 + .byte 0x4 + .uleb128 0x1 + .long .LASF8 + .byte 0xc + .long .LASF9 + .long .LASF10 + .long .Ldebug_line0 + .uleb128 0x2 + .string "u32" + .byte 0x2 + .byte 0x6 + .long 0x28 + .uleb128 0x3 + .byte 0x4 + .byte 0x7 + .long .LASF0 + .uleb128 0x4 + .byte 0x4 + .byte 0x5 + .string "int" + .uleb128 0x3 + .byte 0x2 + .byte 0x7 + .long .LASF1 + .uleb128 0x3 + .byte 0x2 + .byte 0x5 + .long .LASF2 + .uleb128 0x3 + .byte 0x1 + .byte 0x8 + .long .LASF3 + .uleb128 0x3 + .byte 0x1 + .byte 0x6 + .long .LASF4 + .uleb128 0x5 + .long .LASF5 + .byte 0x1 + .byte 0x3 + .long 0x1d + .uleb128 0x5 + .byte 0x3 + .long free_mem_addr + .uleb128 0x5 + .long .LASF6 + .byte 0x1 + .byte 0x4 + .long 0x1d + .uleb128 0x5 + .byte 0x3 + .long global_id + .uleb128 0x5 + .long .LASF7 + .byte 0x1 + .byte 0x5 + .long 0x1d + .uleb128 0x5 + .byte 0x3 + .long memory_limit + .byte 0 + .section .debug_abbrev,"",@progbits +.Ldebug_abbrev0: + .uleb128 0x1 + .uleb128 0x11 + .byte 0x1 + .uleb128 0x25 + .uleb128 0xe + .uleb128 0x13 + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x1b + .uleb128 0xe + .uleb128 0x10 + .uleb128 0x17 + .byte 0 + .byte 0 + .uleb128 0x2 + .uleb128 0x16 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x3 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .byte 0 + .byte 0 + .uleb128 0x4 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0x8 + .byte 0 + .byte 0 + .uleb128 0x5 + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .byte 0 + .section .debug_aranges,"",@progbits + .long 0x14 + .value 0x2 + .long .Ldebug_info0 + .byte 0x4 + .byte 0 + .value 0 + .value 0 + .long 0 + .long 0 + .section .debug_line,"",@progbits +.Ldebug_line0: + .section .debug_str,"MS",@progbits,1 +.LASF0: + .string "unsigned int" +.LASF6: + .string "global_id" +.LASF10: + .string "/home/os/OS_Project/Part4/10_scheduler" +.LASF3: + .string "unsigned char" +.LASF8: + .string "GNU C11 5.4.0 20160609 -m32 -mtune=generic -march=i686 -g -fno-pie -ffreestanding -fno-builtin -fno-stack-protector" +.LASF2: + .string "short int" +.LASF5: + .string "free_mem_addr" +.LASF7: + .string "memory_limit" +.LASF1: + .string "short unsigned int" +.LASF4: + .string "char" +.LASF9: + .string "./libc/globals.c" + .ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609" + .section .note.GNU-stack,"",@progbits diff --git a/Part4/10_scheduler/hello.s b/Part4/10_scheduler/hello.s new file mode 100644 index 0000000..db0acd8 --- /dev/null +++ b/Part4/10_scheduler/hello.s @@ -0,0 +1,871 @@ + .file "hello.c" + .text +.Ltext0: + .comm idt,2048,32 + .comm idt_reg,6,4 + .section .rodata +.LC0: + .string "Process " + .align 4 +.LC1: + .string "has been entered. Hey there.\n" + .text + .globl start_ + .type start_, @function +start_: +.LFB0: + .file 1 "hello.c" + .loc 1 18 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $40, %esp + .loc 1 19 0 + movl $0, -12(%ebp) + .loc 1 21 0 + subl $12, %esp + pushl $.LC0 + call kprint + addl $16, %esp + .loc 1 22 0 + subl $8, %esp + leal -28(%ebp), %eax + pushl %eax + pushl -12(%ebp) + call hex_to_ascii + addl $16, %esp + .loc 1 23 0 + subl $12, %esp + leal -28(%ebp), %eax + pushl %eax + call kprint + addl $16, %esp + .loc 1 24 0 + subl $12, %esp + pushl $.LC1 + call kprint + addl $16, %esp + .loc 1 25 0 + nop + .loc 1 26 0 + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE0: + .size start_, .-start_ + .section .rodata +.LC2: + .string "END" +.LC3: + .string "Stopping the CPU. Bye!\n" +.LC4: + .string "ADD" +.LC5: + .string "ADDED: " +.LC6: + .string " id: " +.LC7: + .string "ZOO" +.LC8: + .string "ZOO.\n" +.LC9: + .string "You said: " +.LC10: + .string "\n> " + .text + .globl user_input + .type user_input, @function +user_input: +.LFB1: + .loc 1 28 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $40, %esp + .loc 1 29 0 + subl $8, %esp + pushl $.LC2 + pushl 8(%ebp) + call strcmp + addl $16, %esp + testl %eax, %eax + jne .L4 + .loc 1 30 0 + subl $12, %esp + pushl $.LC3 + call kprint + addl $16, %esp + .loc 1 31 0 +#APP +# 31 "hello.c" 1 + hlt +# 0 "" 2 +#NO_APP + jmp .L5 +.L4: + .loc 1 32 0 + subl $8, %esp + pushl $.LC4 + pushl 8(%ebp) + call strcmp + addl $16, %esp + testl %eax, %eax + jne .L6 +.LBB2: + .loc 1 33 0 + movl $16, -12(%ebp) + addl $4, -12(%ebp) + .loc 1 34 0 + movl $0, -16(%ebp) + .loc 1 35 0 + subl $4, %esp + leal -16(%ebp), %eax + pushl %eax + pushl $0 + pushl $20 + call kmalloc + addl $16, %esp + .loc 1 36 0 + movl -16(%ebp), %edx + movl global_id, %eax + leal 1(%eax), %ecx + movl %ecx, global_id + movl %eax, (%edx) + .loc 1 37 0 + movl -16(%ebp), %eax + movl global_id, %edx + imull $100, %edx, %edx + movl %edx, 4(%eax) + .loc 1 38 0 + movl -16(%ebp), %ecx + movl global_id, %edx + movl %edx, %eax + sall $2, %eax + addl %edx, %eax + addl %eax, %eax + movl %eax, 8(%ecx) + .loc 1 39 0 + movl -16(%ebp), %eax + movl $0, 12(%eax) + .loc 1 40 0 + movl -16(%ebp), %eax + movl $0, 16(%eax) + .loc 1 41 0 + subl $12, %esp + pushl $.LC5 + call kprint + addl $16, %esp + .loc 1 43 0 + movl -16(%ebp), %eax + movl %eax, %edx + subl $8, %esp + leal -32(%ebp), %eax + pushl %eax + pushl %edx + call hex_to_ascii + addl $16, %esp + .loc 1 44 0 + subl $12, %esp + leal -32(%ebp), %eax + pushl %eax + call kprint + addl $16, %esp + .loc 1 45 0 + subl $12, %esp + pushl $.LC6 + call kprint + addl $16, %esp + .loc 1 46 0 + movl -16(%ebp), %eax + movl (%eax), %eax + movl %eax, %edx + subl $8, %esp + leal -32(%ebp), %eax + pushl %eax + pushl %edx + call hex_to_ascii + addl $16, %esp + .loc 1 47 0 + subl $12, %esp + leal -32(%ebp), %eax + pushl %eax + call kprint + addl $16, %esp +.LBE2: + jmp .L5 +.L6: + .loc 1 48 0 + subl $8, %esp + pushl $.LC7 + pushl 8(%ebp) + call strcmp + addl $16, %esp + testl %eax, %eax + jne .L5 + .loc 1 49 0 + subl $12, %esp + pushl $.LC8 + call kprint + addl $16, %esp +.L5: + .loc 1 52 0 + subl $12, %esp + pushl $.LC9 + call kprint + addl $16, %esp + .loc 1 53 0 + subl $12, %esp + pushl 8(%ebp) + call kprint + addl $16, %esp + .loc 1 54 0 + subl $12, %esp + pushl $.LC10 + call kprint + addl $16, %esp + .loc 1 55 0 + nop + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE1: + .size user_input, .-user_input +.Letext0: + .file 2 "./cpu/types.h" + .file 3 "./cpu/idt.h" + .file 4 "./libc/mem.h" + .file 5 "./libc/globals.h" + .section .debug_info,"",@progbits +.Ldebug_info0: + .long 0x22b + .value 0x4 + .long .Ldebug_abbrev0 + .byte 0x4 + .uleb128 0x1 + .long .LASF22 + .byte 0xc + .long .LASF23 + .long .LASF24 + .long .Ltext0 + .long .Letext0-.Ltext0 + .long .Ldebug_line0 + .uleb128 0x2 + .string "u32" + .byte 0x2 + .byte 0x6 + .long 0x30 + .uleb128 0x3 + .byte 0x4 + .byte 0x7 + .long .LASF0 + .uleb128 0x4 + .byte 0x4 + .byte 0x5 + .string "int" + .uleb128 0x2 + .string "u16" + .byte 0x2 + .byte 0x8 + .long 0x49 + .uleb128 0x3 + .byte 0x2 + .byte 0x7 + .long .LASF1 + .uleb128 0x3 + .byte 0x2 + .byte 0x5 + .long .LASF2 + .uleb128 0x2 + .string "u8" + .byte 0x2 + .byte 0xa + .long 0x61 + .uleb128 0x3 + .byte 0x1 + .byte 0x8 + .long .LASF3 + .uleb128 0x3 + .byte 0x1 + .byte 0x6 + .long .LASF4 + .uleb128 0x5 + .byte 0x8 + .byte 0x3 + .byte 0xa + .long 0xb4 + .uleb128 0x6 + .long .LASF5 + .byte 0x3 + .byte 0xb + .long 0x3e + .byte 0 + .uleb128 0x7 + .string "sel" + .byte 0x3 + .byte 0xc + .long 0x3e + .byte 0x2 + .uleb128 0x6 + .long .LASF6 + .byte 0x3 + .byte 0xd + .long 0x57 + .byte 0x4 + .uleb128 0x6 + .long .LASF7 + .byte 0x3 + .byte 0x13 + .long 0x57 + .byte 0x5 + .uleb128 0x6 + .long .LASF8 + .byte 0x3 + .byte 0x14 + .long 0x3e + .byte 0x6 + .byte 0 + .uleb128 0x8 + .long .LASF9 + .byte 0x3 + .byte 0x15 + .long 0x6f + .uleb128 0x5 + .byte 0x6 + .byte 0x3 + .byte 0x19 + .long 0xe0 + .uleb128 0x6 + .long .LASF10 + .byte 0x3 + .byte 0x1a + .long 0x3e + .byte 0 + .uleb128 0x6 + .long .LASF11 + .byte 0x3 + .byte 0x1b + .long 0x25 + .byte 0x2 + .byte 0 + .uleb128 0x8 + .long .LASF12 + .byte 0x3 + .byte 0x1c + .long 0xbf + .uleb128 0x9 + .long .LASF25 + .byte 0x14 + .byte 0x4 + .byte 0x9 + .long 0x133 + .uleb128 0x7 + .string "id" + .byte 0x4 + .byte 0xa + .long 0x25 + .byte 0 + .uleb128 0x6 + .long .LASF11 + .byte 0x4 + .byte 0xb + .long 0x25 + .byte 0x4 + .uleb128 0x6 + .long .LASF13 + .byte 0x4 + .byte 0xc + .long 0x25 + .byte 0x8 + .uleb128 0x6 + .long .LASF14 + .byte 0x4 + .byte 0xd + .long 0x133 + .byte 0xc + .uleb128 0x6 + .long .LASF15 + .byte 0x4 + .byte 0xe + .long 0x133 + .byte 0x10 + .byte 0 + .uleb128 0xa + .byte 0x4 + .long 0xeb + .uleb128 0x8 + .long .LASF16 + .byte 0x4 + .byte 0xf + .long 0xeb + .uleb128 0xb + .long .LASF18 + .byte 0x1 + .byte 0x11 + .long .LFB0 + .long .LFE0-.LFB0 + .uleb128 0x1 + .byte 0x9c + .long 0x174 + .uleb128 0xc + .string "pid" + .byte 0x1 + .byte 0x13 + .long 0x37 + .uleb128 0x2 + .byte 0x91 + .sleb128 -20 + .uleb128 0xc + .string "c" + .byte 0x1 + .byte 0x14 + .long 0x174 + .uleb128 0x2 + .byte 0x91 + .sleb128 -36 + .byte 0 + .uleb128 0xd + .long 0x68 + .long 0x184 + .uleb128 0xe + .long 0x184 + .byte 0xf + .byte 0 + .uleb128 0x3 + .byte 0x4 + .byte 0x7 + .long .LASF17 + .uleb128 0xb + .long .LASF19 + .byte 0x1 + .byte 0x1c + .long .LFB1 + .long .LFE1-.LFB1 + .uleb128 0x1 + .byte 0x9c + .long 0x1df + .uleb128 0xf + .long .LASF26 + .byte 0x1 + .byte 0x1c + .long 0x1df + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .uleb128 0x10 + .long .LBB2 + .long .LBE2-.LBB2 + .uleb128 0xc + .string "n0" + .byte 0x1 + .byte 0x21 + .long 0x1e5 + .uleb128 0x2 + .byte 0x91 + .sleb128 -20 + .uleb128 0xc + .string "n1" + .byte 0x1 + .byte 0x22 + .long 0x1eb + .uleb128 0x2 + .byte 0x91 + .sleb128 -24 + .uleb128 0xc + .string "c" + .byte 0x1 + .byte 0x2a + .long 0x174 + .uleb128 0x2 + .byte 0x91 + .sleb128 -40 + .byte 0 + .byte 0 + .uleb128 0xa + .byte 0x4 + .long 0x68 + .uleb128 0xa + .byte 0x4 + .long 0x25 + .uleb128 0xa + .byte 0x4 + .long 0x139 + .uleb128 0x11 + .long .LASF20 + .byte 0x5 + .byte 0x6 + .long 0x25 + .uleb128 0xd + .long 0xb4 + .long 0x20c + .uleb128 0xe + .long 0x184 + .byte 0xff + .byte 0 + .uleb128 0x12 + .string "idt" + .byte 0x3 + .byte 0x1f + .long 0x1fc + .uleb128 0x5 + .byte 0x3 + .long idt + .uleb128 0x13 + .long .LASF21 + .byte 0x3 + .byte 0x20 + .long 0xe0 + .uleb128 0x5 + .byte 0x3 + .long idt_reg + .byte 0 + .section .debug_abbrev,"",@progbits +.Ldebug_abbrev0: + .uleb128 0x1 + .uleb128 0x11 + .byte 0x1 + .uleb128 0x25 + .uleb128 0xe + .uleb128 0x13 + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x1b + .uleb128 0xe + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x10 + .uleb128 0x17 + .byte 0 + .byte 0 + .uleb128 0x2 + .uleb128 0x16 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x3 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .byte 0 + .byte 0 + .uleb128 0x4 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0x8 + .byte 0 + .byte 0 + .uleb128 0x5 + .uleb128 0x13 + .byte 0x1 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x6 + .uleb128 0xd + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x38 + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0x7 + .uleb128 0xd + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x38 + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0x8 + .uleb128 0x16 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x9 + .uleb128 0x13 + .byte 0x1 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xa + .uleb128 0xf + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xb + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2116 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xc + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0xd + .uleb128 0x1 + .byte 0x1 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xe + .uleb128 0x21 + .byte 0 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2f + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0xf + .uleb128 0x5 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0x10 + .uleb128 0xb + .byte 0x1 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .byte 0 + .byte 0 + .uleb128 0x11 + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3c + .uleb128 0x19 + .byte 0 + .byte 0 + .uleb128 0x12 + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0x13 + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .byte 0 + .section .debug_aranges,"",@progbits + .long 0x1c + .value 0x2 + .long .Ldebug_info0 + .byte 0x4 + .byte 0 + .value 0 + .value 0 + .long .Ltext0 + .long .Letext0-.Ltext0 + .long 0 + .long 0 + .section .debug_line,"",@progbits +.Ldebug_line0: + .section .debug_str,"MS",@progbits,1 +.LASF5: + .string "low_offset" +.LASF9: + .string "idt_gate_t" +.LASF14: + .string "next" +.LASF23: + .string "hello.c" +.LASF21: + .string "idt_reg" +.LASF19: + .string "user_input" +.LASF15: + .string "previous" +.LASF3: + .string "unsigned char" +.LASF11: + .string "base" +.LASF1: + .string "short unsigned int" +.LASF25: + .string "_node" +.LASF6: + .string "always0" +.LASF0: + .string "unsigned int" +.LASF7: + .string "flags" +.LASF26: + .string "input" +.LASF4: + .string "char" +.LASF22: + .string "GNU C11 5.4.0 20160609 -m32 -mtune=generic -march=i686 -g -fno-pie -ffreestanding -fno-builtin -fno-stack-protector" +.LASF10: + .string "limit" +.LASF17: + .string "sizetype" +.LASF24: + .string "/home/os/OS_Project/Part4/10_scheduler" +.LASF20: + .string "global_id" +.LASF2: + .string "short int" +.LASF18: + .string "start_" +.LASF16: + .string "node" +.LASF8: + .string "high_offset" +.LASF12: + .string "idt_register_t" +.LASF13: + .string "size" + .ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609" + .section .note.GNU-stack,"",@progbits diff --git a/Part4/10_scheduler/idt.s b/Part4/10_scheduler/idt.s new file mode 100644 index 0000000..6d8f669 --- /dev/null +++ b/Part4/10_scheduler/idt.s @@ -0,0 +1,560 @@ + .file "idt.c" + .text +.Ltext0: + .comm idt,2048,32 + .comm idt_reg,6,4 + .globl set_idt_gate + .type set_idt_gate, @function +set_idt_gate: +.LFB0: + .file 1 "./cpu/idt.c" + .loc 1 3 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + .loc 1 4 0 + movl 12(%ebp), %eax + movl %eax, %edx + movl 8(%ebp), %eax + movw %dx, idt(,%eax,8) + .loc 1 5 0 + movl 8(%ebp), %eax + movw $8, idt+2(,%eax,8) + .loc 1 6 0 + movl 8(%ebp), %eax + movb $0, idt+4(,%eax,8) + .loc 1 7 0 + movl 8(%ebp), %eax + movb $-114, idt+5(,%eax,8) + .loc 1 8 0 + movl 12(%ebp), %eax + shrl $16, %eax + movl %eax, %edx + movl 8(%ebp), %eax + movw %dx, idt+6(,%eax,8) + .loc 1 9 0 + nop + popl %ebp + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE0: + .size set_idt_gate, .-set_idt_gate + .globl set_idt + .type set_idt, @function +set_idt: +.LFB1: + .loc 1 11 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + .loc 1 12 0 + movl $idt, %eax + movl %eax, idt_reg+2 + .loc 1 13 0 + movw $2047, idt_reg + .loc 1 15 0 + movl $idt_reg, %eax +#APP +# 15 "./cpu/idt.c" 1 + lidtl (%eax) +# 0 "" 2 + .loc 1 16 0 +#NO_APP + nop + popl %ebp + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE1: + .size set_idt, .-set_idt +.Letext0: + .file 2 "./cpu/types.h" + .file 3 "./cpu/idt.h" + .section .debug_info,"",@progbits +.Ldebug_info0: + .long 0x162 + .value 0x4 + .long .Ldebug_abbrev0 + .byte 0x4 + .uleb128 0x1 + .long .LASF16 + .byte 0xc + .long .LASF17 + .long .LASF18 + .long .Ltext0 + .long .Letext0-.Ltext0 + .long .Ldebug_line0 + .uleb128 0x2 + .string "u32" + .byte 0x2 + .byte 0x6 + .long 0x30 + .uleb128 0x3 + .byte 0x4 + .byte 0x7 + .long .LASF0 + .uleb128 0x4 + .byte 0x4 + .byte 0x5 + .string "int" + .uleb128 0x2 + .string "u16" + .byte 0x2 + .byte 0x8 + .long 0x49 + .uleb128 0x3 + .byte 0x2 + .byte 0x7 + .long .LASF1 + .uleb128 0x3 + .byte 0x2 + .byte 0x5 + .long .LASF2 + .uleb128 0x2 + .string "u8" + .byte 0x2 + .byte 0xa + .long 0x61 + .uleb128 0x3 + .byte 0x1 + .byte 0x8 + .long .LASF3 + .uleb128 0x3 + .byte 0x1 + .byte 0x6 + .long .LASF4 + .uleb128 0x5 + .byte 0x8 + .byte 0x3 + .byte 0xa + .long 0xb4 + .uleb128 0x6 + .long .LASF5 + .byte 0x3 + .byte 0xb + .long 0x3e + .byte 0 + .uleb128 0x7 + .string "sel" + .byte 0x3 + .byte 0xc + .long 0x3e + .byte 0x2 + .uleb128 0x6 + .long .LASF6 + .byte 0x3 + .byte 0xd + .long 0x57 + .byte 0x4 + .uleb128 0x6 + .long .LASF7 + .byte 0x3 + .byte 0x13 + .long 0x57 + .byte 0x5 + .uleb128 0x6 + .long .LASF8 + .byte 0x3 + .byte 0x14 + .long 0x3e + .byte 0x6 + .byte 0 + .uleb128 0x8 + .long .LASF9 + .byte 0x3 + .byte 0x15 + .long 0x6f + .uleb128 0x5 + .byte 0x6 + .byte 0x3 + .byte 0x19 + .long 0xe0 + .uleb128 0x6 + .long .LASF10 + .byte 0x3 + .byte 0x1a + .long 0x3e + .byte 0 + .uleb128 0x6 + .long .LASF11 + .byte 0x3 + .byte 0x1b + .long 0x25 + .byte 0x2 + .byte 0 + .uleb128 0x8 + .long .LASF12 + .byte 0x3 + .byte 0x1c + .long 0xbf + .uleb128 0x9 + .long .LASF19 + .byte 0x1 + .byte 0x3 + .long .LFB0 + .long .LFE0-.LFB0 + .uleb128 0x1 + .byte 0x9c + .long 0x11b + .uleb128 0xa + .string "n" + .byte 0x1 + .byte 0x3 + .long 0x37 + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .uleb128 0xb + .long .LASF13 + .byte 0x1 + .byte 0x3 + .long 0x25 + .uleb128 0x2 + .byte 0x91 + .sleb128 4 + .byte 0 + .uleb128 0xc + .long .LASF20 + .byte 0x1 + .byte 0xb + .long .LFB1 + .long .LFE1-.LFB1 + .uleb128 0x1 + .byte 0x9c + .uleb128 0xd + .long 0xb4 + .long 0x13c + .uleb128 0xe + .long 0x13c + .byte 0xff + .byte 0 + .uleb128 0x3 + .byte 0x4 + .byte 0x7 + .long .LASF14 + .uleb128 0xf + .string "idt" + .byte 0x3 + .byte 0x1f + .long 0x12c + .uleb128 0x5 + .byte 0x3 + .long idt + .uleb128 0x10 + .long .LASF15 + .byte 0x3 + .byte 0x20 + .long 0xe0 + .uleb128 0x5 + .byte 0x3 + .long idt_reg + .byte 0 + .section .debug_abbrev,"",@progbits +.Ldebug_abbrev0: + .uleb128 0x1 + .uleb128 0x11 + .byte 0x1 + .uleb128 0x25 + .uleb128 0xe + .uleb128 0x13 + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x1b + .uleb128 0xe + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x10 + .uleb128 0x17 + .byte 0 + .byte 0 + .uleb128 0x2 + .uleb128 0x16 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x3 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .byte 0 + .byte 0 + .uleb128 0x4 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0x8 + .byte 0 + .byte 0 + .uleb128 0x5 + .uleb128 0x13 + .byte 0x1 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x6 + .uleb128 0xd + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x38 + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0x7 + .uleb128 0xd + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x38 + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0x8 + .uleb128 0x16 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x9 + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2117 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xa + .uleb128 0x5 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0xb + .uleb128 0x5 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0xc + .uleb128 0x2e + .byte 0 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2117 + .uleb128 0x19 + .byte 0 + .byte 0 + .uleb128 0xd + .uleb128 0x1 + .byte 0x1 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xe + .uleb128 0x21 + .byte 0 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2f + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0xf + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0x10 + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .byte 0 + .section .debug_aranges,"",@progbits + .long 0x1c + .value 0x2 + .long .Ldebug_info0 + .byte 0x4 + .byte 0 + .value 0 + .value 0 + .long .Ltext0 + .long .Letext0-.Ltext0 + .long 0 + .long 0 + .section .debug_line,"",@progbits +.Ldebug_line0: + .section .debug_str,"MS",@progbits,1 +.LASF8: + .string "high_offset" +.LASF0: + .string "unsigned int" +.LASF17: + .string "./cpu/idt.c" +.LASF7: + .string "flags" +.LASF9: + .string "idt_gate_t" +.LASF13: + .string "handler" +.LASF18: + .string "/home/os/OS_Project/Part4/10_scheduler" +.LASF10: + .string "limit" +.LASF12: + .string "idt_register_t" +.LASF11: + .string "base" +.LASF6: + .string "always0" +.LASF4: + .string "char" +.LASF19: + .string "set_idt_gate" +.LASF5: + .string "low_offset" +.LASF16: + .string "GNU C11 5.4.0 20160609 -m32 -mtune=generic -march=i686 -g -fno-pie -ffreestanding -fno-builtin -fno-stack-protector" +.LASF1: + .string "short unsigned int" +.LASF3: + .string "unsigned char" +.LASF2: + .string "short int" +.LASF15: + .string "idt_reg" +.LASF20: + .string "set_idt" +.LASF14: + .string "sizetype" + .ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609" + .section .note.GNU-stack,"",@progbits diff --git a/Part4/10_scheduler/interrupt.o b/Part4/10_scheduler/interrupt.o new file mode 100644 index 0000000000000000000000000000000000000000..67b173a4f71b53a8bb8239a7f14b21ea18f5763b GIT binary patch literal 2128 zcmb7_Z)lZO9LLYy-QDigxj8eN&T1`}HFvk?nR8YM6DsMCl0`I0Sa-VNJ?+jt=iY^X z5CxH-?1B^sg@r_D^kNW5g)dYL!WYsDUu1-2MCgy_)m}v4wDtY{?s?`<=uHRC`F%d; zp6~B@ww-N&x{%LAFPwQ#?+ab>XWPxV3?RI6scUyqvh z%w-VLr964JCD>DOGl_FNYq6if*FCk;RZlDE zvZs}F-cuW$^|Xq<_Vh5F^7IIu@boBsBb2i3bVjJgK1QDjrELd&EL3YBr}u?2b~POq zsV4&VoD9DITQFbp8_nqV8hD%XH^D>7cYueL=fPvjnTyKb0hg6ef)6O40v}br zAN-;6L*Nt2`RwP)KLDRrejGfloU`95KM6js{0s19Rx zR{4+MjQ=6>_xB3CNjX2ORrxRQ4&}eWyOsY5A5b2{H!0_Ld0F}2@Hdp-g%2xFgA2;D z;F9u2@ImD*;P;d-2On472L4oeJNQfGo#1KZUEuGP^WXhT%KO1rls^mpSvi00zboGi zj+Ji#|E2tO@SJj!>)AOu)l--#k2*IsSE~rVF9W=6;N@vvf@(xEfrJ7{1riG+7f3LWWFXN% zvY}+d>hmNUN;Z^iDA`c5p=3kJhLY`*Y#*{N0=h^DO`y literal 0 HcmV?d00001 diff --git a/Part4/10_scheduler/isr.s b/Part4/10_scheduler/isr.s new file mode 100644 index 0000000..60533ae --- /dev/null +++ b/Part4/10_scheduler/isr.s @@ -0,0 +1,1518 @@ + .file "isr.c" + .text +.Ltext0: + .comm idt,2048,32 + .comm idt_reg,6,4 + .comm interrupt_handlers,1024,32 + .globl isr_install + .type isr_install, @function +isr_install: +.LFB0: + .file 1 "./cpu/isr.c" + .loc 1 13 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $8, %esp + .loc 1 14 0 + movl $isr0, %eax + subl $8, %esp + pushl %eax + pushl $0 + call set_idt_gate + addl $16, %esp + .loc 1 15 0 + movl $isr1, %eax + subl $8, %esp + pushl %eax + pushl $1 + call set_idt_gate + addl $16, %esp + .loc 1 16 0 + movl $isr2, %eax + subl $8, %esp + pushl %eax + pushl $2 + call set_idt_gate + addl $16, %esp + .loc 1 17 0 + movl $isr3, %eax + subl $8, %esp + pushl %eax + pushl $3 + call set_idt_gate + addl $16, %esp + .loc 1 18 0 + movl $isr4, %eax + subl $8, %esp + pushl %eax + pushl $4 + call set_idt_gate + addl $16, %esp + .loc 1 19 0 + movl $isr5, %eax + subl $8, %esp + pushl %eax + pushl $5 + call set_idt_gate + addl $16, %esp + .loc 1 20 0 + movl $isr6, %eax + subl $8, %esp + pushl %eax + pushl $6 + call set_idt_gate + addl $16, %esp + .loc 1 21 0 + movl $isr7, %eax + subl $8, %esp + pushl %eax + pushl $7 + call set_idt_gate + addl $16, %esp + .loc 1 22 0 + movl $isr8, %eax + subl $8, %esp + pushl %eax + pushl $8 + call set_idt_gate + addl $16, %esp + .loc 1 23 0 + movl $isr9, %eax + subl $8, %esp + pushl %eax + pushl $9 + call set_idt_gate + addl $16, %esp + .loc 1 24 0 + movl $isr10, %eax + subl $8, %esp + pushl %eax + pushl $10 + call set_idt_gate + addl $16, %esp + .loc 1 25 0 + movl $isr11, %eax + subl $8, %esp + pushl %eax + pushl $11 + call set_idt_gate + addl $16, %esp + .loc 1 26 0 + movl $isr12, %eax + subl $8, %esp + pushl %eax + pushl $12 + call set_idt_gate + addl $16, %esp + .loc 1 27 0 + movl $isr13, %eax + subl $8, %esp + pushl %eax + pushl $13 + call set_idt_gate + addl $16, %esp + .loc 1 28 0 + movl $isr14, %eax + subl $8, %esp + pushl %eax + pushl $14 + call set_idt_gate + addl $16, %esp + .loc 1 29 0 + movl $isr15, %eax + subl $8, %esp + pushl %eax + pushl $15 + call set_idt_gate + addl $16, %esp + .loc 1 30 0 + movl $isr16, %eax + subl $8, %esp + pushl %eax + pushl $16 + call set_idt_gate + addl $16, %esp + .loc 1 31 0 + movl $isr17, %eax + subl $8, %esp + pushl %eax + pushl $17 + call set_idt_gate + addl $16, %esp + .loc 1 32 0 + movl $isr18, %eax + subl $8, %esp + pushl %eax + pushl $18 + call set_idt_gate + addl $16, %esp + .loc 1 33 0 + movl $isr19, %eax + subl $8, %esp + pushl %eax + pushl $19 + call set_idt_gate + addl $16, %esp + .loc 1 34 0 + movl $isr20, %eax + subl $8, %esp + pushl %eax + pushl $20 + call set_idt_gate + addl $16, %esp + .loc 1 35 0 + movl $isr21, %eax + subl $8, %esp + pushl %eax + pushl $21 + call set_idt_gate + addl $16, %esp + .loc 1 36 0 + movl $isr22, %eax + subl $8, %esp + pushl %eax + pushl $22 + call set_idt_gate + addl $16, %esp + .loc 1 37 0 + movl $isr23, %eax + subl $8, %esp + pushl %eax + pushl $23 + call set_idt_gate + addl $16, %esp + .loc 1 38 0 + movl $isr24, %eax + subl $8, %esp + pushl %eax + pushl $24 + call set_idt_gate + addl $16, %esp + .loc 1 39 0 + movl $isr25, %eax + subl $8, %esp + pushl %eax + pushl $25 + call set_idt_gate + addl $16, %esp + .loc 1 40 0 + movl $isr26, %eax + subl $8, %esp + pushl %eax + pushl $26 + call set_idt_gate + addl $16, %esp + .loc 1 41 0 + movl $isr27, %eax + subl $8, %esp + pushl %eax + pushl $27 + call set_idt_gate + addl $16, %esp + .loc 1 42 0 + movl $isr28, %eax + subl $8, %esp + pushl %eax + pushl $28 + call set_idt_gate + addl $16, %esp + .loc 1 43 0 + movl $isr29, %eax + subl $8, %esp + pushl %eax + pushl $29 + call set_idt_gate + addl $16, %esp + .loc 1 44 0 + movl $isr30, %eax + subl $8, %esp + pushl %eax + pushl $30 + call set_idt_gate + addl $16, %esp + .loc 1 45 0 + movl $isr31, %eax + subl $8, %esp + pushl %eax + pushl $31 + call set_idt_gate + addl $16, %esp + .loc 1 48 0 + subl $8, %esp + pushl $17 + pushl $32 + call port_byte_out + addl $16, %esp + .loc 1 49 0 + subl $8, %esp + pushl $17 + pushl $160 + call port_byte_out + addl $16, %esp + .loc 1 50 0 + subl $8, %esp + pushl $32 + pushl $33 + call port_byte_out + addl $16, %esp + .loc 1 51 0 + subl $8, %esp + pushl $40 + pushl $161 + call port_byte_out + addl $16, %esp + .loc 1 52 0 + subl $8, %esp + pushl $4 + pushl $33 + call port_byte_out + addl $16, %esp + .loc 1 53 0 + subl $8, %esp + pushl $2 + pushl $161 + call port_byte_out + addl $16, %esp + .loc 1 54 0 + subl $8, %esp + pushl $1 + pushl $33 + call port_byte_out + addl $16, %esp + .loc 1 55 0 + subl $8, %esp + pushl $1 + pushl $161 + call port_byte_out + addl $16, %esp + .loc 1 56 0 + subl $8, %esp + pushl $0 + pushl $33 + call port_byte_out + addl $16, %esp + .loc 1 57 0 + subl $8, %esp + pushl $0 + pushl $161 + call port_byte_out + addl $16, %esp + .loc 1 60 0 + movl $irq0, %eax + subl $8, %esp + pushl %eax + pushl $32 + call set_idt_gate + addl $16, %esp + .loc 1 61 0 + movl $irq1, %eax + subl $8, %esp + pushl %eax + pushl $33 + call set_idt_gate + addl $16, %esp + .loc 1 62 0 + movl $irq2, %eax + subl $8, %esp + pushl %eax + pushl $34 + call set_idt_gate + addl $16, %esp + .loc 1 63 0 + movl $irq3, %eax + subl $8, %esp + pushl %eax + pushl $35 + call set_idt_gate + addl $16, %esp + .loc 1 64 0 + movl $irq4, %eax + subl $8, %esp + pushl %eax + pushl $36 + call set_idt_gate + addl $16, %esp + .loc 1 65 0 + movl $irq5, %eax + subl $8, %esp + pushl %eax + pushl $37 + call set_idt_gate + addl $16, %esp + .loc 1 66 0 + movl $irq6, %eax + subl $8, %esp + pushl %eax + pushl $38 + call set_idt_gate + addl $16, %esp + .loc 1 67 0 + movl $irq7, %eax + subl $8, %esp + pushl %eax + pushl $39 + call set_idt_gate + addl $16, %esp + .loc 1 68 0 + movl $irq8, %eax + subl $8, %esp + pushl %eax + pushl $40 + call set_idt_gate + addl $16, %esp + .loc 1 69 0 + movl $irq9, %eax + subl $8, %esp + pushl %eax + pushl $41 + call set_idt_gate + addl $16, %esp + .loc 1 70 0 + movl $irq10, %eax + subl $8, %esp + pushl %eax + pushl $42 + call set_idt_gate + addl $16, %esp + .loc 1 71 0 + movl $irq11, %eax + subl $8, %esp + pushl %eax + pushl $43 + call set_idt_gate + addl $16, %esp + .loc 1 72 0 + movl $irq12, %eax + subl $8, %esp + pushl %eax + pushl $44 + call set_idt_gate + addl $16, %esp + .loc 1 73 0 + movl $irq13, %eax + subl $8, %esp + pushl %eax + pushl $45 + call set_idt_gate + addl $16, %esp + .loc 1 74 0 + movl $irq14, %eax + subl $8, %esp + pushl %eax + pushl $46 + call set_idt_gate + addl $16, %esp + .loc 1 75 0 + movl $irq15, %eax + subl $8, %esp + pushl %eax + pushl $47 + call set_idt_gate + addl $16, %esp + .loc 1 77 0 + call set_idt + .loc 1 78 0 + nop + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE0: + .size isr_install, .-isr_install + .globl exception_messages + .section .rodata +.LC0: + .string "Division By Zero" +.LC1: + .string "Debug" +.LC2: + .string "Non Maskable Interrupt" +.LC3: + .string "Breakpoint" +.LC4: + .string "Into Detected Overflow" +.LC5: + .string "Out of Bounds" +.LC6: + .string "Invalid Opcode" +.LC7: + .string "No Coprocessor" +.LC8: + .string "Double Fault" +.LC9: + .string "Coprocessor Segment Overrun" +.LC10: + .string "Bad TSS" +.LC11: + .string "Segment Not Present" +.LC12: + .string "Stack Fault" +.LC13: + .string "General Protection Fault" +.LC14: + .string "Page Fault" +.LC15: + .string "Unknown Interrupt" +.LC16: + .string "Coprocessor Fault" +.LC17: + .string "Alignment Check" +.LC18: + .string "Machine Check" +.LC19: + .string "Reserved" + .data + .align 32 + .type exception_messages, @object + .size exception_messages, 128 +exception_messages: + .long .LC0 + .long .LC1 + .long .LC2 + .long .LC3 + .long .LC4 + .long .LC5 + .long .LC6 + .long .LC7 + .long .LC8 + .long .LC9 + .long .LC10 + .long .LC11 + .long .LC12 + .long .LC13 + .long .LC14 + .long .LC15 + .long .LC16 + .long .LC17 + .long .LC18 + .long .LC19 + .long .LC19 + .long .LC19 + .long .LC19 + .long .LC19 + .long .LC19 + .long .LC19 + .long .LC19 + .long .LC19 + .long .LC19 + .long .LC19 + .long .LC19 + .long .LC19 + .section .rodata +.LC20: + .string "received interrupt: " +.LC21: + .string "\n" + .text + .globl isr_handler + .type isr_handler, @function +isr_handler: +.LFB1: + .loc 1 119 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $24, %esp + .loc 1 120 0 + subl $12, %esp + pushl $.LC20 + call kprint + addl $16, %esp + .loc 1 122 0 + movl 44(%ebp), %eax + movl %eax, %edx + subl $8, %esp + leal -11(%ebp), %eax + pushl %eax + pushl %edx + call int_to_ascii + addl $16, %esp + .loc 1 123 0 + subl $12, %esp + leal -11(%ebp), %eax + pushl %eax + call kprint + addl $16, %esp + .loc 1 124 0 + subl $12, %esp + pushl $.LC21 + call kprint + addl $16, %esp + .loc 1 125 0 + movl 44(%ebp), %eax + movl exception_messages(,%eax,4), %eax + subl $12, %esp + pushl %eax + call kprint + addl $16, %esp + .loc 1 126 0 + subl $12, %esp + pushl $.LC21 + call kprint + addl $16, %esp + .loc 1 127 0 + nop + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE1: + .size isr_handler, .-isr_handler + .globl register_interrupt_handler + .type register_interrupt_handler, @function +register_interrupt_handler: +.LFB2: + .loc 1 129 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $4, %esp + movl 8(%ebp), %eax + movb %al, -4(%ebp) + .loc 1 130 0 + movzbl -4(%ebp), %eax + movl 12(%ebp), %edx + movl %edx, interrupt_handlers(,%eax,4) + .loc 1 131 0 + nop + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE2: + .size register_interrupt_handler, .-register_interrupt_handler + .globl irq_handler + .type irq_handler, @function +irq_handler: +.LFB3: + .loc 1 133 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $24, %esp + .loc 1 136 0 + movl 44(%ebp), %eax + cmpl $39, %eax + jbe .L5 + .loc 1 136 0 is_stmt 0 discriminator 1 + subl $8, %esp + pushl $32 + pushl $160 + call port_byte_out + addl $16, %esp +.L5: + .loc 1 137 0 is_stmt 1 + subl $8, %esp + pushl $32 + pushl $32 + call port_byte_out + addl $16, %esp + .loc 1 140 0 + movl 44(%ebp), %eax + movl interrupt_handlers(,%eax,4), %eax + testl %eax, %eax + je .L7 +.LBB2: + .loc 1 141 0 + movl 44(%ebp), %eax + movl interrupt_handlers(,%eax,4), %eax + movl %eax, -12(%ebp) + .loc 1 142 0 + pushl 68(%ebp) + pushl 64(%ebp) + pushl 60(%ebp) + pushl 56(%ebp) + pushl 52(%ebp) + pushl 48(%ebp) + pushl 44(%ebp) + pushl 40(%ebp) + pushl 36(%ebp) + pushl 32(%ebp) + pushl 28(%ebp) + pushl 24(%ebp) + pushl 20(%ebp) + pushl 16(%ebp) + pushl 12(%ebp) + pushl 8(%ebp) + movl -12(%ebp), %eax + call *%eax + addl $64, %esp +.L7: +.LBE2: + .loc 1 144 0 + nop + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE3: + .size irq_handler, .-irq_handler + .globl irq_install + .type irq_install, @function +irq_install: +.LFB4: + .loc 1 146 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $8, %esp + .loc 1 148 0 +#APP +# 148 "./cpu/isr.c" 1 + sti +# 0 "" 2 + .loc 1 150 0 +#NO_APP + subl $12, %esp + pushl $50 + call init_timer + addl $16, %esp + .loc 1 152 0 + call init_keyboard + .loc 1 153 0 + nop + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE4: + .size irq_install, .-irq_install +.Letext0: + .file 2 "./cpu/types.h" + .file 3 "./cpu/isr.h" + .file 4 "./cpu/idt.h" + .section .debug_info,"",@progbits +.Ldebug_info0: + .long 0x320 + .value 0x4 + .long .Ldebug_abbrev0 + .byte 0x4 + .uleb128 0x1 + .long .LASF29 + .byte 0xc + .long .LASF30 + .long .LASF31 + .long .Ltext0 + .long .Letext0-.Ltext0 + .long .Ldebug_line0 + .uleb128 0x2 + .string "u32" + .byte 0x2 + .byte 0x6 + .long 0x30 + .uleb128 0x3 + .byte 0x4 + .byte 0x7 + .long .LASF0 + .uleb128 0x4 + .byte 0x4 + .byte 0x5 + .string "int" + .uleb128 0x2 + .string "u16" + .byte 0x2 + .byte 0x8 + .long 0x49 + .uleb128 0x3 + .byte 0x2 + .byte 0x7 + .long .LASF1 + .uleb128 0x3 + .byte 0x2 + .byte 0x5 + .long .LASF2 + .uleb128 0x2 + .string "u8" + .byte 0x2 + .byte 0xa + .long 0x61 + .uleb128 0x3 + .byte 0x1 + .byte 0x8 + .long .LASF3 + .uleb128 0x3 + .byte 0x1 + .byte 0x6 + .long .LASF4 + .uleb128 0x5 + .byte 0x40 + .byte 0x3 + .byte 0x4b + .long 0x135 + .uleb128 0x6 + .string "ds" + .byte 0x3 + .byte 0x4c + .long 0x25 + .byte 0 + .uleb128 0x6 + .string "edi" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x4 + .uleb128 0x6 + .string "esi" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x8 + .uleb128 0x6 + .string "ebp" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0xc + .uleb128 0x6 + .string "esp" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x10 + .uleb128 0x6 + .string "ebx" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x14 + .uleb128 0x6 + .string "edx" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x18 + .uleb128 0x6 + .string "ecx" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x1c + .uleb128 0x6 + .string "eax" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x20 + .uleb128 0x7 + .long .LASF5 + .byte 0x3 + .byte 0x4e + .long 0x25 + .byte 0x24 + .uleb128 0x7 + .long .LASF6 + .byte 0x3 + .byte 0x4e + .long 0x25 + .byte 0x28 + .uleb128 0x6 + .string "eip" + .byte 0x3 + .byte 0x4f + .long 0x25 + .byte 0x2c + .uleb128 0x6 + .string "cs" + .byte 0x3 + .byte 0x4f + .long 0x25 + .byte 0x30 + .uleb128 0x7 + .long .LASF7 + .byte 0x3 + .byte 0x4f + .long 0x25 + .byte 0x34 + .uleb128 0x7 + .long .LASF8 + .byte 0x3 + .byte 0x4f + .long 0x25 + .byte 0x38 + .uleb128 0x6 + .string "ss" + .byte 0x3 + .byte 0x4f + .long 0x25 + .byte 0x3c + .byte 0 + .uleb128 0x8 + .long .LASF9 + .byte 0x3 + .byte 0x50 + .long 0x6f + .uleb128 0x8 + .long .LASF10 + .byte 0x3 + .byte 0x56 + .long 0x14b + .uleb128 0x9 + .byte 0x4 + .long 0x151 + .uleb128 0xa + .long 0x15c + .uleb128 0xb + .long 0x135 + .byte 0 + .uleb128 0x5 + .byte 0x8 + .byte 0x4 + .byte 0xa + .long 0x1a1 + .uleb128 0x7 + .long .LASF11 + .byte 0x4 + .byte 0xb + .long 0x3e + .byte 0 + .uleb128 0x6 + .string "sel" + .byte 0x4 + .byte 0xc + .long 0x3e + .byte 0x2 + .uleb128 0x7 + .long .LASF12 + .byte 0x4 + .byte 0xd + .long 0x57 + .byte 0x4 + .uleb128 0x7 + .long .LASF13 + .byte 0x4 + .byte 0x13 + .long 0x57 + .byte 0x5 + .uleb128 0x7 + .long .LASF14 + .byte 0x4 + .byte 0x14 + .long 0x3e + .byte 0x6 + .byte 0 + .uleb128 0x8 + .long .LASF15 + .byte 0x4 + .byte 0x15 + .long 0x15c + .uleb128 0x5 + .byte 0x6 + .byte 0x4 + .byte 0x19 + .long 0x1cd + .uleb128 0x7 + .long .LASF16 + .byte 0x4 + .byte 0x1a + .long 0x3e + .byte 0 + .uleb128 0x7 + .long .LASF17 + .byte 0x4 + .byte 0x1b + .long 0x25 + .byte 0x2 + .byte 0 + .uleb128 0x8 + .long .LASF18 + .byte 0x4 + .byte 0x1c + .long 0x1ac + .uleb128 0xc + .long .LASF24 + .byte 0x1 + .byte 0xd + .long .LFB0 + .long .LFE0-.LFB0 + .uleb128 0x1 + .byte 0x9c + .uleb128 0xd + .long .LASF20 + .byte 0x1 + .byte 0x77 + .long .LFB1 + .long .LFE1-.LFB1 + .uleb128 0x1 + .byte 0x9c + .long 0x217 + .uleb128 0xe + .string "r" + .byte 0x1 + .byte 0x77 + .long 0x135 + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .uleb128 0xf + .string "s" + .byte 0x1 + .byte 0x79 + .long 0x217 + .uleb128 0x2 + .byte 0x91 + .sleb128 -19 + .byte 0 + .uleb128 0x10 + .long 0x68 + .long 0x227 + .uleb128 0x11 + .long 0x227 + .byte 0x2 + .byte 0 + .uleb128 0x3 + .byte 0x4 + .byte 0x7 + .long .LASF19 + .uleb128 0x12 + .long .LASF21 + .byte 0x1 + .byte 0x81 + .long .LFB2 + .long .LFE2-.LFB2 + .uleb128 0x1 + .byte 0x9c + .long 0x25e + .uleb128 0xe + .string "n" + .byte 0x1 + .byte 0x81 + .long 0x57 + .uleb128 0x2 + .byte 0x91 + .sleb128 -12 + .uleb128 0x13 + .long .LASF22 + .byte 0x1 + .byte 0x81 + .long 0x140 + .uleb128 0x2 + .byte 0x91 + .sleb128 4 + .byte 0 + .uleb128 0xd + .long .LASF23 + .byte 0x1 + .byte 0x85 + .long .LFB3 + .long .LFE3-.LFB3 + .uleb128 0x1 + .byte 0x9c + .long 0x298 + .uleb128 0xe + .string "r" + .byte 0x1 + .byte 0x85 + .long 0x135 + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .uleb128 0x14 + .long .LBB2 + .long .LBE2-.LBB2 + .uleb128 0x15 + .long .LASF22 + .byte 0x1 + .byte 0x8d + .long 0x140 + .uleb128 0x2 + .byte 0x91 + .sleb128 -20 + .byte 0 + .byte 0 + .uleb128 0xc + .long .LASF25 + .byte 0x1 + .byte 0x92 + .long .LFB4 + .long .LFE4-.LFB4 + .uleb128 0x1 + .byte 0x9c + .uleb128 0x10 + .long 0x1a1 + .long 0x2b9 + .uleb128 0x11 + .long 0x227 + .byte 0xff + .byte 0 + .uleb128 0x16 + .string "idt" + .byte 0x4 + .byte 0x1f + .long 0x2a9 + .uleb128 0x5 + .byte 0x3 + .long idt + .uleb128 0x17 + .long .LASF26 + .byte 0x4 + .byte 0x20 + .long 0x1cd + .uleb128 0x5 + .byte 0x3 + .long idt_reg + .uleb128 0x10 + .long 0x140 + .long 0x2eb + .uleb128 0x11 + .long 0x227 + .byte 0xff + .byte 0 + .uleb128 0x17 + .long .LASF27 + .byte 0x1 + .byte 0x9 + .long 0x2db + .uleb128 0x5 + .byte 0x3 + .long interrupt_handlers + .uleb128 0x10 + .long 0x30c + .long 0x30c + .uleb128 0x11 + .long 0x227 + .byte 0x1f + .byte 0 + .uleb128 0x9 + .byte 0x4 + .long 0x68 + .uleb128 0x17 + .long .LASF28 + .byte 0x1 + .byte 0x51 + .long 0x2fc + .uleb128 0x5 + .byte 0x3 + .long exception_messages + .byte 0 + .section .debug_abbrev,"",@progbits +.Ldebug_abbrev0: + .uleb128 0x1 + .uleb128 0x11 + .byte 0x1 + .uleb128 0x25 + .uleb128 0xe + .uleb128 0x13 + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x1b + .uleb128 0xe + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x10 + .uleb128 0x17 + .byte 0 + .byte 0 + .uleb128 0x2 + .uleb128 0x16 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x3 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .byte 0 + .byte 0 + .uleb128 0x4 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0x8 + .byte 0 + .byte 0 + .uleb128 0x5 + .uleb128 0x13 + .byte 0x1 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x6 + .uleb128 0xd + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x38 + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0x7 + .uleb128 0xd + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x38 + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0x8 + .uleb128 0x16 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x9 + .uleb128 0xf + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xa + .uleb128 0x15 + .byte 0x1 + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xb + .uleb128 0x5 + .byte 0 + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xc + .uleb128 0x2e + .byte 0 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2116 + .uleb128 0x19 + .byte 0 + .byte 0 + .uleb128 0xd + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2116 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xe + .uleb128 0x5 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0xf + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0x10 + .uleb128 0x1 + .byte 0x1 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x11 + .uleb128 0x21 + .byte 0 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2f + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0x12 + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2117 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x13 + .uleb128 0x5 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0x14 + .uleb128 0xb + .byte 0x1 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .byte 0 + .byte 0 + .uleb128 0x15 + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0x16 + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0x17 + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .byte 0 + .section .debug_aranges,"",@progbits + .long 0x1c + .value 0x2 + .long .Ldebug_info0 + .byte 0x4 + .byte 0 + .value 0 + .value 0 + .long .Ltext0 + .long .Letext0-.Ltext0 + .long 0 + .long 0 + .section .debug_line,"",@progbits +.Ldebug_line0: + .section .debug_str,"MS",@progbits,1 +.LASF15: + .string "idt_gate_t" +.LASF25: + .string "irq_install" +.LASF27: + .string "interrupt_handlers" +.LASF21: + .string "register_interrupt_handler" +.LASF5: + .string "int_no" +.LASF23: + .string "irq_handler" +.LASF8: + .string "useresp" +.LASF26: + .string "idt_reg" +.LASF12: + .string "always0" +.LASF3: + .string "unsigned char" +.LASF24: + .string "isr_install" +.LASF22: + .string "handler" +.LASF17: + .string "base" +.LASF1: + .string "short unsigned int" +.LASF30: + .string "./cpu/isr.c" +.LASF20: + .string "isr_handler" +.LASF0: + .string "unsigned int" +.LASF13: + .string "flags" +.LASF4: + .string "char" +.LASF29: + .string "GNU C11 5.4.0 20160609 -m32 -mtune=generic -march=i686 -g -fno-pie -ffreestanding -fno-builtin -fno-stack-protector" +.LASF16: + .string "limit" +.LASF9: + .string "registers_t" +.LASF19: + .string "sizetype" +.LASF7: + .string "eflags" +.LASF31: + .string "/home/os/OS_Project/Part4/10_scheduler" +.LASF6: + .string "err_code" +.LASF28: + .string "exception_messages" +.LASF2: + .string "short int" +.LASF10: + .string "isr_t" +.LASF14: + .string "high_offset" +.LASF18: + .string "idt_register_t" +.LASF11: + .string "low_offset" + .ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609" + .section .note.GNU-stack,"",@progbits diff --git a/Part4/10_scheduler/keyboard.s b/Part4/10_scheduler/keyboard.s new file mode 100644 index 0000000..bb05bb6 --- /dev/null +++ b/Part4/10_scheduler/keyboard.s @@ -0,0 +1,965 @@ + .file "keyboard.c" + .text +.Ltext0: + .local key_buffer + .comm key_buffer,256,32 + .globl sc_name + .section .rodata +.LC0: + .string "ERROR" +.LC1: + .string "Esc" +.LC2: + .string "1" +.LC3: + .string "2" +.LC4: + .string "3" +.LC5: + .string "4" +.LC6: + .string "5" +.LC7: + .string "6" +.LC8: + .string "7" +.LC9: + .string "8" +.LC10: + .string "9" +.LC11: + .string "0" +.LC12: + .string "-" +.LC13: + .string "=" +.LC14: + .string "Backspace" +.LC15: + .string "Tab" +.LC16: + .string "Q" +.LC17: + .string "W" +.LC18: + .string "E" +.LC19: + .string "R" +.LC20: + .string "T" +.LC21: + .string "Y" +.LC22: + .string "U" +.LC23: + .string "I" +.LC24: + .string "O" +.LC25: + .string "P" +.LC26: + .string "[" +.LC27: + .string "]" +.LC28: + .string "Enter" +.LC29: + .string "Lctrl" +.LC30: + .string "A" +.LC31: + .string "S" +.LC32: + .string "D" +.LC33: + .string "F" +.LC34: + .string "G" +.LC35: + .string "H" +.LC36: + .string "J" +.LC37: + .string "K" +.LC38: + .string "L" +.LC39: + .string ";" +.LC40: + .string "'" +.LC41: + .string "`" +.LC42: + .string "LShift" +.LC43: + .string "\\" +.LC44: + .string "Z" +.LC45: + .string "X" +.LC46: + .string "C" +.LC47: + .string "V" +.LC48: + .string "B" +.LC49: + .string "N" +.LC50: + .string "M" +.LC51: + .string "," +.LC52: + .string "." +.LC53: + .string "/" +.LC54: + .string "RShift" +.LC55: + .string "Keypad *" +.LC56: + .string "LAlt" +.LC57: + .string "Spacebar" + .data + .align 32 + .type sc_name, @object + .size sc_name, 232 +sc_name: + .long .LC0 + .long .LC1 + .long .LC2 + .long .LC3 + .long .LC4 + .long .LC5 + .long .LC6 + .long .LC7 + .long .LC8 + .long .LC9 + .long .LC10 + .long .LC11 + .long .LC12 + .long .LC13 + .long .LC14 + .long .LC15 + .long .LC16 + .long .LC17 + .long .LC18 + .long .LC19 + .long .LC20 + .long .LC21 + .long .LC22 + .long .LC23 + .long .LC24 + .long .LC25 + .long .LC26 + .long .LC27 + .long .LC28 + .long .LC29 + .long .LC30 + .long .LC31 + .long .LC32 + .long .LC33 + .long .LC34 + .long .LC35 + .long .LC36 + .long .LC37 + .long .LC38 + .long .LC39 + .long .LC40 + .long .LC41 + .long .LC42 + .long .LC43 + .long .LC44 + .long .LC45 + .long .LC46 + .long .LC47 + .long .LC48 + .long .LC49 + .long .LC50 + .long .LC51 + .long .LC52 + .long .LC53 + .long .LC54 + .long .LC55 + .long .LC56 + .long .LC57 + .globl sc_ascii + .section .rodata + .align 32 + .type sc_ascii, @object + .size sc_ascii, 58 +sc_ascii: + .byte 63 + .byte 63 + .byte 49 + .byte 50 + .byte 51 + .byte 52 + .byte 53 + .byte 54 + .byte 55 + .byte 56 + .byte 57 + .byte 48 + .byte 45 + .byte 61 + .byte 63 + .byte 63 + .byte 81 + .byte 87 + .byte 69 + .byte 82 + .byte 84 + .byte 89 + .byte 85 + .byte 73 + .byte 79 + .byte 80 + .byte 91 + .byte 93 + .byte 63 + .byte 63 + .byte 65 + .byte 83 + .byte 68 + .byte 70 + .byte 71 + .byte 72 + .byte 74 + .byte 75 + .byte 76 + .byte 59 + .byte 39 + .byte 96 + .byte 63 + .byte 92 + .byte 90 + .byte 88 + .byte 67 + .byte 86 + .byte 66 + .byte 78 + .byte 77 + .byte 44 + .byte 46 + .byte 47 + .byte 63 + .byte 63 + .byte 63 + .byte 32 +.LC58: + .string "\n" + .text + .type keyboard_callback, @function +keyboard_callback: +.LFB0: + .file 1 "./drivers/keyboard.c" + .loc 1 27 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $24, %esp + .loc 1 29 0 + subl $12, %esp + pushl $96 + call port_byte_in + addl $16, %esp + movb %al, -9(%ebp) + .loc 1 31 0 + cmpb $57, -9(%ebp) + ja .L6 + .loc 1 32 0 + cmpb $14, -9(%ebp) + jne .L4 + .loc 1 33 0 + subl $12, %esp + pushl $key_buffer + call backspace + addl $16, %esp + .loc 1 34 0 + call kprint_backspace + jmp .L1 +.L4: + .loc 1 35 0 + cmpb $28, -9(%ebp) + jne .L5 + .loc 1 36 0 + subl $12, %esp + pushl $.LC58 + call kprint + addl $16, %esp + .loc 1 37 0 + subl $12, %esp + pushl $key_buffer + call user_input + addl $16, %esp + .loc 1 38 0 + movb $0, key_buffer + jmp .L1 +.L5: +.LBB2: + .loc 1 40 0 discriminator 2 + movzbl -9(%ebp), %eax + movzbl sc_ascii(%eax), %eax + movb %al, -10(%ebp) + .loc 1 42 0 discriminator 2 + movzbl -10(%ebp), %eax + movb %al, -12(%ebp) + movb $0, -11(%ebp) + .loc 1 43 0 discriminator 2 + movsbl -10(%ebp), %eax + subl $8, %esp + pushl %eax + pushl $key_buffer + call append + addl $16, %esp + .loc 1 44 0 discriminator 2 + subl $12, %esp + leal -12(%ebp), %eax + pushl %eax + call kprint + addl $16, %esp + jmp .L1 +.L6: +.LBE2: + .loc 1 31 0 + nop +.L1: + .loc 1 47 0 + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE0: + .size keyboard_callback, .-keyboard_callback + .globl init_keyboard + .type init_keyboard, @function +init_keyboard: +.LFB1: + .loc 1 49 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $8, %esp + .loc 1 50 0 + subl $8, %esp + pushl $keyboard_callback + pushl $33 + call register_interrupt_handler + addl $16, %esp + .loc 1 51 0 + nop + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE1: + .size init_keyboard, .-init_keyboard +.Letext0: + .file 2 "./drivers/../cpu/types.h" + .file 3 "./drivers/../cpu/isr.h" + .section .debug_info,"",@progbits +.Ldebug_info0: + .long 0x225 + .value 0x4 + .long .Ldebug_abbrev0 + .byte 0x4 + .uleb128 0x1 + .long .LASF16 + .byte 0xc + .long .LASF17 + .long .LASF18 + .long .Ltext0 + .long .Letext0-.Ltext0 + .long .Ldebug_line0 + .uleb128 0x2 + .string "u32" + .byte 0x2 + .byte 0x6 + .long 0x30 + .uleb128 0x3 + .byte 0x4 + .byte 0x7 + .long .LASF0 + .uleb128 0x4 + .byte 0x4 + .byte 0x5 + .string "int" + .uleb128 0x3 + .byte 0x2 + .byte 0x7 + .long .LASF1 + .uleb128 0x3 + .byte 0x2 + .byte 0x5 + .long .LASF2 + .uleb128 0x2 + .string "u8" + .byte 0x2 + .byte 0xa + .long 0x56 + .uleb128 0x3 + .byte 0x1 + .byte 0x8 + .long .LASF3 + .uleb128 0x3 + .byte 0x1 + .byte 0x6 + .long .LASF4 + .uleb128 0x5 + .byte 0x40 + .byte 0x3 + .byte 0x4b + .long 0x12a + .uleb128 0x6 + .string "ds" + .byte 0x3 + .byte 0x4c + .long 0x25 + .byte 0 + .uleb128 0x6 + .string "edi" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x4 + .uleb128 0x6 + .string "esi" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x8 + .uleb128 0x6 + .string "ebp" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0xc + .uleb128 0x6 + .string "esp" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x10 + .uleb128 0x6 + .string "ebx" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x14 + .uleb128 0x6 + .string "edx" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x18 + .uleb128 0x6 + .string "ecx" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x1c + .uleb128 0x6 + .string "eax" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x20 + .uleb128 0x7 + .long .LASF5 + .byte 0x3 + .byte 0x4e + .long 0x25 + .byte 0x24 + .uleb128 0x7 + .long .LASF6 + .byte 0x3 + .byte 0x4e + .long 0x25 + .byte 0x28 + .uleb128 0x6 + .string "eip" + .byte 0x3 + .byte 0x4f + .long 0x25 + .byte 0x2c + .uleb128 0x6 + .string "cs" + .byte 0x3 + .byte 0x4f + .long 0x25 + .byte 0x30 + .uleb128 0x7 + .long .LASF7 + .byte 0x3 + .byte 0x4f + .long 0x25 + .byte 0x34 + .uleb128 0x7 + .long .LASF8 + .byte 0x3 + .byte 0x4f + .long 0x25 + .byte 0x38 + .uleb128 0x6 + .string "ss" + .byte 0x3 + .byte 0x4f + .long 0x25 + .byte 0x3c + .byte 0 + .uleb128 0x8 + .long .LASF9 + .byte 0x3 + .byte 0x50 + .long 0x64 + .uleb128 0x9 + .long .LASF19 + .byte 0x1 + .byte 0x1b + .long .LFB0 + .long .LFE0-.LFB0 + .uleb128 0x1 + .byte 0x9c + .long 0x18d + .uleb128 0xa + .long .LASF20 + .byte 0x1 + .byte 0x1b + .long 0x12a + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .uleb128 0xb + .long .LASF10 + .byte 0x1 + .byte 0x1d + .long 0x4c + .uleb128 0x2 + .byte 0x91 + .sleb128 -17 + .uleb128 0xc + .long .LBB2 + .long .LBE2-.LBB2 + .uleb128 0xb + .long .LASF11 + .byte 0x1 + .byte 0x28 + .long 0x5d + .uleb128 0x2 + .byte 0x91 + .sleb128 -18 + .uleb128 0xd + .string "str" + .byte 0x1 + .byte 0x2a + .long 0x18d + .uleb128 0x2 + .byte 0x91 + .sleb128 -20 + .byte 0 + .byte 0 + .uleb128 0xe + .long 0x5d + .long 0x19d + .uleb128 0xf + .long 0x19d + .byte 0x1 + .byte 0 + .uleb128 0x3 + .byte 0x4 + .byte 0x7 + .long .LASF12 + .uleb128 0x10 + .long .LASF21 + .byte 0x1 + .byte 0x31 + .long .LFB1 + .long .LFE1-.LFB1 + .uleb128 0x1 + .byte 0x9c + .uleb128 0xe + .long 0x5d + .long 0x1c5 + .uleb128 0xf + .long 0x19d + .byte 0xff + .byte 0 + .uleb128 0xb + .long .LASF13 + .byte 0x1 + .byte 0xc + .long 0x1b5 + .uleb128 0x5 + .byte 0x3 + .long key_buffer + .uleb128 0xe + .long 0x1e6 + .long 0x1e6 + .uleb128 0xf + .long 0x19d + .byte 0x39 + .byte 0 + .uleb128 0x11 + .byte 0x4 + .long 0x1ec + .uleb128 0x12 + .long 0x5d + .uleb128 0x13 + .long .LASF14 + .byte 0x1 + .byte 0xf + .long 0x1d6 + .uleb128 0x5 + .byte 0x3 + .long sc_name + .uleb128 0xe + .long 0x1ec + .long 0x212 + .uleb128 0xf + .long 0x19d + .byte 0x39 + .byte 0 + .uleb128 0x13 + .long .LASF15 + .byte 0x1 + .byte 0x15 + .long 0x223 + .uleb128 0x5 + .byte 0x3 + .long sc_ascii + .uleb128 0x12 + .long 0x202 + .byte 0 + .section .debug_abbrev,"",@progbits +.Ldebug_abbrev0: + .uleb128 0x1 + .uleb128 0x11 + .byte 0x1 + .uleb128 0x25 + .uleb128 0xe + .uleb128 0x13 + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x1b + .uleb128 0xe + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x10 + .uleb128 0x17 + .byte 0 + .byte 0 + .uleb128 0x2 + .uleb128 0x16 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x3 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .byte 0 + .byte 0 + .uleb128 0x4 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0x8 + .byte 0 + .byte 0 + .uleb128 0x5 + .uleb128 0x13 + .byte 0x1 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x6 + .uleb128 0xd + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x38 + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0x7 + .uleb128 0xd + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x38 + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0x8 + .uleb128 0x16 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x9 + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2116 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xa + .uleb128 0x5 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0xb + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0xc + .uleb128 0xb + .byte 0x1 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .byte 0 + .byte 0 + .uleb128 0xd + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0xe + .uleb128 0x1 + .byte 0x1 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xf + .uleb128 0x21 + .byte 0 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2f + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0x10 + .uleb128 0x2e + .byte 0 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2116 + .uleb128 0x19 + .byte 0 + .byte 0 + .uleb128 0x11 + .uleb128 0xf + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x12 + .uleb128 0x26 + .byte 0 + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x13 + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .byte 0 + .section .debug_aranges,"",@progbits + .long 0x1c + .value 0x2 + .long .Ldebug_info0 + .byte 0x4 + .byte 0 + .value 0 + .value 0 + .long .Ltext0 + .long .Letext0-.Ltext0 + .long 0 + .long 0 + .section .debug_line,"",@progbits +.Ldebug_line0: + .section .debug_str,"MS",@progbits,1 +.LASF13: + .string "key_buffer" +.LASF10: + .string "scancode" +.LASF14: + .string "sc_name" +.LASF15: + .string "sc_ascii" +.LASF5: + .string "int_no" +.LASF8: + .string "useresp" +.LASF3: + .string "unsigned char" +.LASF1: + .string "short unsigned int" +.LASF17: + .string "./drivers/keyboard.c" +.LASF0: + .string "unsigned int" +.LASF4: + .string "char" +.LASF20: + .string "regs" +.LASF16: + .string "GNU C11 5.4.0 20160609 -m32 -mtune=generic -march=i686 -g -fno-pie -ffreestanding -fno-builtin -fno-stack-protector" +.LASF21: + .string "init_keyboard" +.LASF9: + .string "registers_t" +.LASF19: + .string "keyboard_callback" +.LASF7: + .string "eflags" +.LASF12: + .string "sizetype" +.LASF18: + .string "/home/os/OS_Project/Part4/10_scheduler" +.LASF6: + .string "err_code" +.LASF2: + .string "short int" +.LASF11: + .string "letter" + .ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609" + .section .note.GNU-stack,"",@progbits diff --git a/Part4/10_scheduler/mem.s b/Part4/10_scheduler/mem.s new file mode 100644 index 0000000..4268e60 --- /dev/null +++ b/Part4/10_scheduler/mem.s @@ -0,0 +1,673 @@ + .file "mem.c" + .text +.Ltext0: + .globl memory_copy + .type memory_copy, @function +memory_copy: +.LFB0: + .file 1 "./libc/mem.c" + .loc 1 3 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $16, %esp + .loc 1 5 0 + movl $0, -4(%ebp) + jmp .L2 +.L3: + .loc 1 6 0 discriminator 3 + movl -4(%ebp), %edx + movl 12(%ebp), %eax + addl %eax, %edx + movl -4(%ebp), %ecx + movl 8(%ebp), %eax + addl %ecx, %eax + movzbl (%eax), %eax + movb %al, (%edx) + .loc 1 5 0 discriminator 3 + addl $1, -4(%ebp) +.L2: + .loc 1 5 0 is_stmt 0 discriminator 1 + movl -4(%ebp), %eax + cmpl 16(%ebp), %eax + jl .L3 + .loc 1 8 0 is_stmt 1 + nop + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE0: + .size memory_copy, .-memory_copy + .globl memory_set + .type memory_set, @function +memory_set: +.LFB1: + .loc 1 10 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $20, %esp + movl 12(%ebp), %eax + movb %al, -20(%ebp) + .loc 1 11 0 + movl 8(%ebp), %eax + movl %eax, -4(%ebp) + .loc 1 12 0 + jmp .L5 +.L6: + .loc 1 12 0 is_stmt 0 discriminator 2 + movl -4(%ebp), %eax + leal 1(%eax), %edx + movl %edx, -4(%ebp) + movzbl -20(%ebp), %edx + movb %dl, (%eax) + subl $1, 16(%ebp) +.L5: + .loc 1 12 0 discriminator 1 + cmpl $0, 16(%ebp) + jne .L6 + .loc 1 13 0 is_stmt 1 + nop + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE1: + .size memory_set, .-memory_set + .section .rodata +.LC0: + .string "Inside kmalloc phys_addr = " +.LC1: + .string "\n" + .text + .globl kmalloc + .type kmalloc, @function +kmalloc: +.LFB2: + .loc 1 18 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $40, %esp + .loc 1 20 0 + cmpl $1, 12(%ebp) + jne .L8 + .loc 1 20 0 is_stmt 0 discriminator 1 + movl free_mem_addr, %eax + andl $-4096, %eax + testl %eax, %eax + je .L8 + .loc 1 21 0 is_stmt 1 + movl free_mem_addr, %eax + andl $-4096, %eax + movl %eax, free_mem_addr + .loc 1 22 0 + movl free_mem_addr, %eax + addl $4096, %eax + movl %eax, free_mem_addr +.L8: + .loc 1 27 0 + movl 16(%ebp), %eax + movl (%eax), %eax + movl %eax, %edx + subl $8, %esp + leal -28(%ebp), %eax + pushl %eax + pushl %edx + call hex_to_ascii + addl $16, %esp + .loc 1 28 0 + subl $12, %esp + pushl $.LC0 + call kprint + addl $16, %esp + .loc 1 29 0 + subl $12, %esp + leal -28(%ebp), %eax + pushl %eax + call kprint + addl $16, %esp + .loc 1 30 0 + subl $12, %esp + pushl $.LC1 + call kprint + addl $16, %esp + .loc 1 33 0 + movl free_mem_addr, %edx + movl 16(%ebp), %eax + movl %edx, (%eax) + .loc 1 35 0 + movl 16(%ebp), %eax + movl (%eax), %eax + movl %eax, %edx + subl $8, %esp + leal -28(%ebp), %eax + pushl %eax + pushl %edx + call hex_to_ascii + addl $16, %esp + .loc 1 36 0 + subl $12, %esp + pushl $.LC0 + call kprint + addl $16, %esp + .loc 1 37 0 + subl $12, %esp + leal -28(%ebp), %eax + pushl %eax + call kprint + addl $16, %esp + .loc 1 38 0 + subl $12, %esp + pushl $.LC1 + call kprint + addl $16, %esp + .loc 1 40 0 + movl free_mem_addr, %eax + movl %eax, -12(%ebp) + .loc 1 41 0 + movl free_mem_addr, %edx + movl 8(%ebp), %eax + addl %edx, %eax + movl %eax, free_mem_addr + .loc 1 42 0 + movl -12(%ebp), %eax + .loc 1 43 0 + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE2: + .size kmalloc, .-kmalloc +.Letext0: + .file 2 "./libc/../cpu/types.h" + .file 3 "./libc/globals.h" + .section .debug_info,"",@progbits +.Ldebug_info0: + .long 0x187 + .value 0x4 + .long .Ldebug_abbrev0 + .byte 0x4 + .uleb128 0x1 + .long .LASF15 + .byte 0xc + .long .LASF16 + .long .LASF17 + .long .Ltext0 + .long .Letext0-.Ltext0 + .long .Ldebug_line0 + .uleb128 0x2 + .string "u32" + .byte 0x2 + .byte 0x6 + .long 0x30 + .uleb128 0x3 + .byte 0x4 + .byte 0x7 + .long .LASF0 + .uleb128 0x4 + .byte 0x4 + .byte 0x5 + .string "int" + .uleb128 0x3 + .byte 0x2 + .byte 0x7 + .long .LASF1 + .uleb128 0x3 + .byte 0x2 + .byte 0x5 + .long .LASF2 + .uleb128 0x2 + .string "u8" + .byte 0x2 + .byte 0xa + .long 0x56 + .uleb128 0x3 + .byte 0x1 + .byte 0x8 + .long .LASF3 + .uleb128 0x3 + .byte 0x1 + .byte 0x6 + .long .LASF4 + .uleb128 0x5 + .long .LASF8 + .byte 0x1 + .byte 0x3 + .long .LFB0 + .long .LFE0-.LFB0 + .uleb128 0x1 + .byte 0x9c + .long 0xb0 + .uleb128 0x6 + .long .LASF5 + .byte 0x1 + .byte 0x3 + .long 0xb0 + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .uleb128 0x6 + .long .LASF6 + .byte 0x1 + .byte 0x3 + .long 0xb0 + .uleb128 0x2 + .byte 0x91 + .sleb128 4 + .uleb128 0x6 + .long .LASF7 + .byte 0x1 + .byte 0x3 + .long 0x37 + .uleb128 0x2 + .byte 0x91 + .sleb128 8 + .uleb128 0x7 + .string "i" + .byte 0x1 + .byte 0x4 + .long 0x37 + .uleb128 0x2 + .byte 0x91 + .sleb128 -12 + .byte 0 + .uleb128 0x8 + .byte 0x4 + .long 0x4c + .uleb128 0x5 + .long .LASF9 + .byte 0x1 + .byte 0xa + .long .LFB1 + .long .LFE1-.LFB1 + .uleb128 0x1 + .byte 0x9c + .long 0x104 + .uleb128 0x6 + .long .LASF6 + .byte 0x1 + .byte 0xa + .long 0xb0 + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .uleb128 0x9 + .string "val" + .byte 0x1 + .byte 0xa + .long 0x4c + .uleb128 0x2 + .byte 0x91 + .sleb128 -28 + .uleb128 0x9 + .string "len" + .byte 0x1 + .byte 0xa + .long 0x25 + .uleb128 0x2 + .byte 0x91 + .sleb128 8 + .uleb128 0xa + .long .LASF10 + .byte 0x1 + .byte 0xb + .long 0xb0 + .uleb128 0x2 + .byte 0x91 + .sleb128 -12 + .byte 0 + .uleb128 0xb + .long .LASF18 + .byte 0x1 + .byte 0x12 + .long 0x25 + .long .LFB2 + .long .LFE2-.LFB2 + .uleb128 0x1 + .byte 0x9c + .long 0x162 + .uleb128 0x6 + .long .LASF11 + .byte 0x1 + .byte 0x12 + .long 0x25 + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .uleb128 0x6 + .long .LASF12 + .byte 0x1 + .byte 0x12 + .long 0x37 + .uleb128 0x2 + .byte 0x91 + .sleb128 4 + .uleb128 0x6 + .long .LASF13 + .byte 0x1 + .byte 0x12 + .long 0x162 + .uleb128 0x2 + .byte 0x91 + .sleb128 8 + .uleb128 0x7 + .string "c" + .byte 0x1 + .byte 0x1a + .long 0x168 + .uleb128 0x2 + .byte 0x91 + .sleb128 -36 + .uleb128 0x7 + .string "ret" + .byte 0x1 + .byte 0x28 + .long 0x25 + .uleb128 0x2 + .byte 0x91 + .sleb128 -20 + .byte 0 + .uleb128 0x8 + .byte 0x4 + .long 0x25 + .uleb128 0xc + .long 0x5d + .long 0x178 + .uleb128 0xd + .long 0x178 + .byte 0xf + .byte 0 + .uleb128 0x3 + .byte 0x4 + .byte 0x7 + .long .LASF14 + .uleb128 0xe + .long .LASF19 + .byte 0x3 + .byte 0x5 + .long 0x25 + .byte 0 + .section .debug_abbrev,"",@progbits +.Ldebug_abbrev0: + .uleb128 0x1 + .uleb128 0x11 + .byte 0x1 + .uleb128 0x25 + .uleb128 0xe + .uleb128 0x13 + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x1b + .uleb128 0xe + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x10 + .uleb128 0x17 + .byte 0 + .byte 0 + .uleb128 0x2 + .uleb128 0x16 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x3 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .byte 0 + .byte 0 + .uleb128 0x4 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0x8 + .byte 0 + .byte 0 + .uleb128 0x5 + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2117 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x6 + .uleb128 0x5 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0x7 + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0x8 + .uleb128 0xf + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x9 + .uleb128 0x5 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0xa + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0xb + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2116 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xc + .uleb128 0x1 + .byte 0x1 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xd + .uleb128 0x21 + .byte 0 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2f + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0xe + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3c + .uleb128 0x19 + .byte 0 + .byte 0 + .byte 0 + .section .debug_aranges,"",@progbits + .long 0x1c + .value 0x2 + .long .Ldebug_info0 + .byte 0x4 + .byte 0 + .value 0 + .value 0 + .long .Ltext0 + .long .Letext0-.Ltext0 + .long 0 + .long 0 + .section .debug_line,"",@progbits +.Ldebug_line0: + .section .debug_str,"MS",@progbits,1 +.LASF7: + .string "nbytes" +.LASF16: + .string "./libc/mem.c" +.LASF0: + .string "unsigned int" +.LASF6: + .string "dest" +.LASF3: + .string "unsigned char" +.LASF10: + .string "temp" +.LASF17: + .string "/home/os/OS_Project/Part4/10_scheduler" +.LASF19: + .string "free_mem_addr" +.LASF4: + .string "char" +.LASF8: + .string "memory_copy" +.LASF12: + .string "align" +.LASF18: + .string "kmalloc" +.LASF13: + .string "phys_addr" +.LASF5: + .string "source" +.LASF15: + .string "GNU C11 5.4.0 20160609 -m32 -mtune=generic -march=i686 -g -fno-pie -ffreestanding -fno-builtin -fno-stack-protector" +.LASF1: + .string "short unsigned int" +.LASF11: + .string "size" +.LASF9: + .string "memory_set" +.LASF2: + .string "short int" +.LASF14: + .string "sizetype" + .ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609" + .section .note.GNU-stack,"",@progbits diff --git a/Part4/10_scheduler/ports.s b/Part4/10_scheduler/ports.s new file mode 100644 index 0000000..2b211d6 --- /dev/null +++ b/Part4/10_scheduler/ports.s @@ -0,0 +1,501 @@ + .file "ports.c" + .text +.Ltext0: + .globl port_byte_in + .type port_byte_in, @function +port_byte_in: +.LFB0: + .file 1 "./cpu/ports.c" + .loc 1 6 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $20, %esp + movl 8(%ebp), %eax + movw %ax, -20(%ebp) + .loc 1 16 0 + movzwl -20(%ebp), %eax + movl %eax, %edx +#APP +# 16 "./cpu/ports.c" 1 + in %dx, %al +# 0 "" 2 +#NO_APP + movb %al, -1(%ebp) + .loc 1 17 0 + movzbl -1(%ebp), %eax + .loc 1 18 0 + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE0: + .size port_byte_in, .-port_byte_in + .globl port_byte_out + .type port_byte_out, @function +port_byte_out: +.LFB1: + .loc 1 20 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $8, %esp + movl 8(%ebp), %edx + movl 12(%ebp), %eax + movw %dx, -4(%ebp) + movb %al, -8(%ebp) + .loc 1 26 0 + movzbl -8(%ebp), %eax + movzwl -4(%ebp), %edx +#APP +# 26 "./cpu/ports.c" 1 + out %al, %dx +# 0 "" 2 + .loc 1 27 0 +#NO_APP + nop + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE1: + .size port_byte_out, .-port_byte_out + .globl port_word_in + .type port_word_in, @function +port_word_in: +.LFB2: + .loc 1 29 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $20, %esp + movl 8(%ebp), %eax + movw %ax, -20(%ebp) + .loc 1 31 0 + movzwl -20(%ebp), %eax + movl %eax, %edx +#APP +# 31 "./cpu/ports.c" 1 + in %dx, %ax +# 0 "" 2 +#NO_APP + movw %ax, -2(%ebp) + .loc 1 32 0 + movzwl -2(%ebp), %eax + .loc 1 33 0 + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE2: + .size port_word_in, .-port_word_in + .globl port_word_out + .type port_word_out, @function +port_word_out: +.LFB3: + .loc 1 35 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $8, %esp + movl 8(%ebp), %edx + movl 12(%ebp), %eax + movw %dx, -4(%ebp) + movw %ax, -8(%ebp) + .loc 1 36 0 + movzwl -8(%ebp), %eax + movzwl -4(%ebp), %edx +#APP +# 36 "./cpu/ports.c" 1 + out %ax, %dx +# 0 "" 2 + .loc 1 37 0 +#NO_APP + nop + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE3: + .size port_word_out, .-port_word_out +.Letext0: + .file 2 "./cpu/../cpu/types.h" + .section .debug_info,"",@progbits +.Ldebug_info0: + .long 0x12d + .value 0x4 + .long .Ldebug_abbrev0 + .byte 0x4 + .uleb128 0x1 + .long .LASF10 + .byte 0xc + .long .LASF11 + .long .LASF12 + .long .Ltext0 + .long .Letext0-.Ltext0 + .long .Ldebug_line0 + .uleb128 0x2 + .byte 0x4 + .byte 0x7 + .long .LASF0 + .uleb128 0x3 + .byte 0x4 + .byte 0x5 + .string "int" + .uleb128 0x4 + .string "u16" + .byte 0x2 + .byte 0x8 + .long 0x3e + .uleb128 0x2 + .byte 0x2 + .byte 0x7 + .long .LASF1 + .uleb128 0x2 + .byte 0x2 + .byte 0x5 + .long .LASF2 + .uleb128 0x4 + .string "u8" + .byte 0x2 + .byte 0xa + .long 0x56 + .uleb128 0x2 + .byte 0x1 + .byte 0x8 + .long .LASF3 + .uleb128 0x2 + .byte 0x1 + .byte 0x6 + .long .LASF4 + .uleb128 0x5 + .long .LASF7 + .byte 0x1 + .byte 0x6 + .long 0x4c + .long .LFB0 + .long .LFE0-.LFB0 + .uleb128 0x1 + .byte 0x9c + .long 0x9a + .uleb128 0x6 + .long .LASF5 + .byte 0x1 + .byte 0x6 + .long 0x33 + .uleb128 0x2 + .byte 0x91 + .sleb128 -28 + .uleb128 0x7 + .long .LASF9 + .byte 0x1 + .byte 0x7 + .long 0x4c + .uleb128 0x2 + .byte 0x91 + .sleb128 -9 + .byte 0 + .uleb128 0x8 + .long .LASF13 + .byte 0x1 + .byte 0x14 + .long .LFB1 + .long .LFE1-.LFB1 + .uleb128 0x1 + .byte 0x9c + .long 0xcc + .uleb128 0x6 + .long .LASF5 + .byte 0x1 + .byte 0x14 + .long 0x33 + .uleb128 0x2 + .byte 0x91 + .sleb128 -12 + .uleb128 0x6 + .long .LASF6 + .byte 0x1 + .byte 0x14 + .long 0x4c + .uleb128 0x2 + .byte 0x91 + .sleb128 -16 + .byte 0 + .uleb128 0x5 + .long .LASF8 + .byte 0x1 + .byte 0x1d + .long 0x33 + .long .LFB2 + .long .LFE2-.LFB2 + .uleb128 0x1 + .byte 0x9c + .long 0x102 + .uleb128 0x6 + .long .LASF5 + .byte 0x1 + .byte 0x1d + .long 0x33 + .uleb128 0x2 + .byte 0x91 + .sleb128 -28 + .uleb128 0x7 + .long .LASF9 + .byte 0x1 + .byte 0x1e + .long 0x33 + .uleb128 0x2 + .byte 0x91 + .sleb128 -10 + .byte 0 + .uleb128 0x9 + .long .LASF14 + .byte 0x1 + .byte 0x23 + .long .LFB3 + .long .LFE3-.LFB3 + .uleb128 0x1 + .byte 0x9c + .uleb128 0x6 + .long .LASF5 + .byte 0x1 + .byte 0x23 + .long 0x33 + .uleb128 0x2 + .byte 0x91 + .sleb128 -12 + .uleb128 0x6 + .long .LASF6 + .byte 0x1 + .byte 0x23 + .long 0x33 + .uleb128 0x2 + .byte 0x91 + .sleb128 -16 + .byte 0 + .byte 0 + .section .debug_abbrev,"",@progbits +.Ldebug_abbrev0: + .uleb128 0x1 + .uleb128 0x11 + .byte 0x1 + .uleb128 0x25 + .uleb128 0xe + .uleb128 0x13 + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x1b + .uleb128 0xe + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x10 + .uleb128 0x17 + .byte 0 + .byte 0 + .uleb128 0x2 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .byte 0 + .byte 0 + .uleb128 0x3 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0x8 + .byte 0 + .byte 0 + .uleb128 0x4 + .uleb128 0x16 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x5 + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2117 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x6 + .uleb128 0x5 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0x7 + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0x8 + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2117 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x9 + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2117 + .uleb128 0x19 + .byte 0 + .byte 0 + .byte 0 + .section .debug_aranges,"",@progbits + .long 0x1c + .value 0x2 + .long .Ldebug_info0 + .byte 0x4 + .byte 0 + .value 0 + .value 0 + .long .Ltext0 + .long .Letext0-.Ltext0 + .long 0 + .long 0 + .section .debug_line,"",@progbits +.Ldebug_line0: + .section .debug_str,"MS",@progbits,1 +.LASF0: + .string "unsigned int" +.LASF12: + .string "/home/os/OS_Project/Part4/10_scheduler" +.LASF3: + .string "unsigned char" +.LASF7: + .string "port_byte_in" +.LASF11: + .string "./cpu/ports.c" +.LASF10: + .string "GNU C11 5.4.0 20160609 -m32 -mtune=generic -march=i686 -g -fno-pie -ffreestanding -fno-builtin -fno-stack-protector" +.LASF2: + .string "short int" +.LASF9: + .string "result" +.LASF1: + .string "short unsigned int" +.LASF14: + .string "port_word_out" +.LASF8: + .string "port_word_in" +.LASF5: + .string "port" +.LASF6: + .string "data" +.LASF4: + .string "char" +.LASF13: + .string "port_byte_out" + .ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609" + .section .note.GNU-stack,"",@progbits diff --git a/Part4/10_scheduler/s_compile.sh b/Part4/10_scheduler/s_compile.sh old mode 100644 new mode 100755 diff --git a/Part4/10_scheduler/screen.s b/Part4/10_scheduler/screen.s new file mode 100644 index 0000000..b409ed1 --- /dev/null +++ b/Part4/10_scheduler/screen.s @@ -0,0 +1,1345 @@ + .file "screen.c" + .text +.Ltext0: + .globl kprint_at + .type kprint_at, @function +kprint_at: +.LFB0: + .file 1 "./drivers/screen.c" + .loc 1 21 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $24, %esp + .loc 1 24 0 + cmpl $0, 12(%ebp) + js .L2 + .loc 1 24 0 is_stmt 0 discriminator 1 + cmpl $0, 16(%ebp) + js .L2 + .loc 1 25 0 is_stmt 1 + subl $8, %esp + pushl 16(%ebp) + pushl 12(%ebp) + call get_offset + addl $16, %esp + movl %eax, -16(%ebp) + jmp .L3 +.L2: + .loc 1 27 0 + call get_cursor_offset + movl %eax, -16(%ebp) + .loc 1 28 0 + subl $12, %esp + pushl -16(%ebp) + call get_offset_row + addl $16, %esp + movl %eax, 16(%ebp) + .loc 1 29 0 + subl $12, %esp + pushl -16(%ebp) + call get_offset_col + addl $16, %esp + movl %eax, 12(%ebp) +.L3: + .loc 1 33 0 + movl $0, -12(%ebp) + .loc 1 34 0 + jmp .L4 +.L5: + .loc 1 35 0 + movl -12(%ebp), %eax + leal 1(%eax), %edx + movl %edx, -12(%ebp) + movl %eax, %edx + movl 8(%ebp), %eax + addl %edx, %eax + movzbl (%eax), %eax + movsbl %al, %eax + pushl $15 + pushl 16(%ebp) + pushl 12(%ebp) + pushl %eax + call print_char + addl $16, %esp + movl %eax, -16(%ebp) + .loc 1 37 0 + subl $12, %esp + pushl -16(%ebp) + call get_offset_row + addl $16, %esp + movl %eax, 16(%ebp) + .loc 1 38 0 + subl $12, %esp + pushl -16(%ebp) + call get_offset_col + addl $16, %esp + movl %eax, 12(%ebp) +.L4: + .loc 1 34 0 + movl -12(%ebp), %edx + movl 8(%ebp), %eax + addl %edx, %eax + movzbl (%eax), %eax + testb %al, %al + jne .L5 + .loc 1 40 0 + nop + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE0: + .size kprint_at, .-kprint_at + .globl kprint + .type kprint, @function +kprint: +.LFB1: + .loc 1 42 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $8, %esp + .loc 1 43 0 + subl $4, %esp + pushl $-1 + pushl $-1 + pushl 8(%ebp) + call kprint_at + addl $16, %esp + .loc 1 44 0 + nop + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE1: + .size kprint, .-kprint + .globl kprint_backspace + .type kprint_backspace, @function +kprint_backspace: +.LFB2: + .loc 1 46 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $24, %esp + .loc 1 47 0 + call get_cursor_offset + subl $2, %eax + movl %eax, -12(%ebp) + .loc 1 48 0 + subl $12, %esp + pushl -12(%ebp) + call get_offset_row + addl $16, %esp + movl %eax, -16(%ebp) + .loc 1 49 0 + subl $12, %esp + pushl -12(%ebp) + call get_offset_col + addl $16, %esp + movl %eax, -20(%ebp) + .loc 1 50 0 + pushl $15 + pushl -16(%ebp) + pushl -20(%ebp) + pushl $8 + call print_char + addl $16, %esp + .loc 1 51 0 + nop + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE2: + .size kprint_backspace, .-kprint_backspace + .globl print_char + .type print_char, @function +print_char: +.LFB3: + .loc 1 67 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + pushl %ebx + subl $36, %esp + .cfi_offset 3, -12 + movl 8(%ebp), %edx + movl 20(%ebp), %eax + movb %dl, -28(%ebp) + movb %al, -32(%ebp) + .loc 1 68 0 + movl $753664, -20(%ebp) + .loc 1 69 0 + cmpb $0, -32(%ebp) + jne .L9 + .loc 1 69 0 is_stmt 0 discriminator 1 + movb $15, -32(%ebp) +.L9: + .loc 1 72 0 is_stmt 1 + cmpl $79, 12(%ebp) + jg .L10 + .loc 1 72 0 is_stmt 0 discriminator 1 + cmpl $24, 16(%ebp) + jle .L11 +.L10: + .loc 1 73 0 is_stmt 1 + movl -20(%ebp), %eax + addl $3998, %eax + movb $69, (%eax) + .loc 1 74 0 + movl -20(%ebp), %eax + addl $3999, %eax + movb $-12, (%eax) + .loc 1 75 0 + subl $8, %esp + pushl 16(%ebp) + pushl 12(%ebp) + call get_offset + addl $16, %esp + jmp .L12 +.L11: + .loc 1 79 0 + cmpl $0, 12(%ebp) + js .L13 + .loc 1 79 0 is_stmt 0 discriminator 1 + cmpl $0, 16(%ebp) + js .L13 + .loc 1 79 0 discriminator 2 + subl $8, %esp + pushl 16(%ebp) + pushl 12(%ebp) + call get_offset + addl $16, %esp + movl %eax, -12(%ebp) + jmp .L14 +.L13: + .loc 1 80 0 is_stmt 1 + call get_cursor_offset + movl %eax, -12(%ebp) +.L14: + .loc 1 82 0 + cmpb $10, -28(%ebp) + jne .L15 + .loc 1 83 0 + subl $12, %esp + pushl -12(%ebp) + call get_offset_row + addl $16, %esp + movl %eax, 16(%ebp) + .loc 1 84 0 + movl 16(%ebp), %eax + addl $1, %eax + subl $8, %esp + pushl %eax + pushl $0 + call get_offset + addl $16, %esp + movl %eax, -12(%ebp) + jmp .L16 +.L15: + .loc 1 85 0 + cmpb $8, -28(%ebp) + jne .L17 + .loc 1 86 0 + movl -12(%ebp), %edx + movl -20(%ebp), %eax + addl %edx, %eax + movb $32, (%eax) + .loc 1 87 0 + movl -12(%ebp), %eax + leal 1(%eax), %edx + movl -20(%ebp), %eax + addl %eax, %edx + movzbl -32(%ebp), %eax + movb %al, (%edx) + jmp .L16 +.L17: + .loc 1 89 0 + movl -12(%ebp), %edx + movl -20(%ebp), %eax + addl %eax, %edx + movzbl -28(%ebp), %eax + movb %al, (%edx) + .loc 1 90 0 + movl -12(%ebp), %eax + leal 1(%eax), %edx + movl -20(%ebp), %eax + addl %eax, %edx + movzbl -32(%ebp), %eax + movb %al, (%edx) + .loc 1 91 0 + addl $2, -12(%ebp) +.L16: + .loc 1 95 0 + cmpl $3999, -12(%ebp) + jle .L18 +.LBB2: + .loc 1 97 0 + movl $1, -16(%ebp) + jmp .L19 +.L20: + .loc 1 99 0 discriminator 3 + movl -16(%ebp), %eax + subl $1, %eax + subl $8, %esp + pushl %eax + pushl $0 + call get_offset + addl $16, %esp + addl $753664, %eax + .loc 1 98 0 discriminator 3 + movl %eax, %ebx + subl $8, %esp + pushl -16(%ebp) + pushl $0 + call get_offset + addl $16, %esp + addl $753664, %eax + subl $4, %esp + pushl $160 + pushl %ebx + pushl %eax + call memory_copy + addl $16, %esp + .loc 1 97 0 discriminator 3 + addl $1, -16(%ebp) +.L19: + .loc 1 97 0 is_stmt 0 discriminator 1 + cmpl $24, -16(%ebp) + jle .L20 + .loc 1 103 0 is_stmt 1 + subl $8, %esp + pushl $24 + pushl $0 + call get_offset + addl $16, %esp + addl $753664, %eax + movl %eax, -24(%ebp) + .loc 1 104 0 + movl $0, -16(%ebp) + jmp .L21 +.L22: + .loc 1 104 0 is_stmt 0 discriminator 3 + movl -16(%ebp), %edx + movl -24(%ebp), %eax + addl %edx, %eax + movb $0, (%eax) + addl $1, -16(%ebp) +.L21: + .loc 1 104 0 discriminator 1 + cmpl $159, -16(%ebp) + jle .L22 + .loc 1 106 0 is_stmt 1 + subl $160, -12(%ebp) +.L18: +.LBE2: + .loc 1 109 0 + subl $12, %esp + pushl -12(%ebp) + call set_cursor_offset + addl $16, %esp + .loc 1 110 0 + movl -12(%ebp), %eax +.L12: + .loc 1 111 0 + movl -4(%ebp), %ebx + leave + .cfi_restore 5 + .cfi_restore 3 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE3: + .size print_char, .-print_char + .globl get_cursor_offset + .type get_cursor_offset, @function +get_cursor_offset: +.LFB4: + .loc 1 113 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $24, %esp + .loc 1 118 0 + subl $8, %esp + pushl $14 + pushl $980 + call port_byte_out + addl $16, %esp + .loc 1 119 0 + subl $12, %esp + pushl $981 + call port_byte_in + addl $16, %esp + movzbl %al, %eax + sall $8, %eax + movl %eax, -12(%ebp) + .loc 1 120 0 + subl $8, %esp + pushl $15 + pushl $980 + call port_byte_out + addl $16, %esp + .loc 1 121 0 + subl $12, %esp + pushl $981 + call port_byte_in + addl $16, %esp + movzbl %al, %eax + addl %eax, -12(%ebp) + .loc 1 122 0 + movl -12(%ebp), %eax + addl %eax, %eax + .loc 1 123 0 + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE4: + .size get_cursor_offset, .-get_cursor_offset + .globl set_cursor_offset + .type set_cursor_offset, @function +set_cursor_offset: +.LFB5: + .loc 1 125 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $8, %esp + .loc 1 127 0 + movl 8(%ebp), %eax + movl %eax, %edx + shrl $31, %edx + addl %edx, %eax + sarl %eax + movl %eax, 8(%ebp) + .loc 1 128 0 + subl $8, %esp + pushl $14 + pushl $980 + call port_byte_out + addl $16, %esp + .loc 1 129 0 + movl 8(%ebp), %eax + sarl $8, %eax + movzbl %al, %eax + subl $8, %esp + pushl %eax + pushl $981 + call port_byte_out + addl $16, %esp + .loc 1 130 0 + subl $8, %esp + pushl $15 + pushl $980 + call port_byte_out + addl $16, %esp + .loc 1 131 0 + movl 8(%ebp), %eax + movzbl %al, %eax + subl $8, %esp + pushl %eax + pushl $981 + call port_byte_out + addl $16, %esp + .loc 1 132 0 + nop + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE5: + .size set_cursor_offset, .-set_cursor_offset + .globl clear_screen + .type clear_screen, @function +clear_screen: +.LFB6: + .loc 1 134 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $24, %esp + .loc 1 135 0 + movl $2000, -16(%ebp) + .loc 1 137 0 + movl $753664, -20(%ebp) + .loc 1 139 0 + movl $0, -12(%ebp) + jmp .L27 +.L28: + .loc 1 140 0 discriminator 3 + movl -12(%ebp), %eax + addl %eax, %eax + movl %eax, %edx + movl -20(%ebp), %eax + addl %edx, %eax + movb $32, (%eax) + .loc 1 141 0 discriminator 3 + movl -12(%ebp), %eax + addl %eax, %eax + leal 1(%eax), %edx + movl -20(%ebp), %eax + addl %edx, %eax + movb $15, (%eax) + .loc 1 139 0 discriminator 3 + addl $1, -12(%ebp) +.L27: + .loc 1 139 0 is_stmt 0 discriminator 1 + movl -12(%ebp), %eax + cmpl -16(%ebp), %eax + jl .L28 + .loc 1 143 0 is_stmt 1 + subl $8, %esp + pushl $0 + pushl $0 + call get_offset + addl $16, %esp + subl $12, %esp + pushl %eax + call set_cursor_offset + addl $16, %esp + .loc 1 144 0 + nop + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE6: + .size clear_screen, .-clear_screen + .globl get_offset + .type get_offset, @function +get_offset: +.LFB7: + .loc 1 147 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + .loc 1 147 0 + movl 12(%ebp), %edx + movl %edx, %eax + sall $2, %eax + addl %edx, %eax + sall $4, %eax + movl %eax, %edx + movl 8(%ebp), %eax + addl %edx, %eax + addl %eax, %eax + popl %ebp + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE7: + .size get_offset, .-get_offset + .globl get_offset_row + .type get_offset_row, @function +get_offset_row: +.LFB8: + .loc 1 148 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + .loc 1 148 0 + movl 8(%ebp), %ecx + movl $1717986919, %edx + movl %ecx, %eax + imull %edx + sarl $6, %edx + movl %ecx, %eax + sarl $31, %eax + subl %eax, %edx + movl %edx, %eax + popl %ebp + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE8: + .size get_offset_row, .-get_offset_row + .globl get_offset_col + .type get_offset_col, @function +get_offset_col: +.LFB9: + .loc 1 149 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + .loc 1 149 0 + pushl 8(%ebp) + call get_offset_row + addl $4, %esp + imull $-160, %eax, %edx + movl 8(%ebp), %eax + addl %edx, %eax + movl %eax, %edx + shrl $31, %edx + addl %edx, %eax + sarl %eax + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE9: + .size get_offset_col, .-get_offset_col +.Letext0: + .file 2 "./drivers/../cpu/types.h" + .section .debug_info,"",@progbits +.Ldebug_info0: + .long 0x2bc + .value 0x4 + .long .Ldebug_abbrev0 + .byte 0x4 + .uleb128 0x1 + .long .LASF22 + .byte 0xc + .long .LASF23 + .long .LASF24 + .long .Ltext0 + .long .Letext0-.Ltext0 + .long .Ldebug_line0 + .uleb128 0x2 + .byte 0x4 + .byte 0x7 + .long .LASF0 + .uleb128 0x3 + .byte 0x4 + .byte 0x5 + .string "int" + .uleb128 0x2 + .byte 0x2 + .byte 0x7 + .long .LASF1 + .uleb128 0x2 + .byte 0x2 + .byte 0x5 + .long .LASF2 + .uleb128 0x4 + .string "u8" + .byte 0x2 + .byte 0xa + .long 0x4b + .uleb128 0x2 + .byte 0x1 + .byte 0x8 + .long .LASF3 + .uleb128 0x2 + .byte 0x1 + .byte 0x6 + .long .LASF4 + .uleb128 0x5 + .long .LASF7 + .byte 0x1 + .byte 0x15 + .long .LFB0 + .long .LFE0-.LFB0 + .uleb128 0x1 + .byte 0x9c + .long 0xb3 + .uleb128 0x6 + .long .LASF5 + .byte 0x1 + .byte 0x15 + .long 0xb3 + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .uleb128 0x7 + .string "col" + .byte 0x1 + .byte 0x15 + .long 0x2c + .uleb128 0x2 + .byte 0x91 + .sleb128 4 + .uleb128 0x7 + .string "row" + .byte 0x1 + .byte 0x15 + .long 0x2c + .uleb128 0x2 + .byte 0x91 + .sleb128 8 + .uleb128 0x8 + .long .LASF6 + .byte 0x1 + .byte 0x17 + .long 0x2c + .uleb128 0x2 + .byte 0x91 + .sleb128 -24 + .uleb128 0x9 + .string "i" + .byte 0x1 + .byte 0x21 + .long 0x2c + .uleb128 0x2 + .byte 0x91 + .sleb128 -20 + .byte 0 + .uleb128 0xa + .byte 0x4 + .long 0x52 + .uleb128 0x5 + .long .LASF8 + .byte 0x1 + .byte 0x2a + .long .LFB1 + .long .LFE1-.LFB1 + .uleb128 0x1 + .byte 0x9c + .long 0xdd + .uleb128 0x6 + .long .LASF5 + .byte 0x1 + .byte 0x2a + .long 0xb3 + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .byte 0 + .uleb128 0xb + .long .LASF14 + .byte 0x1 + .byte 0x2e + .long .LFB2 + .long .LFE2-.LFB2 + .uleb128 0x1 + .byte 0x9c + .long 0x11d + .uleb128 0x8 + .long .LASF6 + .byte 0x1 + .byte 0x2f + .long 0x2c + .uleb128 0x2 + .byte 0x91 + .sleb128 -20 + .uleb128 0x9 + .string "row" + .byte 0x1 + .byte 0x30 + .long 0x2c + .uleb128 0x2 + .byte 0x91 + .sleb128 -24 + .uleb128 0x9 + .string "col" + .byte 0x1 + .byte 0x31 + .long 0x2c + .uleb128 0x2 + .byte 0x91 + .sleb128 -28 + .byte 0 + .uleb128 0xc + .long .LASF18 + .byte 0x1 + .byte 0x43 + .long 0x2c + .long .LFB3 + .long .LFE3-.LFB3 + .uleb128 0x1 + .byte 0x9c + .long 0x1ad + .uleb128 0x7 + .string "c" + .byte 0x1 + .byte 0x43 + .long 0x52 + .uleb128 0x2 + .byte 0x91 + .sleb128 -36 + .uleb128 0x7 + .string "col" + .byte 0x1 + .byte 0x43 + .long 0x2c + .uleb128 0x2 + .byte 0x91 + .sleb128 4 + .uleb128 0x7 + .string "row" + .byte 0x1 + .byte 0x43 + .long 0x2c + .uleb128 0x2 + .byte 0x91 + .sleb128 8 + .uleb128 0x6 + .long .LASF9 + .byte 0x1 + .byte 0x43 + .long 0x52 + .uleb128 0x2 + .byte 0x91 + .sleb128 -40 + .uleb128 0x8 + .long .LASF10 + .byte 0x1 + .byte 0x44 + .long 0x1ad + .uleb128 0x2 + .byte 0x91 + .sleb128 -28 + .uleb128 0x8 + .long .LASF6 + .byte 0x1 + .byte 0x4e + .long 0x2c + .uleb128 0x2 + .byte 0x91 + .sleb128 -20 + .uleb128 0xd + .long .LBB2 + .long .LBE2-.LBB2 + .uleb128 0x9 + .string "i" + .byte 0x1 + .byte 0x60 + .long 0x2c + .uleb128 0x2 + .byte 0x91 + .sleb128 -24 + .uleb128 0x8 + .long .LASF11 + .byte 0x1 + .byte 0x67 + .long 0xb3 + .uleb128 0x2 + .byte 0x91 + .sleb128 -32 + .byte 0 + .byte 0 + .uleb128 0xa + .byte 0x4 + .long 0x41 + .uleb128 0xe + .long .LASF12 + .byte 0x1 + .byte 0x71 + .long 0x2c + .long .LFB4 + .long .LFE4-.LFB4 + .uleb128 0x1 + .byte 0x9c + .long 0x1db + .uleb128 0x8 + .long .LASF6 + .byte 0x1 + .byte 0x77 + .long 0x2c + .uleb128 0x2 + .byte 0x91 + .sleb128 -20 + .byte 0 + .uleb128 0x5 + .long .LASF13 + .byte 0x1 + .byte 0x7d + .long .LFB5 + .long .LFE5-.LFB5 + .uleb128 0x1 + .byte 0x9c + .long 0x1ff + .uleb128 0x6 + .long .LASF6 + .byte 0x1 + .byte 0x7d + .long 0x2c + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .byte 0 + .uleb128 0xb + .long .LASF15 + .byte 0x1 + .byte 0x86 + .long .LFB6 + .long .LFE6-.LFB6 + .uleb128 0x1 + .byte 0x9c + .long 0x23d + .uleb128 0x8 + .long .LASF16 + .byte 0x1 + .byte 0x87 + .long 0x2c + .uleb128 0x2 + .byte 0x91 + .sleb128 -24 + .uleb128 0x9 + .string "i" + .byte 0x1 + .byte 0x88 + .long 0x2c + .uleb128 0x2 + .byte 0x91 + .sleb128 -20 + .uleb128 0x8 + .long .LASF17 + .byte 0x1 + .byte 0x89 + .long 0x1ad + .uleb128 0x2 + .byte 0x91 + .sleb128 -28 + .byte 0 + .uleb128 0xf + .long .LASF19 + .byte 0x1 + .byte 0x93 + .long 0x2c + .long .LFB7 + .long .LFE7-.LFB7 + .uleb128 0x1 + .byte 0x9c + .long 0x273 + .uleb128 0x7 + .string "col" + .byte 0x1 + .byte 0x93 + .long 0x2c + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .uleb128 0x7 + .string "row" + .byte 0x1 + .byte 0x93 + .long 0x2c + .uleb128 0x2 + .byte 0x91 + .sleb128 4 + .byte 0 + .uleb128 0xf + .long .LASF20 + .byte 0x1 + .byte 0x94 + .long 0x2c + .long .LFB8 + .long .LFE8-.LFB8 + .uleb128 0x1 + .byte 0x9c + .long 0x29b + .uleb128 0x6 + .long .LASF6 + .byte 0x1 + .byte 0x94 + .long 0x2c + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .byte 0 + .uleb128 0x10 + .long .LASF21 + .byte 0x1 + .byte 0x95 + .long 0x2c + .long .LFB9 + .long .LFE9-.LFB9 + .uleb128 0x1 + .byte 0x9c + .uleb128 0x6 + .long .LASF6 + .byte 0x1 + .byte 0x95 + .long 0x2c + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .byte 0 + .byte 0 + .section .debug_abbrev,"",@progbits +.Ldebug_abbrev0: + .uleb128 0x1 + .uleb128 0x11 + .byte 0x1 + .uleb128 0x25 + .uleb128 0xe + .uleb128 0x13 + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x1b + .uleb128 0xe + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x10 + .uleb128 0x17 + .byte 0 + .byte 0 + .uleb128 0x2 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .byte 0 + .byte 0 + .uleb128 0x3 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0x8 + .byte 0 + .byte 0 + .uleb128 0x4 + .uleb128 0x16 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x5 + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2116 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x6 + .uleb128 0x5 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0x7 + .uleb128 0x5 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0x8 + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0x9 + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0xa + .uleb128 0xf + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xb + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2116 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xc + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2116 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xd + .uleb128 0xb + .byte 0x1 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .byte 0 + .byte 0 + .uleb128 0xe + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2116 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xf + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2117 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x10 + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2116 + .uleb128 0x19 + .byte 0 + .byte 0 + .byte 0 + .section .debug_aranges,"",@progbits + .long 0x1c + .value 0x2 + .long .Ldebug_info0 + .byte 0x4 + .byte 0 + .value 0 + .value 0 + .long .Ltext0 + .long .Letext0-.Ltext0 + .long 0 + .long 0 + .section .debug_line,"",@progbits +.Ldebug_line0: + .section .debug_str,"MS",@progbits,1 +.LASF5: + .string "message" +.LASF14: + .string "kprint_backspace" +.LASF0: + .string "unsigned int" +.LASF21: + .string "get_offset_col" +.LASF3: + .string "unsigned char" +.LASF7: + .string "kprint_at" +.LASF19: + .string "get_offset" +.LASF24: + .string "/home/os/OS_Project/Part4/10_scheduler" +.LASF13: + .string "set_cursor_offset" +.LASF16: + .string "screen_size" +.LASF8: + .string "kprint" +.LASF9: + .string "attr" +.LASF6: + .string "offset" +.LASF11: + .string "last_line" +.LASF4: + .string "char" +.LASF17: + .string "screen" +.LASF22: + .string "GNU C11 5.4.0 20160609 -m32 -mtune=generic -march=i686 -g -fno-pie -ffreestanding -fno-builtin -fno-stack-protector" +.LASF1: + .string "short unsigned int" +.LASF23: + .string "./drivers/screen.c" +.LASF15: + .string "clear_screen" +.LASF12: + .string "get_cursor_offset" +.LASF10: + .string "vidmem" +.LASF2: + .string "short int" +.LASF18: + .string "print_char" +.LASF20: + .string "get_offset_row" + .ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609" + .section .note.GNU-stack,"",@progbits diff --git a/Part4/10_scheduler/string.s b/Part4/10_scheduler/string.s new file mode 100644 index 0000000..d4baab9 --- /dev/null +++ b/Part4/10_scheduler/string.s @@ -0,0 +1,998 @@ + .file "string.c" + .text +.Ltext0: + .globl int_to_ascii + .type int_to_ascii, @function +int_to_ascii: +.LFB0: + .file 1 "./libc/string.c" + .loc 1 6 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + pushl %ebx + subl $20, %esp + .cfi_offset 3, -12 + .loc 1 8 0 + movl 8(%ebp), %eax + movl %eax, -16(%ebp) + cmpl $0, -16(%ebp) + jns .L2 + .loc 1 8 0 is_stmt 0 discriminator 1 + negl 8(%ebp) +.L2: + .loc 1 9 0 is_stmt 1 + movl $0, -12(%ebp) +.L3: + .loc 1 11 0 discriminator 1 + movl -12(%ebp), %eax + leal 1(%eax), %edx + movl %edx, -12(%ebp) + movl %eax, %edx + movl 12(%ebp), %eax + leal (%edx,%eax), %ebx + movl 8(%ebp), %ecx + movl $1717986919, %edx + movl %ecx, %eax + imull %edx + sarl $2, %edx + movl %ecx, %eax + sarl $31, %eax + subl %eax, %edx + movl %edx, %eax + sall $2, %eax + addl %edx, %eax + addl %eax, %eax + subl %eax, %ecx + movl %ecx, %edx + movl %edx, %eax + addl $48, %eax + movb %al, (%ebx) + .loc 1 12 0 discriminator 1 + movl 8(%ebp), %ecx + movl $1717986919, %edx + movl %ecx, %eax + imull %edx + sarl $2, %edx + movl %ecx, %eax + sarl $31, %eax + subl %eax, %edx + movl %edx, %eax + movl %eax, 8(%ebp) + cmpl $0, 8(%ebp) + jg .L3 + .loc 1 14 0 + cmpl $0, -16(%ebp) + jns .L4 + .loc 1 14 0 is_stmt 0 discriminator 1 + movl -12(%ebp), %eax + leal 1(%eax), %edx + movl %edx, -12(%ebp) + movl %eax, %edx + movl 12(%ebp), %eax + addl %edx, %eax + movb $45, (%eax) +.L4: + .loc 1 15 0 is_stmt 1 + movl -12(%ebp), %edx + movl 12(%ebp), %eax + addl %edx, %eax + movb $0, (%eax) + .loc 1 17 0 + subl $12, %esp + pushl 12(%ebp) + call reverse + addl $16, %esp + .loc 1 18 0 + nop + movl -4(%ebp), %ebx + leave + .cfi_restore 5 + .cfi_restore 3 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE0: + .size int_to_ascii, .-int_to_ascii + .globl hex_to_ascii + .type hex_to_ascii, @function +hex_to_ascii: +.LFB1: + .loc 1 20 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $24, %esp + .loc 1 21 0 + movl 12(%ebp), %eax + movb $0, (%eax) + .loc 1 22 0 + subl $8, %esp + pushl $48 + pushl 12(%ebp) + call append + addl $16, %esp + .loc 1 23 0 + subl $8, %esp + pushl $120 + pushl 12(%ebp) + call append + addl $16, %esp + .loc 1 24 0 + movb $0, -9(%ebp) + .loc 1 28 0 + movl $28, -16(%ebp) + jmp .L6 +.L10: + .loc 1 29 0 + movl -16(%ebp), %eax + movl 8(%ebp), %edx + movl %eax, %ecx + sarl %cl, %edx + movl %edx, %eax + andl $15, %eax + movl %eax, -20(%ebp) + .loc 1 30 0 + cmpl $0, -20(%ebp) + jne .L7 + .loc 1 30 0 is_stmt 0 discriminator 1 + cmpb $0, -9(%ebp) + je .L14 +.L7: + .loc 1 31 0 is_stmt 1 + movb $1, -9(%ebp) + .loc 1 32 0 + cmpl $10, -20(%ebp) + jle .L9 + .loc 1 32 0 is_stmt 0 discriminator 1 + movl -20(%ebp), %eax + addl $87, %eax + movsbl %al, %eax + subl $8, %esp + pushl %eax + pushl 12(%ebp) + call append + addl $16, %esp + jmp .L8 +.L9: + .loc 1 33 0 is_stmt 1 + movl -20(%ebp), %eax + addl $48, %eax + movsbl %al, %eax + subl $8, %esp + pushl %eax + pushl 12(%ebp) + call append + addl $16, %esp + jmp .L8 +.L14: + .loc 1 30 0 + nop +.L8: + .loc 1 28 0 discriminator 2 + subl $4, -16(%ebp) +.L6: + .loc 1 28 0 is_stmt 0 discriminator 1 + cmpl $0, -16(%ebp) + jg .L10 + .loc 1 36 0 is_stmt 1 + movl 8(%ebp), %eax + andl $15, %eax + movl %eax, -20(%ebp) + .loc 1 37 0 + cmpl $9, -20(%ebp) + jle .L11 + .loc 1 37 0 is_stmt 0 discriminator 1 + movl -20(%ebp), %eax + addl $87, %eax + movsbl %al, %eax + subl $8, %esp + pushl %eax + pushl 12(%ebp) + call append + addl $16, %esp + .loc 1 40 0 is_stmt 1 discriminator 1 + jmp .L5 +.L11: + .loc 1 38 0 + movl -20(%ebp), %eax + addl $48, %eax + movsbl %al, %eax + subl $8, %esp + pushl %eax + pushl 12(%ebp) + call append + addl $16, %esp + .loc 1 40 0 + nop +.L5: + .loc 1 41 0 + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE1: + .size hex_to_ascii, .-hex_to_ascii + .globl reverse + .type reverse, @function +reverse: +.LFB2: + .loc 1 44 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $24, %esp + .loc 1 46 0 + movl $0, -12(%ebp) + subl $12, %esp + pushl 8(%ebp) + call strlen + addl $16, %esp + subl $1, %eax + movl %eax, -16(%ebp) + jmp .L16 +.L17: + .loc 1 47 0 discriminator 3 + movl -12(%ebp), %edx + movl 8(%ebp), %eax + addl %edx, %eax + movzbl (%eax), %eax + movsbl %al, %eax + movl %eax, -20(%ebp) + .loc 1 48 0 discriminator 3 + movl -12(%ebp), %edx + movl 8(%ebp), %eax + addl %eax, %edx + movl -16(%ebp), %ecx + movl 8(%ebp), %eax + addl %ecx, %eax + movzbl (%eax), %eax + movb %al, (%edx) + .loc 1 49 0 discriminator 3 + movl -16(%ebp), %edx + movl 8(%ebp), %eax + addl %edx, %eax + movl -20(%ebp), %edx + movb %dl, (%eax) + .loc 1 46 0 discriminator 3 + addl $1, -12(%ebp) + subl $1, -16(%ebp) +.L16: + .loc 1 46 0 is_stmt 0 discriminator 1 + movl -12(%ebp), %eax + cmpl -16(%ebp), %eax + jl .L17 + .loc 1 51 0 is_stmt 1 + nop + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE2: + .size reverse, .-reverse + .globl strlen + .type strlen, @function +strlen: +.LFB3: + .loc 1 54 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $16, %esp + .loc 1 55 0 + movl $0, -4(%ebp) + .loc 1 56 0 + jmp .L19 +.L20: + .loc 1 56 0 is_stmt 0 discriminator 2 + addl $1, -4(%ebp) +.L19: + .loc 1 56 0 discriminator 1 + movl -4(%ebp), %edx + movl 8(%ebp), %eax + addl %edx, %eax + movzbl (%eax), %eax + testb %al, %al + jne .L20 + .loc 1 57 0 is_stmt 1 + movl -4(%ebp), %eax + .loc 1 58 0 + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE3: + .size strlen, .-strlen + .globl append + .type append, @function +append: +.LFB4: + .loc 1 60 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $20, %esp + movl 12(%ebp), %eax + movb %al, -20(%ebp) + .loc 1 61 0 + pushl 8(%ebp) + call strlen + addl $4, %esp + movl %eax, -4(%ebp) + .loc 1 62 0 + movl -4(%ebp), %edx + movl 8(%ebp), %eax + addl %eax, %edx + movzbl -20(%ebp), %eax + movb %al, (%edx) + .loc 1 63 0 + movl -4(%ebp), %eax + leal 1(%eax), %edx + movl 8(%ebp), %eax + addl %edx, %eax + movb $0, (%eax) + .loc 1 64 0 + nop + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE4: + .size append, .-append + .globl backspace + .type backspace, @function +backspace: +.LFB5: + .loc 1 66 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $16, %esp + .loc 1 67 0 + pushl 8(%ebp) + call strlen + addl $4, %esp + movl %eax, -4(%ebp) + .loc 1 68 0 + movl -4(%ebp), %eax + leal -1(%eax), %edx + movl 8(%ebp), %eax + addl %edx, %eax + movb $0, (%eax) + .loc 1 69 0 + nop + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE5: + .size backspace, .-backspace + .globl strcmp + .type strcmp, @function +strcmp: +.LFB6: + .loc 1 73 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $16, %esp + .loc 1 75 0 + movl $0, -4(%ebp) + jmp .L25 +.L28: + .loc 1 76 0 + movl -4(%ebp), %edx + movl 8(%ebp), %eax + addl %edx, %eax + movzbl (%eax), %eax + testb %al, %al + jne .L26 + .loc 1 76 0 is_stmt 0 discriminator 1 + movl $0, %eax + jmp .L27 +.L26: + .loc 1 75 0 is_stmt 1 discriminator 2 + addl $1, -4(%ebp) +.L25: + .loc 1 75 0 is_stmt 0 discriminator 1 + movl -4(%ebp), %edx + movl 8(%ebp), %eax + addl %edx, %eax + movzbl (%eax), %edx + movl -4(%ebp), %ecx + movl 12(%ebp), %eax + addl %ecx, %eax + movzbl (%eax), %eax + cmpb %al, %dl + je .L28 + .loc 1 78 0 is_stmt 1 + movl -4(%ebp), %edx + movl 8(%ebp), %eax + addl %edx, %eax + movzbl (%eax), %eax + movsbl %al, %edx + movl -4(%ebp), %ecx + movl 12(%ebp), %eax + addl %ecx, %eax + movzbl (%eax), %eax + movsbl %al, %eax + subl %eax, %edx + movl %edx, %eax +.L27: + .loc 1 79 0 + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE6: + .size strcmp, .-strcmp +.Letext0: + .file 2 "./libc/../cpu/types.h" + .section .debug_info,"",@progbits +.Ldebug_info0: + .long 0x21f + .value 0x4 + .long .Ldebug_abbrev0 + .byte 0x4 + .uleb128 0x1 + .long .LASF13 + .byte 0xc + .long .LASF14 + .long .LASF15 + .long .Ltext0 + .long .Letext0-.Ltext0 + .long .Ldebug_line0 + .uleb128 0x2 + .byte 0x4 + .byte 0x7 + .long .LASF0 + .uleb128 0x3 + .string "s32" + .byte 0x2 + .byte 0x7 + .long 0x37 + .uleb128 0x4 + .byte 0x4 + .byte 0x5 + .string "int" + .uleb128 0x2 + .byte 0x2 + .byte 0x7 + .long .LASF1 + .uleb128 0x2 + .byte 0x2 + .byte 0x5 + .long .LASF2 + .uleb128 0x2 + .byte 0x1 + .byte 0x8 + .long .LASF3 + .uleb128 0x2 + .byte 0x1 + .byte 0x6 + .long .LASF4 + .uleb128 0x5 + .long .LASF6 + .byte 0x1 + .byte 0x6 + .long .LFB0 + .long .LFE0-.LFB0 + .uleb128 0x1 + .byte 0x9c + .long 0xa4 + .uleb128 0x6 + .string "n" + .byte 0x1 + .byte 0x6 + .long 0x37 + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .uleb128 0x6 + .string "str" + .byte 0x1 + .byte 0x6 + .long 0xa4 + .uleb128 0x2 + .byte 0x91 + .sleb128 4 + .uleb128 0x7 + .string "i" + .byte 0x1 + .byte 0x7 + .long 0x37 + .uleb128 0x2 + .byte 0x91 + .sleb128 -20 + .uleb128 0x8 + .long .LASF5 + .byte 0x1 + .byte 0x7 + .long 0x37 + .uleb128 0x2 + .byte 0x91 + .sleb128 -24 + .byte 0 + .uleb128 0x9 + .byte 0x4 + .long 0x53 + .uleb128 0x5 + .long .LASF7 + .byte 0x1 + .byte 0x14 + .long .LFB1 + .long .LFE1-.LFB1 + .uleb128 0x1 + .byte 0x9c + .long 0x102 + .uleb128 0x6 + .string "n" + .byte 0x1 + .byte 0x14 + .long 0x37 + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .uleb128 0x6 + .string "str" + .byte 0x1 + .byte 0x14 + .long 0xa4 + .uleb128 0x2 + .byte 0x91 + .sleb128 4 + .uleb128 0x8 + .long .LASF8 + .byte 0x1 + .byte 0x18 + .long 0x53 + .uleb128 0x2 + .byte 0x91 + .sleb128 -17 + .uleb128 0x7 + .string "tmp" + .byte 0x1 + .byte 0x1a + .long 0x2c + .uleb128 0x2 + .byte 0x91 + .sleb128 -28 + .uleb128 0x7 + .string "i" + .byte 0x1 + .byte 0x1b + .long 0x37 + .uleb128 0x2 + .byte 0x91 + .sleb128 -24 + .byte 0 + .uleb128 0x5 + .long .LASF9 + .byte 0x1 + .byte 0x2c + .long .LFB2 + .long .LFE2-.LFB2 + .uleb128 0x1 + .byte 0x9c + .long 0x148 + .uleb128 0x6 + .string "s" + .byte 0x1 + .byte 0x2c + .long 0xa4 + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .uleb128 0x7 + .string "c" + .byte 0x1 + .byte 0x2d + .long 0x37 + .uleb128 0x2 + .byte 0x91 + .sleb128 -28 + .uleb128 0x7 + .string "i" + .byte 0x1 + .byte 0x2d + .long 0x37 + .uleb128 0x2 + .byte 0x91 + .sleb128 -20 + .uleb128 0x7 + .string "j" + .byte 0x1 + .byte 0x2d + .long 0x37 + .uleb128 0x2 + .byte 0x91 + .sleb128 -24 + .byte 0 + .uleb128 0xa + .long .LASF16 + .byte 0x1 + .byte 0x36 + .long 0x37 + .long .LFB3 + .long .LFE3-.LFB3 + .uleb128 0x1 + .byte 0x9c + .long 0x17a + .uleb128 0x6 + .string "s" + .byte 0x1 + .byte 0x36 + .long 0xa4 + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .uleb128 0x7 + .string "i" + .byte 0x1 + .byte 0x37 + .long 0x37 + .uleb128 0x2 + .byte 0x91 + .sleb128 -12 + .byte 0 + .uleb128 0x5 + .long .LASF10 + .byte 0x1 + .byte 0x3c + .long .LFB4 + .long .LFE4-.LFB4 + .uleb128 0x1 + .byte 0x9c + .long 0x1b6 + .uleb128 0x6 + .string "s" + .byte 0x1 + .byte 0x3c + .long 0xa4 + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .uleb128 0x6 + .string "n" + .byte 0x1 + .byte 0x3c + .long 0x53 + .uleb128 0x2 + .byte 0x91 + .sleb128 -28 + .uleb128 0x7 + .string "len" + .byte 0x1 + .byte 0x3d + .long 0x37 + .uleb128 0x2 + .byte 0x91 + .sleb128 -12 + .byte 0 + .uleb128 0x5 + .long .LASF11 + .byte 0x1 + .byte 0x42 + .long .LFB5 + .long .LFE5-.LFB5 + .uleb128 0x1 + .byte 0x9c + .long 0x1e6 + .uleb128 0x6 + .string "s" + .byte 0x1 + .byte 0x42 + .long 0xa4 + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .uleb128 0x7 + .string "len" + .byte 0x1 + .byte 0x43 + .long 0x37 + .uleb128 0x2 + .byte 0x91 + .sleb128 -12 + .byte 0 + .uleb128 0xb + .long .LASF12 + .byte 0x1 + .byte 0x49 + .long 0x37 + .long .LFB6 + .long .LFE6-.LFB6 + .uleb128 0x1 + .byte 0x9c + .uleb128 0x6 + .string "s1" + .byte 0x1 + .byte 0x49 + .long 0xa4 + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .uleb128 0x6 + .string "s2" + .byte 0x1 + .byte 0x49 + .long 0xa4 + .uleb128 0x2 + .byte 0x91 + .sleb128 4 + .uleb128 0x7 + .string "i" + .byte 0x1 + .byte 0x4a + .long 0x37 + .uleb128 0x2 + .byte 0x91 + .sleb128 -12 + .byte 0 + .byte 0 + .section .debug_abbrev,"",@progbits +.Ldebug_abbrev0: + .uleb128 0x1 + .uleb128 0x11 + .byte 0x1 + .uleb128 0x25 + .uleb128 0xe + .uleb128 0x13 + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x1b + .uleb128 0xe + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x10 + .uleb128 0x17 + .byte 0 + .byte 0 + .uleb128 0x2 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .byte 0 + .byte 0 + .uleb128 0x3 + .uleb128 0x16 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x4 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0x8 + .byte 0 + .byte 0 + .uleb128 0x5 + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2116 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x6 + .uleb128 0x5 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0x7 + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0x8 + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0x9 + .uleb128 0xf + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xa + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2117 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xb + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2117 + .uleb128 0x19 + .byte 0 + .byte 0 + .byte 0 + .section .debug_aranges,"",@progbits + .long 0x1c + .value 0x2 + .long .Ldebug_info0 + .byte 0x4 + .byte 0 + .value 0 + .value 0 + .long .Ltext0 + .long .Letext0-.Ltext0 + .long 0 + .long 0 + .section .debug_line,"",@progbits +.Ldebug_line0: + .section .debug_str,"MS",@progbits,1 +.LASF0: + .string "unsigned int" +.LASF8: + .string "zeros" +.LASF7: + .string "hex_to_ascii" +.LASF15: + .string "/home/os/OS_Project/Part4/10_scheduler" +.LASF5: + .string "sign" +.LASF6: + .string "int_to_ascii" +.LASF3: + .string "unsigned char" +.LASF4: + .string "char" +.LASF12: + .string "strcmp" +.LASF14: + .string "./libc/string.c" +.LASF9: + .string "reverse" +.LASF10: + .string "append" +.LASF13: + .string "GNU C11 5.4.0 20160609 -m32 -mtune=generic -march=i686 -g -fno-pie -ffreestanding -fno-builtin -fno-stack-protector" +.LASF16: + .string "strlen" +.LASF1: + .string "short unsigned int" +.LASF2: + .string "short int" +.LASF11: + .string "backspace" + .ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609" + .section .note.GNU-stack,"",@progbits diff --git a/Part4/10_scheduler/timer.s b/Part4/10_scheduler/timer.s new file mode 100644 index 0000000..5afea3f --- /dev/null +++ b/Part4/10_scheduler/timer.s @@ -0,0 +1,601 @@ + .file "timer.c" + .text +.Ltext0: + .globl tick + .bss + .align 4 + .type tick, @object + .size tick, 4 +tick: + .zero 4 + .text + .type timer_callback, @function +timer_callback: +.LFB0: + .file 1 "./cpu/timer.c" + .loc 1 8 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + .loc 1 9 0 + movl tick, %eax + addl $1, %eax + movl %eax, tick + .loc 1 11 0 + nop + popl %ebp + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE0: + .size timer_callback, .-timer_callback + .globl init_timer + .type init_timer, @function +init_timer: +.LFB1: + .loc 1 13 0 + .cfi_startproc + pushl %ebp + .cfi_def_cfa_offset 8 + .cfi_offset 5, -8 + movl %esp, %ebp + .cfi_def_cfa_register 5 + subl $24, %esp + .loc 1 15 0 + subl $8, %esp + pushl $timer_callback + pushl $32 + call register_interrupt_handler + addl $16, %esp + .loc 1 18 0 + movl $1193180, %eax + movl $0, %edx + divl 8(%ebp) + movl %eax, -12(%ebp) + .loc 1 19 0 + movl -12(%ebp), %eax + movb %al, -13(%ebp) + .loc 1 20 0 + movl -12(%ebp), %eax + shrl $8, %eax + movb %al, -14(%ebp) + .loc 1 22 0 + subl $8, %esp + pushl $54 + pushl $67 + call port_byte_out + addl $16, %esp + .loc 1 23 0 + movzbl -13(%ebp), %eax + subl $8, %esp + pushl %eax + pushl $64 + call port_byte_out + addl $16, %esp + .loc 1 24 0 + movzbl -14(%ebp), %eax + subl $8, %esp + pushl %eax + pushl $64 + call port_byte_out + addl $16, %esp + .loc 1 25 0 + nop + leave + .cfi_restore 5 + .cfi_def_cfa 4, 4 + ret + .cfi_endproc +.LFE1: + .size init_timer, .-init_timer +.Letext0: + .file 2 "./cpu/types.h" + .file 3 "./cpu/isr.h" + .section .debug_info,"",@progbits +.Ldebug_info0: + .long 0x1b5 + .value 0x4 + .long .Ldebug_abbrev0 + .byte 0x4 + .uleb128 0x1 + .long .LASF14 + .byte 0xc + .long .LASF15 + .long .LASF16 + .long .Ltext0 + .long .Letext0-.Ltext0 + .long .Ldebug_line0 + .uleb128 0x2 + .string "u32" + .byte 0x2 + .byte 0x6 + .long 0x30 + .uleb128 0x3 + .byte 0x4 + .byte 0x7 + .long .LASF0 + .uleb128 0x4 + .byte 0x4 + .byte 0x5 + .string "int" + .uleb128 0x3 + .byte 0x2 + .byte 0x7 + .long .LASF1 + .uleb128 0x3 + .byte 0x2 + .byte 0x5 + .long .LASF2 + .uleb128 0x2 + .string "u8" + .byte 0x2 + .byte 0xa + .long 0x56 + .uleb128 0x3 + .byte 0x1 + .byte 0x8 + .long .LASF3 + .uleb128 0x3 + .byte 0x1 + .byte 0x6 + .long .LASF4 + .uleb128 0x5 + .byte 0x40 + .byte 0x3 + .byte 0x4b + .long 0x12a + .uleb128 0x6 + .string "ds" + .byte 0x3 + .byte 0x4c + .long 0x25 + .byte 0 + .uleb128 0x6 + .string "edi" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x4 + .uleb128 0x6 + .string "esi" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x8 + .uleb128 0x6 + .string "ebp" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0xc + .uleb128 0x6 + .string "esp" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x10 + .uleb128 0x6 + .string "ebx" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x14 + .uleb128 0x6 + .string "edx" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x18 + .uleb128 0x6 + .string "ecx" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x1c + .uleb128 0x6 + .string "eax" + .byte 0x3 + .byte 0x4d + .long 0x25 + .byte 0x20 + .uleb128 0x7 + .long .LASF5 + .byte 0x3 + .byte 0x4e + .long 0x25 + .byte 0x24 + .uleb128 0x7 + .long .LASF6 + .byte 0x3 + .byte 0x4e + .long 0x25 + .byte 0x28 + .uleb128 0x6 + .string "eip" + .byte 0x3 + .byte 0x4f + .long 0x25 + .byte 0x2c + .uleb128 0x6 + .string "cs" + .byte 0x3 + .byte 0x4f + .long 0x25 + .byte 0x30 + .uleb128 0x7 + .long .LASF7 + .byte 0x3 + .byte 0x4f + .long 0x25 + .byte 0x34 + .uleb128 0x7 + .long .LASF8 + .byte 0x3 + .byte 0x4f + .long 0x25 + .byte 0x38 + .uleb128 0x6 + .string "ss" + .byte 0x3 + .byte 0x4f + .long 0x25 + .byte 0x3c + .byte 0 + .uleb128 0x8 + .long .LASF9 + .byte 0x3 + .byte 0x50 + .long 0x64 + .uleb128 0x9 + .long .LASF17 + .byte 0x1 + .byte 0x8 + .long .LFB0 + .long .LFE0-.LFB0 + .uleb128 0x1 + .byte 0x9c + .long 0x159 + .uleb128 0xa + .long .LASF10 + .byte 0x1 + .byte 0x8 + .long 0x12a + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .byte 0 + .uleb128 0xb + .long .LASF18 + .byte 0x1 + .byte 0xd + .long .LFB1 + .long .LFE1-.LFB1 + .uleb128 0x1 + .byte 0x9c + .long 0x1a7 + .uleb128 0xa + .long .LASF11 + .byte 0x1 + .byte 0xd + .long 0x25 + .uleb128 0x2 + .byte 0x91 + .sleb128 0 + .uleb128 0xc + .long .LASF12 + .byte 0x1 + .byte 0x12 + .long 0x25 + .uleb128 0x2 + .byte 0x91 + .sleb128 -20 + .uleb128 0xd + .string "low" + .byte 0x1 + .byte 0x13 + .long 0x4c + .uleb128 0x2 + .byte 0x91 + .sleb128 -21 + .uleb128 0xc + .long .LASF13 + .byte 0x1 + .byte 0x14 + .long 0x4c + .uleb128 0x2 + .byte 0x91 + .sleb128 -22 + .byte 0 + .uleb128 0xe + .long .LASF19 + .byte 0x1 + .byte 0x6 + .long 0x25 + .uleb128 0x5 + .byte 0x3 + .long tick + .byte 0 + .section .debug_abbrev,"",@progbits +.Ldebug_abbrev0: + .uleb128 0x1 + .uleb128 0x11 + .byte 0x1 + .uleb128 0x25 + .uleb128 0xe + .uleb128 0x13 + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x1b + .uleb128 0xe + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x10 + .uleb128 0x17 + .byte 0 + .byte 0 + .uleb128 0x2 + .uleb128 0x16 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x3 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0xe + .byte 0 + .byte 0 + .uleb128 0x4 + .uleb128 0x24 + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3e + .uleb128 0xb + .uleb128 0x3 + .uleb128 0x8 + .byte 0 + .byte 0 + .uleb128 0x5 + .uleb128 0x13 + .byte 0x1 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x6 + .uleb128 0xd + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x38 + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0x7 + .uleb128 0xd + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x38 + .uleb128 0xb + .byte 0 + .byte 0 + .uleb128 0x8 + .uleb128 0x16 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x9 + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2117 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xa + .uleb128 0x5 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0xb + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x40 + .uleb128 0x18 + .uleb128 0x2116 + .uleb128 0x19 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0xc + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0xd + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .uleb128 0xe + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x2 + .uleb128 0x18 + .byte 0 + .byte 0 + .byte 0 + .section .debug_aranges,"",@progbits + .long 0x1c + .value 0x2 + .long .Ldebug_info0 + .byte 0x4 + .byte 0 + .value 0 + .value 0 + .long .Ltext0 + .long .Letext0-.Ltext0 + .long 0 + .long 0 + .section .debug_line,"",@progbits +.Ldebug_line0: + .section .debug_str,"MS",@progbits,1 +.LASF0: + .string "unsigned int" +.LASF3: + .string "unsigned char" +.LASF18: + .string "init_timer" +.LASF13: + .string "high" +.LASF15: + .string "./cpu/timer.c" +.LASF16: + .string "/home/os/OS_Project/Part4/10_scheduler" +.LASF7: + .string "eflags" +.LASF19: + .string "tick" +.LASF4: + .string "char" +.LASF10: + .string "regs" +.LASF8: + .string "useresp" +.LASF17: + .string "timer_callback" +.LASF14: + .string "GNU C11 5.4.0 20160609 -m32 -mtune=generic -march=i686 -g -fno-pie -ffreestanding -fno-builtin -fno-stack-protector" +.LASF1: + .string "short unsigned int" +.LASF6: + .string "err_code" +.LASF9: + .string "registers_t" +.LASF12: + .string "divisor" +.LASF2: + .string "short int" +.LASF5: + .string "int_no" +.LASF11: + .string "freq" + .ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609" + .section .note.GNU-stack,"",@progbits