{"id":6082,"date":"2026-06-27T11:30:07","date_gmt":"2026-06-27T02:30:07","guid":{"rendered":"https:\/\/www.freelifemakers.org\/wordpress\/?p=6082"},"modified":"2026-06-27T14:17:59","modified_gmt":"2026-06-27T05:17:59","slug":"os-minios-6","status":"publish","type":"post","link":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/2026\/06\/27\/os-minios-6\/","title":{"rendered":"[OS]miniOS-6"},"content":{"rendered":"\n<p>\ud83d\udc49\ufe0f \uadf8\ub798\ud53d \ubaa8\ub4dc \uc804\ud658\ub85c \uc804\ud658\ud558\uace0 \ud654\uba74\uc5d0 \ub178\ub780\uc0c9 \uc0ac\uac01\ud615\uc744 \ud45c\uc2dc\ud569\ub2c8\ub2e4.<br>Switch to graphics mode and display a yellow rectangle on the screen.<\/p>\n\n\n\n<p>\ud83d\udc49\ufe0f \uc804\uccb4\ucf54\ub4dc \/ full code<\/p>\n\n\n\n<p>\u2714\ufe0f boot.asm<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;org 0x7c00]\nbits 16\n\nstart:\n    ; \ub370\uc774\ud130 \uc138\uadf8\uba3c\ud2b8 \ub808\uc9c0\uc2a4\ud130 \ucd08\uae30\ud654\n    ; Initialize data segment registers\n    mov ax, 0\n    mov ds, ax\n    mov es, ax\n\n    ; ----------------------------------------------------\n    ; BIOS \uc778\ud130\ub7fd\ud2b8\ub97c \uc774\uc6a9\ud574 320x200 256\uc0c9 \uadf8\ub798\ud53d \ubaa8\ub4dc\ub85c \uc804\ud658\n    ; Switch to 320x200 256-color graphic mode using BIOS interrupt\n    ; ----------------------------------------------------\n    mov ah, 0x00        ; \ud654\uba74 \ubaa8\ub4dc \uc124\uc815 \uae30\ub2a5 \uc120\ud0dd\n                        ; Select screen mode set function\n    mov al, 0x13        ; 320x200 256\uc0c9 \uadf8\ub798\ud53d \ubaa8\ub4dc \ubc88\ud638 (Mode 13h)\n                        ; 320x200 256-color graphic mode number (Mode 13h)\n    int 0x10            ; \ube44\ub514\uc624 \uc778\ud130\ub7fd\ud2b8 \ud638\ucd9c -&gt; \ud654\uba74\uc774 \uac80\uc740\uc0c9 \uadf8\ub798\ud53d \ucc3d\uc73c\ub85c \uc804\ud658\ub428\n                        ; Call video interrupt -&gt; Screen switches to a black graphic window\n\n    ; \ub514\uc2a4\ud06c \uc77d\uae30 (2\ubc88 \uc139\ud130\ubd80\ud130 1\uac1c \uc139\ud130\ub97c 0x8000\uc5d0 \ub85c\ub4dc)\n    ; Disk read (Load 1 sector from sector 2 into memory 0x8000)\n    mov ah, 0x02\n    mov al, 1\n    mov ch, 0\n    mov cl, 2\n    mov dh, 0\n    mov bx, 0x8000\n    int 0x13\n\n    ; \ub514\uc2a4\ud06c \uc77d\uae30 \uc2e4\ud328 \uc2dc \uc5d0\ub7ec \ucc98\ub9ac\n    ; Error handling if disk read fails\n    jc disk_error\n\n    ; \ub85c\ub4dc\ub41c 2\ubc88 \uc139\ud130 \ucf54\ub4dc\ub85c \uc810\ud504\ud558\uc5ec \uc2e4\ud589\n    ; Jump to the loaded sector 2 code and execute\n    jmp 0x8000\n\ndisk_error:\n    ; \uc5d0\ub7ec \ubc1c\uc0dd \uc2dc \uc2dc\uc2a4\ud15c \uba48\ucda4 (\uadf8\ub798\ud53d \ubaa8\ub4dc\uc774\ubbc0\ub85c \ud14d\uc2a4\ud2b8 \ucd9c\ub825\uc740 \uc77c\ub2e8 \uc0dd\ub7b5)\n    ; System hang on error (Text print is omitted for now since it is in graphic mode)\n    jmp hang\n\nhang:\n    jmp $\n\n; 1\ubc88 \uc139\ud130(MBR) \ube48 \uacf5\uac04\uc744 0\uc73c\ub85c \ucc44\uc6b0\uace0 \ubd80\ud2b8 \uc2dc\uadf8\ub2c8\ucc98 \ucd94\uac00\n; Fill remaining space of sector 1 (MBR) with 0 and add boot signature\ntimes 510 - ($ - $$) db 0\ndw 0xaa55\n<\/code><\/pre>\n\n\n\n<p>\u2714\ufe0f sector2.asm<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;org 0x8000]\nbits 16\n\nstart:\n    ; ----------------------------------------------------\n    ; \ub8e8\ud504(\ubc18\ubcf5\ubb38)\ub97c \uc0ac\uc6a9\ud558\uc5ec \ud654\uba74\uc5d0 \ud07c\uc9c1\ud55c \uc0ac\uac01\ud615 \uadf8\ub9ac\uae30\n    ; Draw a large rectangle on the screen using loops\n    ; ----------------------------------------------------\n    \n    ; \uc0ac\uac01\ud615\uc744 \uadf8\ub9ac\uae30 \uc704\ud55c \uc2dc\uc791 \uc88c\ud45c \ubc0f \ud06c\uae30 \uc124\uc815\n    ; Set starting coordinates and size for drawing the rectangle\n    ; \uc2dc\uc791 \uc704\uce58(Starting position): X=100, Y=50\n    ; \uc0ac\uac01\ud615 \ud06c\uae30(Size): \uac00\ub85c(Width)=50, \uc138\ub85c(Height)=30\n\n    mov dx, 50          ; Y \uc88c\ud45c\uc758 \uc2dc\uc791\uac12 \uc124\uc815 (\uc138\ub85c)\n                        ; Set the starting value of the Y coordinate (Row)\n\ndraw_row_loop:\n    mov cx, 100         ; \uc0c8 \ud589(Row)\uc744 \uc2dc\uc791\ud560 \ub54c\ub9c8\ub2e4 X \uc88c\ud45c\ub97c \ub2e4\uc2dc 100\uc73c\ub85c \ucd08\uae30\ud654 (\uac00\ub85c)\n                        ; Reset X coordinate to 100 whenever starting a new row (Column)\n\ndraw_col_loop:\n    ; BIOS \uc778\ud130\ub7fd\ud2b8\ub97c \uc0ac\uc6a9\ud574 \ud604\uc7ac CX, DX \uc704\uce58\uc5d0 \uc810 \ucc0d\uae30\n    ; Draw a pixel at the current CX, DX position using BIOS interrupt\n    mov ah, 0x0c        ; \ud53d\uc140 \uc4f0\uae30 \uae30\ub2a5\n                        ; Write graphics pixel function\n    mov al, 14          ; \uc0c9\uc0c1 \ubc88\ud638 (14 = \ub178\ub780\uc0c9)\n                        ; Color number (14 = Yellow)\n    mov bh, 0           ; \ud398\uc774\uc9c0 \ubc88\ud638 0\n                        ; Page number 0\n    int 0x10            ; \ud53d\uc140 \ucd9c\ub825\n                        ; Output pixel\n\n    inc cx              ; X \uc88c\ud45c\ub97c \uc624\ub978\ucabd\uc73c\ub85c 1\uce78 \uc774\ub3d9\n                        ; Move X coordinate 1 pixel to the right\n    cmp cx, 150         ; \uac00\ub85c \uae38\uc774\uac00 50\ud53d\uc140\uc774 \ub418\uc5c8\ub294\uc9c0 \ud655\uc778 (100 + 50)\n                        ; Check if the width reached 50 pixels (100 + 50)\n    jl draw_col_loop    ; 150\ubcf4\ub2e4 \uc791\uc73c\uba74 \uacc4\uc18d \uac00\ub85c\ub85c \uc810 \ucc0d\uae30\n                        ; If less than 150, keep drawing pixels horizontally\n\n    ; \uac00\ub85c \ud55c \uc904\uc744 \ub2e4 \ucc44\uc6e0\uc73c\uba74 \ub2e4\uc74c \uc904(\uc138\ub85c)\ub85c \uc774\ub3d9\n    ; Move to the next line (vertically) once a horizontal row is fully drawn\n    inc dx              ; Y \uc88c\ud45c\ub97c \uc544\ub798\ub85c 1\uce78 \uc774\ub3d9\n                        ; Move Y coordinate 1 pixel down\n    cmp dx, 80          ; \uc138\ub85c \ub192\uc774\uac00 30\ud53d\uc140\uc774 \ub418\uc5c8\ub294\uc9c0 \ud655\uc778 (50 + 30)\n                        ; Check if the height reached 30 pixels (50 + 30)\n    jl draw_row_loop    ; 80\ubcf4\ub2e4 \uc791\uc73c\uba74 \ub2e4\uc74c \uc904\ub85c \ub118\uc5b4\uac00\uc11c \ub2e4\uc2dc \uac00\ub85c \ub8e8\ud504 \uc2e4\ud589\n                        ; If less than 80, go to the next row and run the horizontal loop again\n\n    ; \uc0ac\uac01\ud615 \uadf8\ub9ac\uae30\uac00 \ub05d\ub098\uba74 \ubb34\ud55c \ub8e8\ud504\ub85c \ub300\uae30\n    ; Infinite loop waiting after rectangle drawing is finished\n    jmp $\n\n; 512\ubc14\uc774\ud2b8 \ud06c\uae30 \ub9de\ucd94\uae30\n; Fill up to 512 bytes\ntimes 512 - ($ - $$) db 0\n<\/code><\/pre>\n\n\n\n<p>\ud83d\udc49\ufe0f \ucef4\ud30c\uc77c \/ compiling<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nasm -f bin boot.asm -o boot.bin\nnasm -f bin sector2.asm -o sector2.bin\ncat boot.bin sector2.bin &gt; temp.bin\ndd if=temp.bin of=os.img bs=512 count=2880 conv=sync\nqemu-system-x86_64 -drive file=os.img,format=raw,if=floppy -boot a\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"682\" height=\"493\" src=\"https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/06\/miniOS-6.jpg\" alt=\"\" class=\"wp-image-6085\" srcset=\"https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/06\/miniOS-6.jpg 682w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/06\/miniOS-6-300x217.jpg 300w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2026\/06\/miniOS-6-400x289.jpg 400w\" sizes=\"auto, (max-width: 682px) 100vw, 682px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\ud83d\udc49\ufe0f \ucf54\ub4dc\uc124\uba85 \/ Code Explanation<\/p>\n\n\n\n<p>\u2714\ufe0f boot.asm<\/p>\n\n\n\n<p>&#8211;\ub370\uc774\ud130 \uc138\uadf8\uba3c\ud2b8 \ub808\uc9c0\uc2a4\ud130 \ucd08\uae30\ud654<br>Initialize data segment registers<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>start:\n    ; \ub370\uc774\ud130 \uc138\uadf8\uba3c\ud2b8 \ub808\uc9c0\uc2a4\ud130 \ucd08\uae30\ud654\n    ; Initialize data segment registers\n    mov ax, 0\n    mov ds, ax\n    mov es, ax<\/code><\/pre>\n\n\n\n<p>1) \uc704\uc758 \ucf54\ub4dc\ub294 \ucd08\uae30\ud654\ub9cc \ud558\uace0 \ucf54\ub4dc\uac00 \uc0ac\uc6a9\ub418\ub294 \ubd80\ubd84\uc774 \uc5c6\uc2b5\ub2c8\ub2e4.<br>The code above only performs initialization; there is no part of the code where it is actually used.<\/p>\n\n\n\n<p>2) \ud558\uc9c0\ub9cc \uc774 \ucd08\uae30\ud654 \ucf54\ub4dc\uac00 \uc5c6\uc73c\uba74 \ubc14\ub85c \uc544\ub798\uc5d0 \uc788\ub294 \ub514\uc2a4\ud06c \uc77d\uae30 \uba85\ub839\uc5b4(int 0x13)\uac00 \uc791\ub3d9\ud558\uc9c0 \uc54a\uace0 \uc5d0\ub7ec\uac00 \ubc1c\uc0dd\ud558\uac8c \ub429\ub2c8\ub2e4.<br>However, without this initialization code, the disk read command (int 0x13) immediately below it will not work and will result in an error.<\/p>\n\n\n\n<p>3) \uc544\ub798 \ucf54\ub4dc\uc5d0\uc11c \ub370\uc774\ud130\ub97c \uba54\ubaa8\ub9ac 0x8000\uc5d0 \uc800\uc7a5\ud558\ub77c\uace0 bx \ub808\uc9c0\uc2a4\ud130\ub9cc \uc124\uc815\ud574 \uc8fc\uc5c8\uc2b5\ub2c8\ub2e4.<br>In the code below, I only configured the bx register to store data at memory address 0x8000.<\/p>\n\n\n\n<p>4) \ud558\uc9c0\ub9cc BIOS\uc758 \ub514\uc2a4\ud06c \uc77d\uae30 \uae30\ub2a5\uc740 \ubb34\uc870\uac74 es\uc640 bx \ub450 \ub808\uc9c0\uc2a4\ud130\ub97c \ud569\uce5c \uc8fc\uc18c(es:bx)\ub97c \ubaa9\uc801\uc9c0\ub85c \uc778\uc2dd\ud558\ub3c4\ub85d \ud558\ub4dc\uc6e8\uc5b4 \uaddc\uce59\uc774 \uc815\ud574\uc838 \uc788\uc2b5\ub2c8\ub2e4.<br>However, hardware rules dictate that the BIOS disk read function must treat the address formed by combining the es and bx registers (es:bx) as the destination.<\/p>\n\n\n\n<p>5) \uadf8\ub798\uc11c \uc4f0\ub808\uae30 \uac12\uc774 \ub4e4\uc5b4\uc788\uc9c0 \uc54a\uac8c \ucd08\uae30\ud654\uac00 \ubc18\ub4dc\uc2dc \ud544\uc694\ud569\ub2c8\ub2e4.<br>Therefore, initialization is essential to ensure it does not contain garbage values.<\/p>\n\n\n\n<p>1) \uc704\uc758 \ucf54\ub4dc\ub294 \ucd08\uae30\ud654\ub9cc \ud558\uace0  \ucf54\ub4dc\uac00 \uc0ac\uc6a9\ub418\ub294 \ubd80\ubd84\uc774 \uc5c6\uc2b5\ub2c8\ub2e4.<br>The code above only performs initialization; there is no part of the code where it is actually used.<\/p>\n\n\n\n<p>2) \ud558\uc9c0\ub9cc \uc774 \ucd08\uae30\ud654 \ucf54\ub4dc\uac00 \uc5c6\uc73c\uba74 \ubc14\ub85c \uc544\ub798\uc5d0 \uc788\ub294 \ub514\uc2a4\ud06c \uc77d\uae30 \uba85\ub839\uc5b4(int 0x13)\uac00 \uc791\ub3d9\ud558\uc9c0 \uc54a\uace0 \uc5d0\ub7ec\uac00 \ubc1c\uc0dd\ud558\uac8c \ub429\ub2c8\ub2e4.<br>However, without this initialization code, the disk read command (int 0x13) immediately below it will not work and will result in an error.<\/p>\n\n\n\n<p>3) \uc544\ub798 \ucf54\ub4dc\uc5d0\uc11c \ub370\uc774\ud130\ub97c \uba54\ubaa8\ub9ac 0x8000\uc5d0 \uc800\uc7a5\ud558\ub77c\uace0 bx \ub808\uc9c0\uc2a4\ud130\ub9cc \uc124\uc815\ud574 \uc8fc\uc5c8\uc2b5\ub2c8\ub2e4.<br>In the code below, I only configured the bx register to store data at memory address 0x8000.<\/p>\n\n\n\n<p>4) \ud558\uc9c0\ub9cc BIOS\uc758 \ub514\uc2a4\ud06c \uc77d\uae30 \uae30\ub2a5\uc740 \ubb34\uc870\uac74 es\uc640 bx \ub450 \ub808\uc9c0\uc2a4\ud130\ub97c \ud569\uce5c \uc8fc\uc18c(es:bx)\ub97c \ubaa9\uc801\uc9c0\ub85c \uc778\uc2dd\ud558\ub3c4\ub85d \ud558\ub4dc\uc6e8\uc5b4 \uaddc\uce59\uc774 \uc815\ud574\uc838 \uc788\uc2b5\ub2c8\ub2e4.<br>However, hardware rules dictate that the BIOS disk read function must treat the address formed by combining the <code>es<\/code> and <code>bx<\/code> registers (<code>es:bx<\/code>) as the destination.<\/p>\n\n\n\n<p>5) \uadf8\ub798\uc11c \uc4f0\ub808\uae30 \uac12\uc774 \ub4e4\uc5b4\uc788\uc9c0 \uc54a\uac8c \ucd08\uae30\ud654\uac00 \ubc18\ub4dc\uc2dc \ud544\uc694\ud569\ub2c8\ub2e4.<br>Therefore, initialization is essential to ensure it does not contain garbage values.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mov bx, 0x8000\nint 0x13<\/code><\/pre>\n\n\n\n<p>&#8212; \uadf8\ub798\ud53d \ubaa8\ub4dc \uc804\ud658<br>Switch Graphics Mode<\/p>\n\n\n\n<p>1) \uc774 \ubd80\ubd84\uc774 \uc2e4\uc81c\ub85c \uadf8\ub798\ud53d \ubaa8\ub4dc\ub85c \uc804\ud658\ud558\ub294 \ubd80\ubd84\uc785\ub2c8\ub2e4.<br>This is the part where it actually switches to graphics mode.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    mov ah, 0x00        ; \ud654\uba74 \ubaa8\ub4dc \uc124\uc815 \uae30\ub2a5 \uc120\ud0dd\n                        ; Select screen mode set function\n    mov al, 0x13        ; 320x200 256\uc0c9 \uadf8\ub798\ud53d \ubaa8\ub4dc \ubc88\ud638 (Mode 13h)\n                        ; 320x200 256-color graphic mode number (Mode 13h)\n    int 0x10            ; \ube44\ub514\uc624 \uc778\ud130\ub7fd\ud2b8 \ud638\ucd9c -&gt; \ud654\uba74\uc774 \uac80\uc740\uc0c9 \uadf8\ub798\ud53d \ucc3d\uc73c\ub85c \uc804\ud658\ub428\n                        ; Call video interrupt -&gt; Screen switches to a black graphic window<\/code><\/pre>\n\n\n\n<p>&#8212; \ub098\uba38\uc9c0 \ucf54\ub4dc\ub294 \uae30\uc874 \ucf54\ub4dc\uc640 \ub3d9\uc77c\ud569\ub2c8\ub2e4.<br>The rest of the code is identical to the existing code.<\/p>\n\n\n\n<p>&#8212; \ub370\uc774\ud130 \uc77d\uc5b4\uc640 \uba54\ubaa8\ub9ac\uc5d0 \uc800\uc7a5\ud558\uae30,\uc5d0\ub7ec\ucc98\ub9ac,\ubd80\ud2b8\uc2dc\uadf8\ub2c8\ucc98 \ucd94\uac00<br>Reading data and storing it in memory, error handling, and adding a boot signature.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p> \u2714\ufe0f sector2.asm<\/p>\n\n\n\n<p>\ud83d\udc4f \ubaa8\ub2c8\ud130 \uc88c\ud45c\ub294 \uc88c\uce21 \uc0c1\ub2e8\uc774 0.0\uc774\uace0 \uc624\ub978\ucabd\uc73c\ub85c \uc774\ub3d9\ud560 \uc218\ub85d \uc544\ub798\ub85c \uc774\ub3d9\ud560 \uc218\ub85d \uac12\uc774 \ucee4\uc9d1\ub2c8\ub2e4.<br>For monitor coordinates, the top-left corner is (0, 0), and the values \u200b\u200bincrease as you move to the right or downward.<\/p>\n\n\n\n<p>&#8212; \uc704\uc5d0\uc11c \uc544\ub798\ub85c 50\ubc88\uc9f8 \ud53d\uc140(\uc810) \uc704\uce58\uc758 \uc904\uc744 \uc758\ubbf8\ud569\ub2c8\ub2e4.<br>It refers to the line located at the 50th pixel (dot) position from the top.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    mov dx, 50          ; Y \uc88c\ud45c\uc758 \uc2dc\uc791\uac12 \uc124\uc815 (\uc138\ub85c)\n                        ; Set the starting value of the Y coordinate (Row)<\/code><\/pre>\n\n\n\n<p>&#8212; \uc67c\ucabd\uc5d0\uc11c \uc624\ub978\ucabd\uc73c\ub85c 100\ud53d\uc140 \ub5a8\uc5b4\uc9c4 \uc704\uce58\ub97c \uc758\ubbf8\ud569\ub2c8\ub2e4.<br>It refers to a position 100 pixels away from the left.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>draw_row_loop:\n    mov cx, 100         ; \uc0c8 \ud589(Row)\uc744 \uc2dc\uc791\ud560 \ub54c\ub9c8\ub2e4 X \uc88c\ud45c\ub97c \ub2e4\uc2dc 100\uc73c\ub85c \ucd08\uae30\ud654 (\uac00\ub85c)\n                        ; Reset X coordinate to 100 whenever starting a new row (Column)<\/code><\/pre>\n\n\n\n<p>&#8212; 1\ud53d\uc140\uc529 \uc810\uc744 \ucc0d\uc2b5\ub2c8\ub2e4.<br>Place dots one pixel at a time.<\/p>\n\n\n\n<p>&#8212; 50\ud53d\uc140\uc758 \uc810\uc744 1\ud53d\uc140\uc529 \ub2e4 \ucc0d\uc73c\uba74 \ub2e4\uc74c \uc904\ub85c \uc774\ub3d9\ud569\ub2c8\ub2e4.<br>After plotting 50 dots one pixel at a time, it moves to the next line.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>draw_col_loop:\n    ; BIOS \uc778\ud130\ub7fd\ud2b8\ub97c \uc0ac\uc6a9\ud574 \ud604\uc7ac CX, DX \uc704\uce58\uc5d0 \uc810 \ucc0d\uae30\n    ; Draw a pixel at the current CX, DX position using BIOS interrupt\n    mov ah, 0x0c        ; \ud53d\uc140 \uc4f0\uae30 \uae30\ub2a5\n                        ; Write graphics pixel function\n    mov al, 14          ; \uc0c9\uc0c1 \ubc88\ud638 (14 = \ub178\ub780\uc0c9)\n                        ; Color number (14 = Yellow)\n    mov bh, 0           ; \ud398\uc774\uc9c0 \ubc88\ud638 0\n                        ; Page number 0\n    int 0x10            ; \ud53d\uc140 \ucd9c\ub825\n                        ; Output pixel\n\n    inc cx              ; X \uc88c\ud45c\ub97c \uc624\ub978\ucabd\uc73c\ub85c 1\uce78 \uc774\ub3d9\n                        ; Move X coordinate 1 pixel to the right\n    cmp cx, 150         ; \uac00\ub85c \uae38\uc774\uac00 50\ud53d\uc140\uc774 \ub418\uc5c8\ub294\uc9c0 \ud655\uc778 (100 + 50)\n                        ; Check if the width reached 50 pixels (100 + 50)\n    jl draw_col_loop    ; 150\ubcf4\ub2e4 \uc791\uc73c\uba74 \uacc4\uc18d \uac00\ub85c\ub85c \uc810 \ucc0d\uae30\n                        ; If less than 150, keep drawing pixels horizontally<\/code><\/pre>\n\n\n\n<p>&#8212; dx50\uc5d0\uc11c 1\ud53d\uc140\uc774 \uc99d\uac00(inc dx)\ud558\uba74 Y\uac12\uc774 51\uc774 \ub429\ub2c8\ub2e4.<br>If dx50 increases by 1 pixel (inc dx), the Y value becomes 51.<\/p>\n\n\n\n<p>&#8212; \uc989 \ub2e4\uc74c \uc904\ubd80\ud130 \uc810\uc744 \ucc0d\uc2b5\ub2c8\ub2e4.(X:100,Y:51)<br>In other words, start plotting points from the next line (X:100, Y:51).<\/p>\n\n\n\n<p>&#8212; \uc138\ub85c \ud06c\uae30\uac00 30\ud53d\uc140\uc778 \uc0ac\uac01\ud615\uc758 \uc810\uc744 \ub2e4 \ucc0d\uc73c\uba74 \ub8e8\ud504\ub97c \ube60\uc838\ub098\uac11\ub2c8\ub2e4.<br>The loop exits once all the points of the 30-pixel-high rectangle have been plotted.<\/p>\n\n\n\n<p>&#8212; \uadf8\ub7fc \uac00\ub85c 50\ud53d\uc140 \uc138\ub85c 30\ud53d\uc140\uc778 \ub178\ub780\uc0c9 \uc0ac\uac01\ud615\uc744 \ubcfc \uc218 \uc788\uc2b5\ub2c8\ub2e4. <br>Then, you will see a yellow rectangle that is 50 pixels wide and 30 pixels high.<\/p>\n\n\n\n<p>&#8212; dx50\uc5d0\uc11c 1\ud53d\uc140\uc774 \uc99d\uac00(inc dx)\ud558\uba74 Y\uac12\uc774 51\uc774 \ub429\ub2c8\ub2e4.<br>If dx50 increases by 1 pixel (inc dx), the Y value becomes 51.<\/p>\n\n\n\n<p>&#8212; \uc989 \ub2e4\uc74c \uc904\ubd80\ud130 \uc810\uc744 \ucc0d\uc2b5\ub2c8\ub2e4.(X:100,Y:51)<br>In other words, start plotting points from the next line (X:100, Y:51).<\/p>\n\n\n\n<p>&#8212; \uc138\ub85c \ud06c\uae30\uac00 30\ud53d\uc140\uc778 \uc0ac\uac01\ud615\uc758 \uc810\uc744 \ub2e4 \ucc0d\uc73c\uba74 \ub8e8\ud504\ub97c \ube60\uc838\ub098\uac11\ub2c8\ub2e4.<br>The loop exits once all the points of the 30-pixel-high rectangle have been plotted.<\/p>\n\n\n\n<p>&#8212; \uadf8\ub7fc \uac00\ub85c 50\ud53d\uc140 \uc138\ub85c 30\ud53d\uc140\uc778 \ub178\ub780\uc0c9 \uc0ac\uac01\ud615\uc744 \ubcfc \uc218 \uc788\uc2b5\ub2c8\ub2e4. <br>Then, you will see a yellow rectangle that is 50 pixels wide and 30 pixels high.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    ; \uac00\ub85c \ud55c \uc904\uc744 \ub2e4 \ucc44\uc6e0\uc73c\uba74 \ub2e4\uc74c \uc904(\uc138\ub85c)\ub85c \uc774\ub3d9\n    ; Move to the next line (vertically) once a horizontal row is fully drawn\n    inc dx              ; Y \uc88c\ud45c\ub97c \uc544\ub798\ub85c 1\uce78 \uc774\ub3d9\n                        ; Move Y coordinate 1 pixel down\n    cmp dx, 80          ; \uc138\ub85c \ub192\uc774\uac00 30\ud53d\uc140\uc774 \ub418\uc5c8\ub294\uc9c0 \ud655\uc778 (50 + 30)\n                        ; Check if the height reached 30 pixels (50 + 30)\n    jl draw_row_loop    ; 80\ubcf4\ub2e4 \uc791\uc73c\uba74 \ub2e4\uc74c \uc904\ub85c \ub118\uc5b4\uac00\uc11c \ub2e4\uc2dc \uac00\ub85c \ub8e8\ud504 \uc2e4\ud589\n                        ; If less than 80, go to the next row and run the horizontal loop again\n\n    ; \uc0ac\uac01\ud615 \uadf8\ub9ac\uae30\uac00 \ub05d\ub098\uba74 \ubb34\ud55c \ub8e8\ud504\ub85c \ub300\uae30\n    ; Infinite loop waiting after rectangle drawing is finished\n    jmp $<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udc49\ufe0f \uadf8\ub798\ud53d \ubaa8\ub4dc \uc804\ud658\ub85c \uc804\ud658\ud558\uace0 \ud654\uba74\uc5d0 \ub178\ub780\uc0c9 \uc0ac\uac01\ud615\uc744 \ud45c\uc2dc\ud569\ub2c8\ub2e4.Switch to graphics mode and display a yellow rectangle on the screen. \ud83d\udc49\ufe0f \uc804\uccb4\ucf54\ub4dc \/ full code \u2714\ufe0f boot.asm \u2714\ufe0f sector2.asm \ud83d\udc49\ufe0f \ucef4\ud30c\uc77c \/ compiling \ud83d\udc49\ufe0f \ucf54\ub4dc\uc124\uba85 \/ Code Explanation \u2714\ufe0f boot.asm &#8211;\ub370\uc774\ud130 \uc138\uadf8\uba3c\ud2b8 \ub808\uc9c0\uc2a4\ud130 \ucd08\uae30\ud654Initialize data segment registers 1) \uc704\uc758 \ucf54\ub4dc\ub294 \ucd08\uae30\ud654\ub9cc \ud558\uace0 \ucf54\ub4dc\uac00 \uc0ac\uc6a9\ub418\ub294 \ubd80\ubd84\uc774 [&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-6082","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\/6082","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=6082"}],"version-history":[{"count":7,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/6082\/revisions"}],"predecessor-version":[{"id":6091,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/6082\/revisions\/6091"}],"wp:attachment":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=6082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=6082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=6082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}