¡¡

< 10Àå ¿¬½À¹®Á¦ > 9514077 D¹Ý ±è ÁøÈ£

¡¡

3. 300 - 200 À» °è»êÇÏ´Â ÇÁ·Î±×·¥À» ÀÛ¼ºÇϵÇ, ±× °á°ú¸¦ RESULT ¶ó´Â ÁÖ±â¾ï °ø°£ÀÇ º¯¼ö¿¡ ÀúÀåÇÏ°í À̸¦ DEBUGGER ·Î ÃßÀûÇÏ¿© ±× °á°ú¸¦ È­¸éÀ¸·Î È®ÀÎÇϽÿÀ.

¡¡

CODE             segment                                                                          < DEBUG ¸í·É ½ÇÇà È­¸é >

                     assume    CS:CODE, DS:CODE

;

                     MOV         AX,300                                                                 MOV        AX,012C  

                     MOV         CX,200                                                                 MOV        CX,00C8

                     SUB          AX,CX                                                                  SUB         AX,CX

                     MOV         AL,RESULT                                                           MOV        AL,[000F] DS:000F=03

                     MOV         AH,2

                     INT           21H                                                                       < ³ª¸ÓÁö ºÎºÐÀº »ý·«.. >

                     MOV         AH,4CH

                     INT            21H

;

RESULT         DB             0

CODE             ends

                     end

¡¡

¡¡

4. º¯¼ö TROUT ¿¡ 80000 ÀÌ ÀÖ°í, ¶Ç ´Ù¸¥ º¯¼ö ROUTE ¿¡ 45 °¡ ÀúÀåµÇ¾î ÀÖ´Ù°í ÇÏÀÚ. ÀÌ º¯¼ö¸¦ ¼­·Î µ¡¼À, »¬¼À, °ö¼À, ³ª´°¼ÀÀ» ÇÏ´Â ÇÁ·Î±×·¥À» ÀÛ¼ºÇϽÿÀ. ±×¸®°í ±× °á°ú¸¦ DEBUGGER ÀÇ ¸í·ÉÀ» »ç¿ëÇÏ¿© ÃßÀûÇÏ´Â ÇÁ·Î±×·¥À» ÀÛ¼ºÇϽÿÀ.

¡¡

¡¡

CODE           SEGMENT                                                                             <DEBUGGER ¸í·É T »ç¿ë½Ã È­¸é Ãâ·Â>

                     assume     cs:CODE, DS:CODE                                                      ÃßÀû

;

                     MOV           AX,80000                                                              MOV          AX,3880

                     MOV           CX,45                                                                   MOV          CX,002D

                     ADD            AX,CX                                                                  ADD           AX,CX

                     MOV            AL,RESULT                                                          MOV          AL,[000F]

                     mov             ah,4ch                                                                MOV          AH,4C

                     int                21h                                                                     INT            21h

¡¡

;                                                                                                                 JMP           0364 : 04A0

RESULT         DB               0                                                                        CMP          AH,72

CODE             ENDS                                                                                    TNB           04E3

                     END                                                                                       TEST BYTE PTR [0035],02

                                                                                                                                                        CS:0035=03

¡¡

¡¡

CODE           segment

                    assume     cs:CODE,  DS:CODE

;

                    MOV          AX,80000

                    MOV          CX,45

                    SUB           AX,CX 

                    MOV           DX,AX

                    MOV           AH,2

                     INT             21H

                     mov            ah,4ch

                     int                21h

;

CODE             ends

                     end

¡¡

¡¡

CODE             segment

                     assume      CS:CODE, DS:CODE

;

                     mov           AX,80000

                     mov           CL,45

                     MUL           CL

                     mov            ah,4ch

                      int             21h

;

CODE              ENDS

                      end

¡¡

¡¡

CODE              SEGMENT

                      ASSUME     CS:CODE, DS:CODE

;

                       MOV         AX,80000

                       MOV         CL,45

                       DIV           CL

                       MOV         AH,4CH

                        INT           21H

;

CODE               ENDS

                       END

¡¡

¡¡

¡¡

14Àå. 1. Ã¥ÀÇ ¿¹Á¦¸¦ ¸î °³ ¸ð¾Æ¼­ À̸¦ ÇÁ·Î½ÃÀú·Î Àç Á¤ÀÇÇÏ°í, ´ÜÀÏ ÇÁ·Î±×·¥À¸·Î ½ÇÇà ÇØ º¸½Ã¿À

¡¡

¡¡

<PROCX.ASM + PROC1.ASM>

¡¡

CODE              segment

                      assume     cs:CODE, DS:CODE

                      CALL           SETVIDEO

HERE:              CALL           WRITE_R

BACK:              CALL           RESTORE

RESTORE                          PROC

                       MOV           AH,0H

                       MOV           AL,12H

                        INT             10H

                       ENDP

                       JMP             EXIT

SETVIDEO                           PROC

;

                       MOV            AH,0H

                       MOV            AL,05H

                        INT             10H

                       ENDP

                       JMP             HERE

WRITE_R                             PROC

                       mov              ah,2

                       mov              dl,52h

                       Int                 21h

                       ENDP

                       JMP              BACK

EXIT:                mov              al,16

                       mov              ah,4ch

                       Int                 21h

CODE               ends

;

                       end

¡¡