Á¦¸ñ : Ç㸣¹Ì ÇÑ±Û ¶óÀ̺귯¸® 2.0 [3] ¾È³çÇϼ¼¿ä Ç㸣¹ÌÀÔ´Ï´Ù. ¿À´ÃÀº Àú¹ø¿¡ ¸»¾¸µå¸° ´ë·Î Çãŧ·¹½º¿¡¼­ ÇѱÛ,¿µ¹®À» µµÆ®´ÜÀ§·Î Ãâ·ÂÇØ ÁÖ´Â ¸ðµâ°ú ÀÓÀÇ m byte x n dot ÀÇ ÆùÆ® µ¥ÀÌÅ͸¦ È­¸é¿¡ µµÆ®´ÜÀ§·Î Ãâ·ÂÇØ ÁÖ´Â ¸ðµâÀ» ¼Ò°³ÇÏ°ÚÀ¾´Ï ´Ù. ´ëºÎºÐÀÇ ¼³¸í ( mask °è»êµî.. ) Àº Áö³­¹ø [1] °­Á¿¡¼­ ¼³¸íµå ¸° ³»¿ë°ú ÀÏÄ¡ÇϹǷΠ´Ù¸¥ ºÎºÐ¸¸À» Á¦ÇÑÀûÀ¸·Î ¼³¸íÇϵµ·Ï ÇÏ°ÚÀ¾´Ï ´Ù. ¿ì¼± Çãŧ·¹½º.. Çãŧ·¹½ºÀÇ °¡Àå Å« Ư¡Àº ¹°·Ð ´Ü»öÀ̶ó´Â °ÍÀÔ´Ï´Ù. 4 Gray Á¤µµ´Â ³¾ ¼ö°¡ ÀÖÁö¸¸ ´õ ÀÌ»óÀº ¾î·Æ½À´Ï´Ù.Á¦¾î»óÀÇ Æ¯Â¡Àº 4 ºÐÁÖ¶ó´Âµ¥ ÀÖÀ¾´Ï´Ù. °¢°¢ÀÇ Â÷ÀÌ´Â 0x2000... ¿©±â¼­´Â 640x400 ¸ðµå¿¡ ±¹ÇÑÇØ ¼­ ¸»¾¸µå¸®°ÚÀ¾´Ï´Ù. 720x348 ¸ðµå´Â ¾²±â°¡ Èûµé¾î¼­¿ä..È­¸é Å©±â °¡ ³Ê¹« ±æÂßÇؼ­.. Hercules 640x400 ¿¡¼­ È­¸é (0,y) ¿¡¼­ÀÇ ¿É¼ÂÀ» ±¸ÇÏ´Â ¹æ¹ýÀº Àú¹ø¿¡ ¼Ò°³Çß´ø ¹Ù ÀÖ´ø ret_herc_offset ÇÔ¼ö¸¦ »ç¿ë ÇÕ´Ï´Ù. int ret_herc_offset(int y) { int m,n; n=y>>2; m=y-(n<<2); return (0x2000*m+80*n); } À½..Çãŧ·¹½º¿¡¼­ ÀÓÀÇÀÇ ¿É¼Â offset ¿¡¼­ È­¸é»óÀ§Ä¡·Î ÇÑÄ­ ¿À¸¥ÂÊ À¸·Î °¡·Á¸é offset+1 ÇÏ¸é µÇ°í ÇÑÄ­ ¾Æ·¡·Î °¡·Á¸é 0x2000 À» ´õÇÏ ¸é µÇ°í ÇÑÄ­ À§·Î °¡·Á¸é 0x2000 À» »©¸é µË´Ï´Ù. ±×¸®°í ¸¸ÀÏ 0x8000 º¸´Ù °°°Å³ª Å©´Ù¸é 0x8000 À» »©°í 80 À» ´õÇÏ¸é µÇ°í.. 0 º¸ ´Ù ÀÛÀ¸¸é 0x8000 À» ´õÇÏ°í 80 À» »©¸é µË´Ï´Ù. ±×·³ Çãŧ·¹½º¿¡¼­ÀÇ µµÆ® Ãâ·Â ¸ðµâÀº ºê°¡ÀÇ °ÍÀ» Á¶±Ý¸¸ ¹Ù²Ù¸é ¸¶Ä¡ µÉ µíÀÌ º¸ÀÌ´Â µ¥.. ¼ûÀº ¹®Á¦°¡ Çϳª ³²¾Æ ÀÖÀ¾´Ï´Ù. ¿¹¸¦ µé¾î º¾½Ã´Ù. µµÆ®¹öÁ¯Àº ¿µ¹®Ãâ·ÂÀÇ °æ¿ì 8x16 ÀÇ °¡·Î 1 ¹ÙÀÌÆ®,¼¼·Î 16 ÁÙÀÇ ÆùÆ® µ¥ÀÌÅ͸¦ Ãâ·ÂÇØ¾ß Çϴµ¥ °¡·Î 1 ¹ÙÀÌÆ®¸¦ Ãâ·ÂÇÔ¿¡ ÀÖ¾î µÎºÎºÐÀ¸·Î ³ª´©¾î Ãâ·ÂÇÕ´Ï´Ù. ±×·±µ¥ ÀÌ µÎºÎºÐÀ¸·Î ³ª´©¾î Ãâ·ÂÇÏ´Â µ¥ÀÌÅÍ ¿ª½Ã 8 ºñ Æ®À̹ǷΠÃâ·ÂÇÒ¶§ 8 ºñÆ®ÀÇ ºÎºÐÀÌ È­¸é¿¡ ¿µÇâÀ» ÁÖ°Ô µË´Ï´Ù. ¸»ÀÌ Á» º¹ÀâÇÏÁö¸¸ ¿¹¸¦ µé¾î º¾½Ã´Ù. ÆùÆ®µ¥ÀÌÅÍ 11111111 ÀÌ x ÁÂÇ¥ 10 ºÎÅÍ Ãâ·ÂµÈ´Ù¸é 111111 11 x: 01234567 89012345 67890123 ±×¸²°ú °°ÀÌ µÎ ºÎºÐÀ¸·Î ³ª´µ¾î Ãâ·ÂµÇ°Ô µË´Ï´Ù. À̶§ ¿ÞÂÊÀÇ 111111 À̶ó°í µÇ¾î ÀÖ´Â ºÎºÐÀº ½ÇÁ¦·Î 00111111 ÀÔ´Ï´Ù. ÇÏÁö¸¸ Æù Æ® µ¥ÀÌÅÍ´Â 111111 »ÓÀ̹ǷΠÃâ·ÂÇÒ¶§ Á¦ÀÏ ¿ÞÂÊÀÇ 0 ÀÎ ºÎºÐÀº È­¸é ¿¡ ¿µÇâÀ» ÁÖÁö ¸»¾Æ¾ß ÇÕ´Ï´Ù. VGA ¿¡¼­´Â Latch °¡ ÀÖÀ¸¹Ç·Î È­¸é°ú °ãÃľ²±â°¡ µÇ¾î¼­ ÀÌ·± ¹®Á¦°¡ ¾øÁö¸¸ Hercules ¿¡¼­´Â ÀÌ·± ¹®Á¦°¡ ¹ß»ýÇÕ´Ï´Ù. ÀÌÀÇ ÇØ°á¹æ¹ýÀ¸·Î´Â OR ¿¬»êÀ» ÀÌ¿ëÇÏ´Â °ÍÀÔ´Ï´Ù. Mov ¸¦ ÀÌ¿ëÇÏÁö ¾Ê°í OR À» ÀÌ¿ëÇÔÀ¸·Î½á ÀÌ ¹®Á¦¸¦ ÇØ°áÇÒ ¼ö´Â ÀÖÀ¸³ª µ¤¾î¾²±â (OverPut) ÀÌ Áö¿øµÇÁö ¾Ê½À´Ï´Ù. µû¶ó¼­ OverPut Àº º°µµÀÇ ÇÔ¼ö¸¦ µÎ¾î ÇØ°áÇϵµ·Ï ÇßÀ¾´Ï´Ù. ÀÌ¿¡ ´ëÇؼ­´Â ´ÙÀ½ °­Á¿¡ ¾ð±ÞÀÌ ÀÖÀ»°ÍÀÔ´Ï´Ù. Hercules ÀÇ Ãâ·Â¸ðµâÀÇ µ¶Æ¯ÇÑ Á¡À̶ó¸é Ưº°È÷ Text back color ¿Í Text fore color ÀÇ ±¸º°À» µÐ´Ù±â º¸´Ù´Â WHITE ·Î ¾² ¸é º¸ÅëÀ¸·Î ³ª¿ÀÁö¸¸ BLACK À¸·Î ¾²¸é ¹ÝÀü ±Û¾¾°¡ ³ª¿Â´Ù´Â Á¡ÀÔ´Ï ´Ù. ÀÌ°ÍÀº ´Ü¼øÈ÷ ÆíÀÇ»ó ¸¸µé¾î µÐ °ÍÀ¸·Î BLACK À¸·Î ¾´´Ù´Â °ÍÀÌ ¹«ÀÇ¹Ì Çϱ⠶§¹®¿¡ ³ÖÀº °ÍÀÔ´Ï´Ù. ¾ÕÀ¸·Î´Â Hercules ¸ðµâ¿¡ WHITE,BLACK,LIGHTGRAY,DARKGRAY ÀÇ 4 °¡Áö »öÀ» ¾µ ¼ö ÀÖµµ·Ï ¹è·ÁÇØ º¸°ÚÀ¾´Ï´Ù. ÀÌ°ÍÀÌ °¡´ÉÇÏ´Ù¸é Çãŧ·¹½º¿¡¼­µµ º¸±âÁÁÀº À©µµ¿ì ¸Þ´º ¸¦ ¶ç¿ï ¼ö ÀÖÀ» ÅÙµ¥.. ±×·³ ¼Ò½º¸¦ º¸°ÚÀ¾´Ï´Ù. hputchh °¡ ÇÑ±Û Ãâ ·Â,hputche °¡ ¿µ¹® Ãâ·ÂÀÔ´Ï´Ù. **** hputche & hputchh #pragma inline #define BLACK 0 /* special define */ #include int ret_herc_offset(int y) { int m,n; n=y>>2; m=y-(n<<2); return (0x2000*m+80*n); } void hputche(int x,int y,char *buff,char color) { asm push ds _BX=ret_herc_offset(y); _DS=FP_SEG(buff); /* buff segment,offset */ _SI=FP_OFF(buff); asm mov ax,0b000h /* segment setting */ asm mov es,ax asm mov dx,WORD PTR x asm mov ax,dx asm shr dx,1 asm shr dx,1 asm shr dx,1 asm add bl,dl asm adc bh,0 /* asm shl dx,1 asm shl dx,1 asm shl dx,1 asm sub ax,dx */ asm and al,07h asm mov cl,al asm dec cl asm jnc nosign asm mov cl,8 nosign: asm mov ah,080h asm shr ah,cl asm dec ah /* ah = bitmask */ asm mov cx,16 asm mov di,bx asm mov bx,ax /* bx <- ax */ eloop: asm push cx asm mov cl,al asm mov al,ds:[si] asm ror al,cl asm mov ch,al asm cmp BYTE PTR color,BLACK <- BLACK ? asm jnz enext2 asm not al <- BLACK À̸é mask ¹ÝÀü enext2: asm and ah,al <- Masking asm or es:[di],ah <- È­¸é°ú OR ( left part ) asm mov ax,bx asm mov al,ch asm not ah <- Mask Reverse asm cmp BYTE PTR color,BLACK asm jnz enext3 asm not al enext3: asm and ah,al asm or es:[di+1],ah <- right part Ãâ·Â asm mov ax,bx asm inc si asm add di,2000h <- ¾Æ·¡·Î ÇÑÁÙ ³»¸² asm cmp di,8000h <- 8000 <= offset ? asm jb enext <- no. asm sub di,7fb0h <- yes. (7fb0 = 0x8000-80) enext: asm pop cx asm loop eloop asm pop ds } void hputchh(int x,int y,char *buff,char color) { asm push ds _BX=ret_herc_offset(y); _DS=FP_SEG(buff); /* buff segment,offset */ _SI=FP_OFF(buff); asm mov ax,0b000h /* segment setting */ asm mov es,ax asm mov dx,WORD PTR x asm mov ax,dx asm shr dx,1 asm shr dx,1 asm shr dx,1 asm add bl,dl asm adc bh,0 /* bx = offset */ /* asm shl dx,1 asm shl dx,1 asm shl dx,1 asm sub ax,dx */ asm and al,07h asm mov cl,al asm dec cl asm jnc nosign asm mov cl,8 nosign: asm mov ah,080h asm shr ah,cl asm dec ah /* ah = bitmask */ asm mov cx,16 asm mov dx,03ceh asm mov di,bx asm mov bx,ax /* bx <- ax */ hloop: asm push cx asm mov cl,al asm mov al,ds:[si] asm ror al,cl asm mov ch,al asm cmp BYTE PTR color,BLACK asm jnz hnext2 asm not al hnext2: asm and ah,al asm or es:[di],ah <- left part Ãâ·Â asm mov ax,bx asm mov al,ch asm not ah asm cmp BYTE PTR color,BLACK asm jnz hnext5 asm not al hnext5: asm and ah,al asm or es:[di+1],ah <- middle part #1 asm mov ax,bx asm inc si asm mov al,ds:[si] asm ror al,cl asm mov ch,al asm and al,ah asm cmp BYTE PTR color,BLACK asm jnz hnext3 asm not al hnext3: asm and ah,al asm or es:[di+1],ah <- middle part #2 asm mov ax,bx asm mov al,ch asm not ah asm cmp BYTE PTR color,BLACK asm jnz hnext4 asm not al hnext4: asm and ah,al asm or es:[di+2],ah <- right part asm mov ax,bx asm inc si asm add di,2000h asm cmp di,8000h asm jb hnext asm sub di,7fb0h hnext: asm pop cx asm loop hloop asm mov ax,1 /* initializing */ asm out dx,ax asm mov ax,0ff08h asm out dx,ax asm pop ds } ¼³¸íÀÌ ÀÚ¼¼ÇÏÁø ¾ÊÁö¸¸ Áß¿äÇÑ °Ç masking °ú offset °è»êÀÇ ¿î¿ëÀÌ ´Ï ¸ðµâ ¾ÕºÎºÐÀÇ ½¬ÇÁÆ® ¿¬»ê°ú mask °è»êÀ» À§ÇÑ ¿¬»êÀ» Àß »ìÆ캸 µµ·Ï Çϼ¼¿ä. Àú¹ø [1] °­Á¿¡ ºñ±³Àû ¼³¸íÀÌ ÀÚ¼¼ÇÏ´Ï ±×°É ÂüÁ¶Çϼ¼ ¿ä. À§ÀÇ Çãŧ·¹½º ÇÑ±Û ¸ðµâÀº Middle Part ¸¦ Ãâ·ÂÇÔ¿¡ ÀÖ¾î ¹Ì¸® ORing ÇÏÁö ¾Ê°í µû·Î Ãâ·ÂÇߴµ¥ ÀÌ´Â È­¸é Ãâ·Âµµ OR À» ÀÌ¿ëÇϱ⠶§¹®ÀÔ´Ï´Ù. º°µµ·Î ±¸ºÐÇÏÁö ¾ÊÀº ¼ÀÀÌÁÒ. µû¶ó¼­ 4 ¹ø Ãâ·ÂÇØ¾ß ÇÑ ´Ù Çصµ ¼Óµµ¿¡´Â º°·Î ¿µÇâÀ» ÁÖÁö ¾Ê½À´Ï´Ù. ±×·³ »õ·Î¿î ÇÔ¼ö¸¦ ¼³°èÇØ º¾½Ã´Ù. ±ÛÀÚ È®´ëµî ¾µ ¸ñÀûÀÌ ²Ï ¸¹ÀÌ Àִµ¥..(¹°·Ð ±ÛÀÚÈ®´ë & ÇÑÀÚ±â´É Àº ³ªÁß¿¡ Ãß°¡ÇÒ ±â´ÉÀÔ´Ï´Ù¸¸.) ÀÏ´Ü Ä¿³ÎÀ» ¿Ï°áÁþ´Â´Ù´Â Àǹ̿¡¼­ »ìÆ캸µµ·Ï ÇÏÁÒ. Çü½ÄÀº ´ÙÀ½°ú °°½À´Ï´Ù. void vputchmn(int x,int y,char *buff,int m,int n,char color); : (x,y) À§Ä¡ (µµÆ®À§Ä¡) ¿¡ °¡·Î m byte,¼¼·Î n dot ÀÇ buff µ¥ÀÌÅÍ ¸¦ VGA 16 color È­¸é¿¡¼­ color ·Î Ãâ·ÂÇÑ´Ù. ¾Õ¿¡¼­ Çß´ø vputche ÀÇ È®ÀåÆÇÀ̶ó°í ÇÒ ¼ö ÀÖ°ÚÀ¾´Ï´Ù. ½ÇÁ¦·Î ³»ºÎ ·çƾÀ» »ìÆ캸¸é vputche ÀÇ ³»ºÎ·çƾÀ» ¾à°£ÀÇ Æ®¸¯°ú ÇÔ²² ·çÇÁ·Î ¹Ýº¹ÇÏ°í ÀÖ´Â °Í¿¡ Áö³ªÁö ¾Ê½À´Ï´Ù. ¿¹¸¦ µé¾î º¾½Ã´Ù. ¿ì¸®´Â vputche ¿¡¼­ ÇÑÀÚ¸¦ Ãâ·ÂÇϱâ À§Çؼ­ ¸Å¹ø mask ¸¦ °è»êÇØ¾ß ÇßÀ¾´Ï ´Ù. ÀÌ´Â ÇÔ¼ö ¸ðµâ ÀÚü°¡ ÇÑÀÚ¸¦ Ãâ·ÂÇϵµ·Ï ¸¸µé¾î Á³±â ¶§¹®ÀÔ´Ï ´Ù. ±×·¯³ª vputchmn ÇÔ¼öÀÇ °æ¿ì °¡·Î m byte,¼¼·Î n dot.. Áï mxn ¹ÙÀÌÆ®¸¦ Ãâ·ÂÇØ¾ß ÇϹǷΠ¸Å¹ø mask ¸¦ °è»êÇÒ ¼ö´Â ¾ø´Â ÀÏÀÔ´Ï´Ù. ´ÙÇàÈ÷µµ x1,y1~x2,y2 ±îÁö¸¦ Â÷ÁöÇÏ°Ô µÈ´Ù°í °¡Á¤ÇÒ¶§ x1 ¿¡ ÀÇÇؼ­ ¸¸ mask ´Â °áÁ¤µË´Ï´Ù. ¿Ö³ÄÇϸé x1,y1~x2,y1 ±îÁö¸¦ ÀÏ´Ü Ãâ·ÂÇÑ´Ù °í ÇÒ¶§ óÀ½ mask ¸¦ °¡Áö°í left part ¸¦ Ãâ·ÂÇÏ°í ~mask ¸¦ °¡Áö°í right park ¸¦.. ´ÙÀ½ ¹ÙÀÌÆ®´Â ´Ù½Ã mask ¸¦ °¡Áö°í left part ¸¦.. ÀÌ·± ½ÄÀ¸·Î ¹Ýº¹ÇÏ¸é µÇ´Â °ÍÀÌÁÒ. ´Ù½Ã x1,y1+1~x2,y1+1 ÀÇ ÇÑÁÙÀ» Ãâ·ÂÇÒ¶§´Â ´Ù½Ã mask ¸¦ °¡Áö°í Ãâ·ÂÀ» ½ÃÀÛÇÏ¸é µÇ°í..ÀÌ ¹æ¹ýÀ¸·Î 2 Áß ·çÇÁ¸¦ µ¹¸®¸é vputchmn ½ø¸¸µé¾î ³¾ ¼ö ÀÖÀ¾´Ï´Ù. ÀÌ vputchmn ÇÔ¼öÀÇ ÀåÁ¡Àº Hercules ¿ë ÆùÆ®µ¥ÀÌÅÍ.. Áï Hercules ¿¡¼­ Àâ¾Æ¿Â Bit map µ¥ÀÌÅ͸¦ º°´Ù¸¥ ¼öÁ¤¾øÀÌ VGA È­¸é¿¡ Á÷Á¢ »Ñ¸±¼ö ÀÖ´Ù´Â Á¡ ÀÔ´Ï´Ù. Hercules ±×¸² µ¥ÀÌÅ͸¦ VGA È­¸é¿¡ º¸¿©Áִµ¥¿¡µµ ÀÌ¿ëÇÒ ¼ö ÀÖÀ¾´Ï´Ù. ÀÓÀÇ Å©±âÀÇ Font ¸¦ Ãâ·ÂÇϴµ¥µµ ¾µ ¼ö ÀÖ´Ù´Â °ÍÀº ÀÌ¹Ì ÁÖÁöÇÑ ¹Ù¿Í °°½À´Ï´Ù. Hercules ¿¡¼­ ±¸ÇöÇϴµ¥ º°´Ù¸¥ Â÷ÀÌÁ¡ Àº ¾ø½À´Ï´Ù. ¾à°£ÀÇ ÁÖ¼®À» ´Þ¾ÒÀ¸´Ï ÂüÁ¶ÇϽñ⠹ٶø´Ï´Ù. ±×·³ ¼Ò ½ºÀÔ´Ï´Ù. ** vputchmn #pragma inline #include void vputchmn(int x,int y,char *buff,int m,int n,char color) { int y_width=n; int x_width=m; asm push ds _DS=FP_SEG(buff); /* buff segment,offset */ _SI=FP_OFF(buff); asm mov dx,3ceh /* writing mode */ asm mov ax,0005h asm out dx,ax asm mov al,0 asm mov ah,color asm out dx,ax asm mov ax,0f01h asm out dx,ax asm mov ax,0a000h /* segment setting */ asm mov es,ax asm mov ax,WORD PTR y /* offset,bitmask */ asm mov bx,80 asm mul bx asm mov bx,ax asm mov dx,WORD PTR x asm mov ax,dx asm shr dx,1 asm shr dx,1 asm shr dx,1 asm add bl,dl asm adc bh,0 /* offset °è»ê */ /* asm shl dx,1 asm shl dx,1 asm shl dx,1 asm sub ax,dx */ asm and al,07h asm mov cl,al asm dec cl asm jnc nosign asm mov cl,8 nosign: asm mov ah,080h asm shr ah,cl asm dec ah /* ah = bitmask */ asm mov dx,03ceh asm mov di,bx /* di ¿¡ È­¸é ¿É¼ÂÀ» ¿Å±ä´Ù. asm mov bx,ax /* bx <- ax */ ^-- ah (bitmask) ¸¦ ÀúÀåÇÑ´Ù. asm mov cx,WORD PTR y_width <- ¿ÜºÎ·çÇÁ nloop : asm push cx asm push di <- screen offset À» ÀúÀå asm mov cx,WORD PTR x_width <- ³»ºÎ·çÇÁ mloop : asm push cx asm mov cl,al asm mov al,ds:[si] asm ror al,cl asm and ah,al asm mov ch,al asm mov al,8 asm out dx,ax asm mov ah,es:[di] /* output left part */ asm mov es:[di],ah asm mov ax,bx asm mov al,ch asm not ah <- mask ¹ÝÀü (~mask) asm and ah,al asm mov al,8 asm out dx,ax asm mov ah,es:[di+1] /* output right part */ asm mov es:[di+1],ah asm mov ax,bx <- bitmask º¹±Í.. (ah) asm inc si asm inc di asm pop cx asm loop mloop asm pop di asm pop cx asm add di,80 asm loop nloop asm mov ax,1 /* initializing */ asm out dx,ax asm mov ax,0ff08h asm out dx,ax asm pop ds } ** hputchmn #pragma inline #define BLACK 0 /* special define */ #include extern int ret_herc_offset(int y); void hputchmn(int x,int y,char *buff,int m,int n,char color) { int x_width=m; int y_width=n; asm push ds _BX=ret_herc_offset(y); _DS=FP_SEG(buff); /* buff segment,offset */ _SI=FP_OFF(buff); asm mov ax,0b000h /* segment setting */ asm mov es,ax asm mov dx,WORD PTR x asm mov ax,dx asm shr dx,1 asm shr dx,1 asm shr dx,1 asm add bl,dl asm adc bh,0 /* asm shl dx,1 asm shl dx,1 asm shl dx,1 asm sub ax,dx */ asm and al,07h asm mov cl,al asm dec cl asm jnc nosign asm mov cl,8 nosign: asm mov ah,080h asm shr ah,cl asm dec ah /* ah = bitmask */ asm mov di,bx asm mov bx,ax <- ah º¸Á¸ (bitmask) asm mov cx,WORD PTR y_width nloop: asm push cx asm push di <- È­¸é ¿É¼Â asm mov cx,WORD PTR x_width mloop: asm push cx asm mov cl,al asm mov al,ds:[si] asm ror al,cl asm mov ch,al asm cmp BYTE PTR color,BLACK asm jnz enext2 asm not al enext2: asm and ah,al asm or es:[di],ah asm mov ax,bx asm mov al,ch asm not ah <- mask ¹ÝÀü (~mask) asm cmp BYTE PTR color,BLACK asm jnz enext3 asm not al enext3: asm and ah,al asm or es:[di+1],ah asm mov ax,bx <- ah º¹±Í (bitmask) asm inc si asm inc di asm pop cx asm loop mloop asm pop di asm pop cx asm add di,2000h asm cmp di,8000h asm jb enext4 asm sub di,7fb0h enext4: asm loop nloop asm pop ds } À½.. ²Ï ±æ¾îÁ®¹ö·È´Âµ¥.. ¼Ò½º¶«½Ã... ¾î¶µç ÇÑ/¿µ/ÇÑÀÚ Ãâ·Â Ä¿³Î Àº ¿Ï¼ºµÈ ¼ÀÀÔ´Ï´Ù. ´ÙÀ½ °­Á´ ¿¹°íÇÑ´ë·Î ³»ÀåÆùÆ®/È­ÀÏÆùÆ® ±¸Çö ¹ýÀÔ´Ï´Ù. ±×·³..