{"id":6047,"date":"2026-06-22T11:11:00","date_gmt":"2026-06-22T02:11:00","guid":{"rendered":"https:\/\/www.freelifemakers.org\/wordpress\/?p=6047"},"modified":"2026-06-22T11:11:56","modified_gmt":"2026-06-22T02:11:56","slug":"os-minios-1","status":"publish","type":"post","link":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/2026\/06\/22\/os-minios-1\/","title":{"rendered":"[OS]mimiOS-1"},"content":{"rendered":"\n<p>\ud83d\udc49\ud83c\udffb \ub9ac\ub205\uc2a4\ub97c \uc774\ud574\ud558\uae30 \uc704\ud574\uc11c \uac04\ub2e8\ud55c OS\ub97c \ub9cc\ub4dc\ub294 \ud504\ub85c\uc81d\ud2b8\ub97c \uc2dc\uc791\ud569\ub2c8\ub2e4.<br>To understand Linux, I am starting a project to build a simple operating system.<\/p>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb OS\uac1c\ubc1c\uc744 \uc704\ud574\uc11c \uc0ac\uc6a9\ub418\ub294 \uc6b4\uc601\uccb4\uc81c\ub294 \uc6b0\ubd84\ud22c \uacc4\uc5f4\uc778 Xubuntu\ub97c \uc0ac\uc6a9\ud588\uc2b5\ub2c8\ub2e4.<br>Xubuntu, a variant of Ubuntu, was used as the operating system for OS development.<\/p>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb CPU\ub294 x86 cpu\uc785\ub2c8\ub2e4.<br>The CPU is an x86 CPU.<\/p>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb1.\ud544\uc218 \ub3c4\uad6c \ubc0f \uac00\uc0c1 \uba38\uc2e0 \uc124\uce58<br>Installing Essential Tools and Virtual Machines<\/p>\n\n\n\n<p>\u2714\ufe0f \ud130\ubbf8\ub110\uc744 \uc5f4\uace0 \uc544\ub798 \uba85\ub839\uc5b4\ub97c \uc785\ub825\ud558\uc5ec \ucef4\ud30c\uc77c\ub7ec\uc640 \uc5d0\ubbac\ub808\uc774\ud130\ub97c \uc124\uce58\ud569\ub2c8\ub2e4.<br>Open the terminal and enter the command below to install the compiler and emulator.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt install nasm qemu-system-x86 build-essential gdb<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>nasm<\/strong>: <\/li>\n\n\n\n<li>&#8212; \uc5b4\uc148\ube14\ub9ac\uc5b4 \ucf54\ub4dc\ub97c \uae30\uacc4\uc5b4\ub85c \ubc88\uc5ed\ud574 \uc8fc\ub294 \uc5b4\uc148\ube14\ub7ec\uc785\ub2c8\ub2e4.<br>&#8212; It is an assembler that translates assembly language code into machine code.<\/li>\n\n\n\n<li><strong>qemu-system-x86<\/strong>: <\/li>\n\n\n\n<li>&#8212; \uc6b0\ub9ac\uac00 \ub9cc\ub4e0 OS \ubc14\uc774\ub108\ub9ac\ub97c \uc548\uc804\ud558\uac8c \uc2e4\ud589\ud574 \ubcfc \uac00\uc0c1 \uba38\uc2e0(\uc5d0\ubbac\ub808\uc774\ud130)\uc785\ub2c8\ub2e4.<br>&#8212; This is a virtual machine (emulator) where we can safely run the OS binary we created.<\/li>\n\n\n\n<li><strong>build-essential<\/strong>: <\/li>\n\n\n\n<li>&#8212; \ub098\uc911\uc5d0 C \uc5b8\uc5b4 \ucee4\ub110\uc744 \ub9cc\ub4e4 \ub54c \ud544\uc694\ud55c <code>gcc<\/code>, <code>make<\/code> \ub4f1\uc758 \ucef4\ud30c\uc77c \ub3c4\uad6c \ubaa8\uc74c\uc785\ub2c8\ub2e4.<br>&#8212; This is a collection of compilation tools, such as gcc and make, that will be needed later when creating a C-language kernel.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb2.\uccab \ubc88\uc9f8 \ubd80\ud2b8\ub85c\ub354 \ucf54\ub4dc \uc791\uc131<br>Writing the first bootloader code<\/p>\n\n\n\n<p>\u2714\ufe0f \uc6d0\ud558\ub294 \ub514\ub809\ud1a0\ub9ac\uc5d0 \uc791\uc5c5 \ud3f4\ub354\ub97c \ub9cc\ub4e4\uace0, \ud14d\uc2a4\ud2b8 \uc5d0\ub514\ud130(Mousepad, VS Code \ub4f1)\ub85c <code>boot.asm<\/code> \ud30c\uc77c\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4.<br>Create a working folder in your desired directory and create a <code>boot.asm<\/code> file using a text editor (such as Mousepad or VS Code).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir ~\/miniOS &amp;&amp; cd ~\/miniOS\nnano boot.asm<\/code><\/pre>\n\n\n\n<p>\u2714\ufe0f \uc5f4\ub9b0 \ud30c\uc77c\uc5d0 \uc544\ub798\uc758 16\ube44\ud2b8 x86 \ubd80\ud305 \ucf54\ub4dc\ub97c \ubcf5\uc0ac\ud574\uc11c \ubd99\uc5ec\ub123\uace0 \uc800\uc7a5\ud569\ub2c8\ub2e4.<br>Copy and paste the 16-bit x86 boot code below into the open file and save it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>; BIOS\uac00 \uc774 \ucf54\ub4dc\ub97c \uba54\ubaa8\ub9ac 0x7C00\uc5d0 \ub85c\ub4dc\ud569\ub2c8\ub2e4.\n; The BIOS loads this code into memory at 0x7C00.\n&#91;org 0x7c00]\n\n; 16\ube44\ud2b8 \ub9ac\uc5bc \ubaa8\ub4dc\ub85c \uc2e4\ud589\ud569\ub2c8\ub2e4.\n; Executes in 16-bit real mode.\nbits 16\n\nstart:\n    ; BIOS\uc758 '\ud55c \uae00\uc790 \ucd9c\ub825' \uae30\ub2a5\uc744 \uc120\ud0dd\ud569\ub2c8\ub2e4.\n    ; Select the BIOS 'print single character' function.\n    mov ah, 0x0e\n\n    ; \ud654\uba74\uc5d0 \ucc0d\uc744 \ubb38\uc790 'X'\n    ; Character 'X' to display on the screen\n    mov al, 'X'\n\n    ; BIOS \ube44\ub514\uc624 \uc778\ud130\ub7fd\ud2b8\ub97c \ud638\ucd9c\ud558\uc5ec \ubb38\uc790\ub97c \ucd9c\ub825\ud569\ub2c8\ub2e4.\n    ; Calls the BIOS video interrupt to output a character.\n    int 0x10\n\n    ; \ud604\uc7ac \uc704\uce58($)\uc5d0\uc11c \ubb34\ud55c \ub8e8\ud504\ub97c \ub3cc\uba70 \ub300\uae30\ud569\ub2c8\ub2e4.\n    ; Waits in an infinite loop at the current location ($).\n    jmp $\n\n; 512\ubc14\uc774\ud2b8 \uc911 \ube48 \uacf5\uac04\uc744 \ubaa8\ub450 0\uc73c\ub85c \ucc44\uc6c1\ub2c8\ub2e4.\n; Fill all remaining space within the 512 bytes with zeros.\ntimes 510 - ($ - $$) db 0\n\n; \uc774 \ub514\uc2a4\ud06c\uac00 \ubd80\ud305 \uac00\ub2a5\ud558\ub2e4\ub294 \uac83\uc744 \uc54c\ub9ac\ub294 \uac12\uc744 \uc800\uc7a5.\n; Stores a value indicating that this disk is bootable.\ndw 0xaa55<\/code><\/pre>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb3.\ube4c\ub4dc \ubc0f QEMU\ub85c \ubd80\ud305 \uc2e4\ud589<br>Build and boot using QEMU<\/p>\n\n\n\n<p>\u2714\ufe0f \ud130\ubbf8\ub110\uc5d0\uc11c \uc544\ub798\uc758 \ub450 \uc904\uc744 \uc2e4\ud589\ud558\uba74 \uc989\uc2dc OS\uac00 \uac00\uc0c1 \uba38\uc2e0\uc5d0\uc11c \uad6c\ub3d9\ub429\ub2c8\ub2e4.<br>Running the two lines below in the terminal will immediately launch the OS on the virtual machine.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># 1. \uc5b4\uc148\ube14\ub9ac\uc5b4 \ucf54\ub4dc\ub97c \uc21c\uc218\ud55c \ubc14\uc774\ub108\ub9ac \ud30c\uc77c(.bin)\ub85c \ucef4\ud30c\uc77c\n# Compile assembly code into a pure binary file (.bin)\nnasm -f bin boot.asm -o boot.bin\n\n# 2. QEMU \uc5d0\ubbac\ub808\uc774\ud130\uc5d0 \uc774 \ubc14\uc774\ub108\ub9ac\ub97c \ub514\uc2a4\ud06c\ub85c \ub123\uc5b4 \uac00\uc0c1 \ucef4\ud4e8\ud130 \ubd80\ud305\n# Put this binary on a disk and boot the virtual machine in the QEMU emulator\nqemu-system-x86_64 -drive format=raw,file=boot.bin\n<\/code><\/pre>\n\n\n\n<p>\u2714\ufe0f \uc2e4\ud589\ud654\uba74 \/ Execution Screen<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"756\" height=\"494\" src=\"https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/06\/x-boot.jpg\" alt=\"\" class=\"wp-image-6050\" srcset=\"https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/06\/x-boot.jpg 756w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/06\/x-boot-300x196.jpg 300w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/06\/x-boot-400x261.jpg 400w\" sizes=\"auto, (max-width: 756px) 100vw, 756px\" \/><\/figure>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb3.\uc885\ub8cc\ud558\uae30 \/ Exit<\/p>\n\n\n\n<p>&#8212; \uc0c8\ub85c \ub9cc\ub4e0 \uc6b4\uc601\uccb4\uc81c\uac00 \uc2e4\ud589\ub418\uba74 QEMU\uac00 \ub9c8\uc6b0\uc2a4 \uc81c\uc5b4\uad8c\uc744 \ub3c5\uc810\ud574\uc11c \ub9c8\uc6b0\uc2a4\uac00 \uc791\ub3d9 \uc548\ub420 \uc218 \uc788\uc2b5\ub2c8\ub2e4.(\uc815\uc0c1\ub3d9\uc791)<br>When the newly created operating system runs, QEMU may capture exclusive control of the mouse, causing it to stop working (this is normal behavior).<\/p>\n\n\n\n<p>&#8212; \uc774\ub7f0 \uacbd\uc6b0 \ud0a4\ubcf4\ub4dc\uc5d0\uc11c \uc544\ub798\ud0a4\ub97c \uc2e4\ud589\ud558\uba74 \ud504\ub85c\uadf8\ub7a8\uc744 \uc885\ub8cc \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<br>In this case, you can exit the program by pressing the Down arrow key on your keyboard.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Ctrl+Alt+G<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb \ucf54\ub4dc\uc124\uba85 \/ Code Explanation<\/p>\n\n\n\n<p>\u2714\ufe0f [org 0x7c00]<\/p>\n\n\n\n<p>&#8212; <code>[org 0x7c00]<\/code>\uc5d0\uc11c <code>[ ]<\/code>\uc758 \uc758\ubbf8\uc640 <code>org<\/code> \ub73b<\/p>\n\n\n\n<p>1)<code>org<\/code> (Origin)\ub294 \uc2dc\uc791\uc810\uc774\ub77c\ub294 \ub73b\uc73c\ub85c  \uba54\ubaa8\ub9ac(RAM)\uc5d0 \ubc30\uce58\ub420  \ud504\ub85c\uadf8\ub7a8\uc758 \uc8fc\uc18c\uc704\uce58\ub97c \ucef4\ud30c\uc77c\ub7ec(<code>nasm<\/code>)\uc5d0\uac8c \uc54c\ub824\uc8fc\ub294 \uc9c0\uc2dc\uc5b4\uc785\ub2c8\ub2e4.<br><code>org<\/code> (Origin) signifies a starting point; it is a directive that informs the compiler (nasm) of the memory address where the program is to be placed.<\/p>\n\n\n\n<p>2)NASM(Netwide Assembler)\uc5d0\uc11c\ub294<code>[org 0x7c00<\/code>]\ub97c <code>org 0x7c00<\/code> \uc774\ub807\uac8c \uc368\ub3c4 \ub429\ub2c8\ub2e4.<br>In NASM (Netwide Assembler), you can write <code>[org 0x7c00]<\/code> simply as <code>org 0x7c00<\/code>.<\/p>\n\n\n\n<p>3)0x7c00\ub294 \ubd80\ud305\uc804\uc6a9 \uc8fc\uc18c\uc785\ub2c8\ub2e4.1981\ub144 IBM\uc774 \ucd5c\ucd08\uc758 \uac1c\uc778\uc6a9 \ucef4\ud4e8\ud130(IBM PC 5150)\ub97c \ub9cc\ub4e4 \ub54c \uac1c\ubc1c\uc790\ub4e4\uc774 <strong>&#8220;\ubd80\ud305 \uc804\uc6a9 \ucf54\ub4dc\ub294 \ubb34\uc870\uac74 RAM\uc758 <\/strong><code>0x7C00<\/code><strong> \uc8fc\uc18c\uc5d0 \uc62c\ub824\ub193\uace0 \uc2e4\ud589\ud558\uc790&#8221;<\/strong>\uace0 \uaddc\uce59\uc744 \uc815\ud588\uc2b5\ub2c8\ub2e4.<br>0x7c00 is a boot-specific address. When IBM created its first personal computer (the IBM PC 5150) in 1981, developers established a rule <strong>to always load and execute boot-specific code at the 0x7C00 address in RAM.<\/strong><\/p>\n\n\n\n<p>4)BIOS\ub294 \ub514\uc2a4\ud06c(SSD, HDD, USB \ub4f1)\uc758 \ub9e8 \uccab \ubc88\uc9f8 \uc139\ud130(512\ubc14\uc774\ud2b8)\ub97c \uc77d\uc5b4\uc11c \ubc29\uae08 \ub9d0\ud55c RAM\uc758 <strong><code>0x7C00<\/code> \uc8fc\uc18c<\/strong>\ub85c \ubcf5\uc0ac\ud569\ub2c8\ub2e4.(\uc5ec\uae30\uc11c\ub294 QEMU\uc548\uc758 BIOS\ub97c \uc758\ubbf8\ud569\ub2c8\ub2e4.)<br>The BIOS reads the very first sector (512 bytes) of a disk (such as an SSD, HDD, or USB drive) and copies it to address 0x7C00 in RAM (referring here to the BIOS within QEMU).<\/p>\n\n\n\n<p>\u2714\ufe0f bits 16 <\/p>\n\n\n\n<p>&#8212; \ucc98\uc74c\uc5d0\ub294 \ubb34\uc870\uac74 16\ube44\ud2b8 \ubaa8\ub4dc\ub97c \uc0ac\uc6a9\ud558\uba70 C\uc5b8\uc5b4\ub97c \uc0ac\uc6a9\ud558\uae30 \uc704\ud574\uc11c\ub294  bits 32\ub85c 32\ube44\ud2b8 \ubaa8\ub4dc\uc804\ud658\uc744 \ud574\uc57c\ud569\ub2c8\ub2e4.<br>You start in 16-bit mode by default, and to use C, you must switch to 32-bit mode using the <code>bits 32<\/code> directive.<\/p>\n\n\n\n<p>\u2714\ufe0f start:<\/p>\n\n\n\n<p>&#8212; \ub77c\ubca8\uc785\ub2c8\ub2e4. begin:\uc774\ub098 main:\ub4f1\uc73c\ub85c \ub2e4\ub978 \uc774\ub984\uc73c\ub85c \uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<br>This is a label. You can assign it a different name, such as <code>begin:<\/code> or <code>main:<\/code>.<\/p>\n\n\n\n<p>&#8212; \ucf54\ub4dc\uac00 \uae38\uc5b4\uc9c0\uace0 \ubc18\ubcf5,\uc870\uac74,\uc810\ud504\ub97c \uc704\ud574\uc11c \uc0ac\uc6a9\ub429\ub2c8\ub2e4.<br>It is used when code becomes lengthy and requires loops, conditional statements, and jumps.<\/p>\n\n\n\n<p>\u2714\ufe0f mov ah, 0x0e<\/p>\n\n\n\n<p>&#8212; mov ah, 0x0e\ub294 AH \ub808\uc9c0\uc2a4\ud130\uc5d0 0x0e\ub77c\ub294 \uac12\uc744 \ub123\ub294(\ub300\uc785\ud558\ub294) \uba85\ub839\uc5b4\uc785\ub2c8\ub2e4.<br><code>mov ah, 0x0e<\/code> is an instruction that loads (assigns) the value <code>0x0e<\/code> into the AH register.<\/p>\n\n\n\n<p>&#8212; AH\ub294 16\ube44\ud2b8 CPU\uc5d0\uc11c \uc0ac\uc6a9\ud558\ub294 AX \ub808\uc9c0\uc2a4\ud130\uc758 \uc0c1\uc704 8\ube44\ud2b8 \ubd80\ubd84\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<p>&#8212; AX = [AH : AL] (\uc0c1\uc704 8\ube44\ud2b8 AH, \ud558\uc704 8\ube44\ud2b8 AL) &#8211;&gt; 16\ube44\ud2b8<br>AH is the upper 8-bit portion of the AX register used in 16-bit CPUs.<\/p>\n\n\n\n<p>&#8212; AH\ub294 CPU \uba85\ub839\uc5b4\uc5d0 \ub530\ub77c \ud2b9\uc815 \uae30\ub2a5\uc744 \uc218\ud589\ud560 \ub54c, \uae30\ub2a5 \ubc88\ud638 \ud639\uc740 \uc0c1\ud0dc \uac12\uc744 \uc800\uc7a5\ud558\ub294 \uc6a9\ub3c4\ub85c \ub9ce\uc774 \uc4f0\uc785\ub2c8\ub2e4.<br>AH is frequently used to store function numbers or status values \u200b\u200bwhen performing specific functions based on CPU instructions.<\/p>\n\n\n\n<p>&#8212; <code>mov ah, 0x0e<\/code>(10\uc9c4\uc218\ub85c 14\ubc88)\ub294 BIOS \ube44\ub514\uc624 \uc778\ud130\ub7fd\ud2b8\uc758 \ubb38\uc790 \ucd9c\ub825 \uae30\ub2a5\uc744 \uc120\ud0dd\ud558\ub294 \ucf54\ub4dc\uc785\ub2c8\ub2e4.<br><code>mov ah, 0x0e<\/code> (decimal 14) is the code that selects the character output function of the BIOS video interrupt.<\/p>\n\n\n\n<p>&#8212; \uc989, AH = 0x0e\ub294 BIOS \ube44\ub514\uc624 \uc11c\ube44\uc2a4 \uc911\uc5d0\uc11c \ubb38\uc790 \ucd9c\ub825 \uae30\ub2a5\uc744 \uc9c0\uc815\ud558\ub294 \ucf54\ub4dc\uc785\ub2c8\ub2e4. <br>In other words, AH = 0x0e is the code that specifies the character output function within the BIOS video services.<\/p>\n\n\n\n<p>&#8212; \uc774\ud6c4 AL \ub808\uc9c0\uc2a4\ud130\uc5d0 \ucd9c\ub825\ud560 \ubb38\uc790\ub97c \ub2f4\uace0, int 0x10\uc744 \ud638\ucd9c\ud558\uba74 \ucee4\uc11c \uc704\uce58\uc5d0 \uadf8 \ubb38\uc790\uac00 \ud654\uba74\uc5d0 \ucd9c\ub825\ub429\ub2c8\ub2e4.<br>Afterward, if you place the character to be displayed into the AL register and call <code>int 0x10<\/code>, that character is displayed on the screen at the cursor&#8217;s position.<\/p>\n\n\n\n<p>\u2714\ufe0f mov al, &#8216;X&#8217; <\/p>\n\n\n\n<p>&#8212; AL \ub808\uc9c0\uc2a4\ud130\uc5d0 \ubb38\uc790 &#8216;X&#8217;\ub97c 1\ubc14\uc774\ud2b8 \ud06c\uae30\ub85c \uc800\uc7a5\ud569\ub2c8\ub2e4.<br>Store the character &#8216;X&#8217; in the AL register as a 1-byte value.<\/p>\n\n\n\n<p>&#8212; &#8216;X&#8217;\uc758 ASCII \ucf54\ub4dc(16\uc9c4\uc218 0x58)\ub97c AL\uc5d0 \uc800\uc7a5\ud558\uc5ec \uc774\ud6c4 \uba85\ub839\uc5b4\uc5d0\uc11c \uc774 \uac12\uc744 \uc0ac\uc6a9\ud560 \uc218 \uc788\uac8c \ud569\ub2c8\ub2e4.<br>Store the ASCII code for &#8216;X&#8217; (hexadecimal 0x58) in AL so that this value can be used in subsequent instructions.<\/p>\n\n\n\n<p>\u2714\ufe0f int 0x10<\/p>\n\n\n\n<p>&#8212; int\uc778\ud130\ub7fd\ud2b8\ub97c \uc758\ubbf8\ud569\ub2c8\ub2e4.<br>It refers to the &#8216;int&#8217; interrupt.<\/p>\n\n\n\n<p>&#8212; \ucef4\ud4e8\ud130\uc5d0\uc11c \uc778\ud130\ub7fd\ud2b8\ub294 \ud504\ub85c\uadf8\ub7a8\uc758 \ud750\ub984\uc744 \uc7a0\uc2dc \uba48\ucd94\uace0, \ud2b9\uc815\ud55c \ud558\ub4dc\uc6e8\uc5b4\ub098 \uc18c\ud504\ud2b8\uc6e8\uc5b4\uac00 \ubbf8\ub9ac \uc815\ud574\uc9c4 \ucc98\ub9ac\ub97c \ud560 \uc218 \uc788\ub3c4\ub85d \ud558\ub294 \uba54\ucee4\ub2c8\uc998\uc785\ub2c8\ub2e4.<br>In computing, an interrupt is a mechanism that temporarily pauses the flow of a program, allowing specific hardware or software to perform a predefined task.<\/p>\n\n\n\n<p>&#8212; \uc2e4\uc81c\ub85c \ube44\ub514\uc624 \uc11c\ube44\uc2a4\ub97c \ud638\ucd9c\ud574\uc11c \uc2e4\uc81c\ub85c &#8216;X&#8217;\ub77c\ub294 \ubb38\uc790\ub97c \ud654\uba74\uc5d0 \ud45c\uc2dc\ud569\ub2c8\ub2e4.<br>It actually calls the video service and displays the character &#8216;X&#8217; on the screen.<\/p>\n\n\n\n<p>&#8212; \uc778\ud130\ub7fd\ud2b8 0x10\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \uae30\ub2a5\uc744 \ub2f4\ub2f9\ud569\ub2c8\ub2e4.<br>Interrupt 0x10 handles the following functions.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\ud654\uba74 \ubaa8\ub4dc \uc124\uc815 (\ud14d\uc2a4\ud2b8\/\uadf8\ub798\ud53d \ubaa8\ub4dc \uc804\ud658)\nScreen Mode Setting (Switching between Text and Graphics Modes)\n\n\ubb38\uc790 \ub610\ub294 \uadf8\ub798\ud53d \ucd9c\ub825\nText or graphic output\n\n\ud654\uba74 \ud074\ub9ac\uc5b4, \ucee4\uc11c \uc704\uce58 \uc870\uc808\nClear screen, adjust cursor position\n\n\ud3f0\ud2b8 \uc124\uc815, \ud314\ub808\ud2b8 \uc870\uc815 \ub4f1\nFont settings, palette adjustments, etc.<\/code><\/pre>\n\n\n\n<p>\u2b50\ufe0f <code>mov ah<\/code>,&nbsp;<code>mov al<\/code>,&nbsp;<code>int<\/code> \ub294 \ud558\ub098\uc758 \ub85c\uc9c1\uc73c\ub85c \uc774\ud574\ud558\uba74\ub429\ub2c8\ub2e4.<br>You can understand <code>mov ah<\/code>, <code>mov al<\/code>, and <code>int<\/code> as a single piece of logic.<\/p>\n\n\n\n<p>\u2714\ufe0f <code>jmp $<\/code><\/p>\n\n\n\n<p>&#8212; <code>$<\/code>\ub294 \uc5b4\uc148\ube14\ub9ac\uc5b4\uc5d0\uc11c&nbsp;<strong>\ud604\uc7ac \uba85\ub839\uc5b4 \uc8fc\uc18c<\/strong>&nbsp;\ub610\ub294&nbsp;<strong>\ud604\uc7ac \uc704\uce58(\uc8fc\uc18c \ub808\uc774\ube14)\ub97c \ub098\ud0c0\ub0b4\ub294 \uae30\ud638<\/strong>\uc785\ub2c8\ub2e4.<br>In assembly language, $ is <strong>a symbol representing the current instruction address or the current location<\/strong> (address label).<\/p>\n\n\n\n<p>&#8212; <code>jmp $<\/code>\ub294 \ud504\ub85c\uadf8\ub7a8\uc774 \uc885\ub8cc\ub418\uc9c0 \uc54a\uace0 \ud2b9\uc815 \uc704\uce58\uc5d0\uc11c \ubb34\ud55c\ud788 \uba38\ubb34\ub974\uba74\uc11c \uae30\ub2e4\ub9ac\ub3c4\ub85d \ub9cc\ub4dc\ub294 \uc6a9\ub3c4\ub85c \uc4f0\uc785\ub2c8\ub2e4.<br><code>jmp $<\/code> is used to make the program wait by remaining indefinitely at a specific location instead of terminating.<\/p>\n\n\n\n<p>\u2714\ufe0f times 510 &#8211; ($ &#8211; $$) db 0<\/p>\n\n\n\n<p>&#8212; \uacc4\uc0b0\ub41c \ud69f\uc218\ub9cc\ud07c \ubc14\uc774\ud2b8(db) \uacf5\uac04\uc744 \uc804\ubd80 0\uc73c\ub85c \ucc44\uc6b0\ub77c\ub294 \uba85\ub839\uc5b4\uc785\ub2c8\ub2e4.<br>This command fills the specified number of bytes (db) with zeros.<\/p>\n\n\n\n<p>&#8212; 512\ubc14\uc774\ud2b8\uc5d0\uc11c 510\ubc14\uc774\ud2b8\ub294 \ubd80\ud2b8\ub85c\ub354 \ubc0f \ub370\uc774\ud130\ub97c \uc800\uc7a5\ud558\ub294 \uacf5\uac04\uc785\ub2c8\ub2e4.<br>Of the 512 bytes, 510 bytes are used to store the bootloader and data.<\/p>\n\n\n\n<p>&#8212; \ub098\uba38\uc9c0 \ub9c8\uc9c0\ub9c9 2\ubc14\uc774\ud2b8\ub294 \ubd80\ud305\uac00\ub2a5 \uc5ec\ubd80\ub97c \ud310\ubcc4\ud558\uae30 \uc704\ud55c \uc2dc\uadf8\ub2c8\ucc98\ub85c \uc0ac\uc6a9\ub418\uba70 \ubcf4\ud1b5 16\uc9c4\uc218&nbsp;<code>0xAA55<\/code>\uac00 \ub4e4\uc5b4\uac11\ub2c8\ub2e4. <br>The final two bytes serve as a signature to determine bootability and typically contain the hexadecimal value 0xAA55.<\/p>\n\n\n\n<p>&#8212; \ucd08\uae30 IBM PC \ud638\ud658 \ucef4\ud4e8\ud130\uc758 \ud558\ub4dc\ub514\uc2a4\ud06c \ubc0f \ud50c\ub85c\ud53c\ub514\uc2a4\ud06c \ub4dc\ub77c\uc774\ube0c\ub294 \uc139\ud130 \ub2e8\uc704\ub85c \ub370\uc774\ud130\ub97c \uc77d\uace0 \uc37c\uc2b5\ub2c8\ub2e4.<br>Hard disk and floppy disk drives in early IBM PC-compatible computers read and wrote data in sector units.<\/p>\n\n\n\n<p>&#8212; $\ub294 \ud604\uc7ac \uc704\uce58\uc758 \uc8fc\uc18c\ub97c \uc758\ubbf8\ud569\ub2c8\ub2e4.<br>$ represents the address of the current location.<\/p>\n\n\n\n<p>&#8212; $$\ub294 \uc2dc\uc791 \uc704\uce58\uc758\uc8fc\uc18c\ub97c \uc758\ubbf8\ud569\ub2c8\ub2e4.<br>$$ refers to the address of the starting position.<\/p>\n\n\n\n<p>&#8212; ($ &#8211; $$)\ub294 (\ud604\uc7ac\uc704\uce58 &#8211; \uc2dc\uc791\uc704\uce58\uc785\ub2c8\ub2e4.)<br>($ &#8211; $$) represents (current position &#8211; starting position).<\/p>\n\n\n\n<p>&#8212; \uac04\ub2e8\ud55c \uc608\ub85c 10\ubc14\uc774\ud2b8 \ub370\uc774\ud130\ub97c \uc800\uc7a5\ud588\ub2e4\uba74 \uc544\ub798\ucc98\ub7fc \uacc4\uc0b0\ub429\ub2c8\ub2e4. <br>As a simple example, if 10 bytes of data are stored, the calculation is performed as shown below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>0x7C10 \u2212 0x7C00 = 0x10(10\uc9c4\uc218\ub85c 10 \/ 10 in decimal)<\/code><\/pre>\n\n\n\n<p>&#8212; <code>times N db 0<\/code>\uc740 N\ub9cc\ud07c 0 \ubc14\uc774\ud2b8(\ube48 \uacf5\uac04)\ub97c \ucc44\uc6b0\ub77c\ub294 \ub73b\uc785\ub2c8\ub2e4.<br><code>times N db 0<\/code> means to fill N bytes with zeros (empty space).<\/p>\n\n\n\n<p>\u2714\ufe0f dw 0xaa55<\/p>\n\n\n\n<p>&#8212; dw\ub294 &#8220;define word&#8221;\uc758 \uc57d\uc790\ub85c, 2\ubc14\uc774\ud2b8(16\ube44\ud2b8) \ub370\uc774\ud130\ub97c \uc120\uc5b8\ud558\uac70\ub098 \uc800\uc7a5\ud560 \ub54c \uc0ac\uc6a9\ud569\ub2c8\ub2e4.<br><code>dw<\/code> stands for &#8220;define word&#8221; and is used to declare or store 2-byte (16-bit) data.<\/p>\n\n\n\n<p>&#8212; \ubd80\ud2b8 \uc139\ud130\uc758 0xaa55\uac12\uc744 \ub9c8\uc9c0\ub9c9\uc5d0 \uae30\ub85d\ud569\ub2c8\ub2e4.<br>Write the value 0xaa55 to the end of the boot sector.<\/p>\n\n\n\n<p>&#8212; \uc774 \uac12\uc774 \uc788\uc5b4\uc57c BIOS\uac00 \ud574\ub2f9 \uc139\ud130\ub97c \ubd80\ud305 \uac00\ub2a5\ud55c \uac83\uc73c\ub85c \uc778\uc2dd\ud569\ub2c8\ub2e4.<br>The BIOS requires this value to recognize the sector as bootable.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udc49\ud83c\udffb \ub9ac\ub205\uc2a4\ub97c \uc774\ud574\ud558\uae30 \uc704\ud574\uc11c \uac04\ub2e8\ud55c OS\ub97c \ub9cc\ub4dc\ub294 \ud504\ub85c\uc81d\ud2b8\ub97c \uc2dc\uc791\ud569\ub2c8\ub2e4.To understand Linux, I am starting a project to build a simple operating system. \ud83d\udc49\ud83c\udffb OS\uac1c\ubc1c\uc744 \uc704\ud574\uc11c \uc0ac\uc6a9\ub418\ub294 \uc6b4\uc601\uccb4\uc81c\ub294 \uc6b0\ubd84\ud22c \uacc4\uc5f4\uc778 Xubuntu\ub97c \uc0ac\uc6a9\ud588\uc2b5\ub2c8\ub2e4.Xubuntu, a variant of Ubuntu, was used as the operating system for OS development. \ud83d\udc49\ud83c\udffb CPU\ub294 x86 cpu\uc785\ub2c8\ub2e4.The CPU is an x86 CPU. \ud83d\udc49\ud83c\udffb1.\ud544\uc218 \ub3c4\uad6c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,1],"tags":[],"class_list":["post-6047","post","type-post","status-publish","format-standard","hentry","category-os","category-uncategorized","missing-thumbnail"],"_links":{"self":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/6047","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=6047"}],"version-history":[{"count":4,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/6047\/revisions"}],"predecessor-version":[{"id":6052,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/6047\/revisions\/6052"}],"wp:attachment":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=6047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=6047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=6047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}