汇编决赛

;-------------------------数据段的定义----------------------------------
  DATA_SEG    SEGMENT
SCHOOL DB 'the school life$'
ITEM   DB '1: STORY START$'
ITEM1  DB '2: EXIT$'
HELP   DB 'PLEASE INPUT 1 TO START THE STORY,INPUT 2 TO QUIT$'
STORY  DB 'sO, ONE DAY, LIU JOYFULLY TO 1 EXPERIMENT UPSTAIRS ',0AH,0DH                    ;故事情节描述
       DB  0AH,0DH,'          SELF-STUDY,THE WEATHER WAS VERY COLD, EATING SWEET ',0AH,0DH
       DB  0AH,0DH,'          POTATO, WHILE HAPPY WITH sHUwENjING JUST COME BACK'  ,0AH,0DH
       DB  0AH,0DH,'          FROM TEACHING BUILDING, TWO PEOPLE MEET BY  CHANCE,' ,0AH,0DH
       DB  0AH,0DH,'          AFTER OPEN THE FOLLOW-UP STORY...$'
LIU1   DB  'HELLO,SHUWENJING,HOW ARE YOU?$'                                                ;两个人的对话内容
SHU1   DB  'i AM FINE THANK YOU,i HEARED$'
SHU2       DB  'THAT YOU PARCIPICATED THE asm COMPETE?$'
LIU2   DB  'yES,i HAVE ACCOMPLISHED THE $'
LIU3       DB    'PROGRAM,i WILL DISPLAY IT.$'
SHU3   DB  'ok,LET US SEE.$'
SHU4   DB  'oh,THAT IS GREAT,YOU ARE SO CLEVER.$'
LIU4   DB  'THANK YOU,dO NOT MODEST,i CONSIDER$ '
LIU5       DB         'YOUR PROGRAM MAKES BETTER THAN ME.$'
SHU5   DB  'mY PROGRAM IS A MUSIC,LET US SEE.$'
KO     DB  40 DUP(' '),'$'
MUS_FREQ DW 330,330,349,392,392,349,330,294,262,262,294,330,330,294,294                       ;歌曲的曲谱音符对应的频率
         DW 330,330,349,392,392,349,330,294,262,262,294,330,294,262,262
         DW 292,294,330,262,294,330,349,330,262,294,330,349,330,262,262,294,196,330
         DW 330,330,349,392,392,349,330,294,294,262,262,294,330,294,262,262
          DW 330,330,349,392,392,349,330,294,262,262,294,330,330,294,294
         DW 330,330,349,392,392,349,330,294,262,262,294,330,294,262,262
         DW 292,294,330,262,294,330,349,330,262,294,330,349,330,262,262,294,196,330
         DW 330,330,349,392,392,349,330,294,294,262,262,294,330,294,262,262
         DW 330,330,349,392,392,349,330,294,262,262,294,330,330,294,294
         DW 330,330,349,392,392,349,330,294,262,262,294,330,294,262,262
         DW 292,294,330,262,294,330,349,330,262,294,330,349,330,262,262,294,196,330
         DW 330,330,349,392,392,349,330,294,294,262,262,294,330,294,262,262
         DW -1
MUS_TIME DW 14 DUP(5),10                                                                      ;歌曲每个音符的延时时间
         DW 14 DUP(5),10
         DW 4  DUP(5),10 DUP(4),5,5,5
         DW 4 DUP(5),5 DUP(4),6 DUP(5),10
        DW 14 DUP(5),10
         DW 14 DUP(5),10
         DW 4  DUP(5),10 DUP(4),5,5,5
         DW 4 DUP(5),5 DUP(4),6 DUP(5),10
      DW 14 DUP(5),10
         DW 14 DUP(5),10
         DW 4  DUP(5),10 DUP(4),5,5,5
         DW 4 DUP(5),5 DUP(4),6 DUP(5),10
BOY  DB  53                                                                                  ;男孩像素点描述
     DB 7CH,01H,0,0
     DB 7CH,01H,1,0
     DB 7CH,01H,1,0
     DB 7CH,01H,1,0
     DB 2DH,01H,0,1
     DB 2DH,01H,0,1
     DB 2DH,01H,0,1
     DB 2DH,01H,0,1
     DB 2DH,01H,0,1
     DB 7CH,01H,0,1
     DB 7CH,01H,-1,0
     DB 7CH,01H,-1,0
     DB 7CH,01H,-1,0
     DB 2DH,01H,0,-1
     DB 2DH,01H,0,-1
     DB 2DH,01H,0,-1
     DB 2DH,01H,0,-1
     DB 2DH,01H,0,-1
     DB 2DH,01H,1,1
     DB 2DH,01H,0,2
     DB 5CH,01H,3,0
     DB 5CH,01H,1,1
     DB 5CH,01H,1,1
     DB 5CH,01H,1,1
     DB 2FH,01H,0,-8
     DB 2FH,01H,-1,1
     DB 2FH,01H,-1,1
     DB 2FH,01H,-1,1
     DB 7CH,01H,1,0
     DB 7CH,01H,1,0
     DB 7CH,01H,1,0
     DB 7CH,01H,1,0
     DB 7CH,01H,1,0
     DB 7CH,01H,1,0
     DB 7CH,01H,1,0
     DB 7CH,01H,1,0
     DB 2DH,01H,0,-1
     DB 7CH,01H,0,-1
     DB 7CH,01H,-1,0
     DB 2DH,01H,0,1
     DB 2DH,01H,0,4
     DB 7CH,01H,0,1
     DB 7CH,01H,1,0
     DB 2DH,01H,0,-1
     DB 7CH,01H,0,-1
     DB 7CH,01H,-1,0
     DB 7CH,01H,-1,0
      DB 7CH,01H,-1,0
     DB 7CH,01H,-1,0
      DB 7CH,01H,-1,0
     DB 7CH,01H,-1,0
      DB 7CH,01H,-1,0
     DB 4FH,01H,-3,-1

GIRL DB 38                                                                   ;女孩像素点描述
     DB 7CH,0CH,0,0
     DB 7CH,0CH,1,0
     DB 5CH,0CH,1,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2FH,0CH,0,1
     DB 7CH,0CH,-1,0
     DB 7CH,0CH,-1,0
     DB 5CH,0CH,-1,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2FH,0CH,0,-1
     DB 2DH,0CH,1,1
     DB 2DH,0CH,0,2
     DB 4FH,0CH,1,-1
     DB 2FH,0CH,2,-1
     DB 2FH,0CH,1,-1
     DB 2FH,0CH,1,-1
     DB 2DH,0CH,0,1
     DB 7CH,0CH,1,1
     DB 7CH,0CH,1,0
     DB 7CH,0CH,1,0
     DB 7CH,0CH,1,0
     DB 7CH,0CH,1,0
     DB 7CH,0CH,1,0
     DB 7CH,0CH,0,3
     DB 7CH,0CH,-1,0
     DB 7CH,0CH,-1,0
     DB 7CH,0CH,-1,0
     DB 7CH,0CH,-1,0
     DB 7CH,0CH,-1,0

     DB 2DH,0CH,-1,1
     DB 5CH,0CH,0,1
     DB 5CH,0CH,-1,-1
     DB 5CH,0CH,-1,-1

OOO  DB 56                                                                   ;字母O像素点描述
     DB 7CH,0CH,0,0
     DB 7CH,0CH,1,0
     DB 7CH,0CH,1,0
     DB 7CH,0CH,1,0
     DB 5CH,0CH,1,0
     DB 5CH,0CH,1,1
     DB 5CH,0CH,1,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2FH,0CH,0,1
     DB 2FH,0CH,-1,1
     DB 2FH,0CH,-1,1
     DB 7CH,0CH,-1,0
     DB 7CH,0CH,-1,0
     DB 7CH,0CH,-1,0
     DB 7CH,0CH,-1,0
     DB 5CH,0CH,-1,0
     DB 5CH,0CH,-1,-1
     DB 5CH,0CH,-1,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2FH,0CH,0,-1
     DB 2FH,0CH,1,-1
     DB 2FH,0CH,1,-1
     DB 7CH,0CH,1,1
     DB 7CH,0CH,1,0
     DB 7CH,0CH,1,0
     DB 7CH,0CH,1,0
     DB 5CH,0CH,1,0
     DB 5CH,0CH,1,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2FH,0CH,0,1
     DB 2FH,0CH,-1,1
     DB 7CH,0CH,-1,0
     DB 7CH,0CH,-1,0
     DB 7CH,0CH,-1,0
     DB 7CH,0CH,-1,0
     DB 5CH,0CH,-1,0
     DB 5CH,0CH,-1,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2FH,0CH,0,-1
     DB 2FH,0CH,-1,-1
     EEE  DB 106
     DB 7CH,0CH,-10,0
     DB 7CH,0CH,1,0
     DB 7CH,0CH,1,0
     DB 7CH,0CH,1,0
     DB 7CH,0CH,1,0
     DB 7CH,0CH,1,0
     DB 7CH,0CH,1,0
     DB 7CH,0CH,1,0
     DB 7CH,0CH,1,0
     DB 7CH,0CH,1,0
     DB 7CH,0CH,1,0
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 7CH,0CH,0,1
     DB 7CH,0CH,-1,0
     DB 7CH,0CH,-1,0
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 7CH,0CH,0,-1
     DB 7CH,0CH,-1,0
     DB 7CH,0CH,-1,0
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 7CH,0CH,0,1
     DB 7CH,0CH,-1,0
     DB 7CH,0CH,-1,0
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 7CH,0CH,0,-1
     DB 7CH,0CH,-1,0
     DB 7CH,0CH,-1,0
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 2DH,0CH,0,1
     DB 7CH,0CH,0,1
     DB 7CH,0CH,-1,0
     DB 7CH,0CH,-1,0
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
    DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2DH,0CH,0,-1
     DB 2BH,0CH,1,0
     DB 2BH,0CH,0,1
     DB 2BH,0CH,0,1
     DB 2BH,0CH,0,1
     DB 2BH,0CH,0,1
     DB 2BH,0CH,0,1
     DB 2BH,0CH,0,1
     DB 2BH,0CH,0,1
     DB 2BH,0CH,0,1
     DB 2BH,0CH,1,-8
     DB 2BH,0CH,1,0
     DB 2BH,0CH,1,0
     DB 2BH,0CH,1,0
     DB 2BH,0CH,0,1
     DB 2BH,0CH,0,1
     DB 2BH,0CH,0,1
     DB 2BH,0CH,0,1
     DB 2BH,0CH,0,1
     DB 2BH,0CH,0,1
     DB 2BH,0CH,0,1
     DB 2BH,0CH,0,1
     DB 2BH,0CH,1,-8
     DB 2BH,0CH,1,0
     DB 2BH,0CH,1,0
     DB 2BH,0CH,1,0
     DB 2BH,0CH,0,1
     DB 2BH,0CH,0,1
      DB 2BH,0CH,0,1
     DB 2BH,0CH,0,1
      DB 2BH,0CH,0,1
     DB 2BH,0CH,0,1
      DB 2BH,0CH,0,1
     DB 2BH,0CH,0,1
xxx  db 67                                                                    ;字母X像素点描述
      DB 2FH,0CH,0,0
      DB 5CH,0CH,0,1
      DB 2FH,0CH,0,9
      DB 5CH,0CH,0,1
      DB 2FH,0CH,1,0
      DB '+',0CH,0,-1
      DB 2FH,0CH,0,-1
      DB 5CH,0CH,0,-7
      DB '+',0CH,0,-1
      DB 5CH,0CH,0,-1
      DB 5CH,0CH,1,1
      DB '+',0CH,0,1
      DB 5CH,0CH,0,1
      DB 2FH,0CH,0,5
      DB '+',0CH,0,1
      DB 2FH,0CH,0,1

      DB 2FH,0CH,1,-1
      DB '+',0CH,0,-1
      DB 2FH,0CH,0,-1
      DB 5CH,0CH,0,-3
      DB '+',0CH,0,-1
      DB 5CH,0CH,0,-1
      DB 5CH,0CH,1,1
      DB '+',0CH,0,1
      DB 5CH,0CH,0,1
      DB 2FH,0CH,0,1
      DB '+',0CH,0,1
      DB 2FH,0CH,0,1

      DB 2FH,0CH,1,-1
      DB '+',0CH,0,-1
      DB '+',0CH,0,-1
      DB 5CH,0CH,0,-1

      DB 2FH,0CH,1,0
      DB '+',0CH,0,1
      DB '+',0CH,0,1
      DB 5CH,0CH,0,1
      DB 5CH,0CH,1,1
      DB '+',0CH,0,-1
      DB 5CH,0CH,0,-1
      DB 2FH,0CH,0,-1
      DB '+',0CH,0,-1
      DB 2FH,0CH,0,-1
      DB 2FH,0CH,1,-1
      DB '+',0CH,0,1
      DB 2FH,0CH,0,1
      DB 5CH,0CH,0,3
      DB '+',0CH,0,1
      DB 5CH,0CH,0,1

      DB 5CH,0CH,1,1
      DB '+',0CH,0,-1
      DB 5CH,0CH,0,-1
      DB 2FH,0CH,0,-5
      DB '+',0CH,0,-1
      DB 2FH,0CH,0,-1

      DB 5CH,0CH,1,0
      DB 2FH,0CH,0,1
      DB 5CH,0CH,0,7

      DB 2FH,0CH,0,1

; DB 2FH,0CH,1,0
    ;  DB 5CH,0CH,0,-1
    ;  DB 2FH,0CH,0,-9
    ;  DB 5CH,0CH,0,-1

    ;    DB 2FH,0CH,1,-1
    ;  DB '+',0CH,0,1
     ; DB 2FH,0CH,0,1
     ; DB 5CH,0CH,0,7

     ; DB '+',0CH,0,1
     ; DB 5CH,0CH,0,1
     ; DB 2FH,0CH,1,0
     ; DB 5CH,0CH,0,-1
     ; DB 2FH,0CH,0,-9
     ; DB 5CH,0CH,0,-1
 yyy db 36                                                         ;字母Y像素点描述
    DB 2Fh,0CH,0,0
    DB 5CH,0CH,0,1
    DB 2FH,0CH,0,9
    DB 5CH,0CH,0,1
    DB 2FH,0CH,1,0
    DB 2FH,0CH,0,-2
    DB 5CH,0CH,0,-7
    DB 5CH,0CH,0,-2
    DB 5CH,0CH,1,1
    DB 5CH,0CH,0,2
    DB 2FH,0CH,0,5
    DB 2FH,0CH,0,2
    DB 2FH,0CH,1,-1
    DB 2FH,0CH,0,-2
    DB 5CH,0CH,0,-3
    DB 5CH,0CH,0,-2
    DB 5CH,0CH,1,1
    DB 5CH,0CH,0,2
    DB 2FH,0CH,0,1
    DB 2FH,0CH,0,2
    DB 2FH,0CH,1,-1
    DB 5CH,0CH,0,-3
    DB '|',0CH,1,0
    DB '|',0CH,0,2
    DB '|',0CH,1,0
    DB '|',0CH,0,-2
    DB '|',0CH,1,0
    DB '|',0CH,0,2
    DB '|',0CH,1,0
    DB '|',0CH,0,-2
    DB '|',0CH,1,0
    DB '|',0CH,0,2
    DB '|',0CH,1,0
    DB '|',0CH,0,-2
    DB '|',0CH,1,0
    DB '|',0CH,0,2

 iii        DB 65                                                       ;字母I像素点描述
             DB 7CH,0CH,0,0
             DB '_',0CH,0,1
             DB '_',0CH,-1,0
             DB 7CH,0CH,-8,0
             DB '_',0CH,-1,1
             DB 3DH,0CH,1,0
             DB '_',0CH,8,0
             DB '_',0CH,1,0
             DB '_',0CH,0,1
             DB '_',0CH,-1,0
             DB 3DH,0CH,-8,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB 3DH,0CH,1,0
             DB '_',0CH,8,0
             DB '_',0CH,1,0
             DB '_',0CH,0,1
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 3DH,0CH,-1,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB 3DH,0CH,1,0
             DB 2BH,0CH,1,0
             DB 2BH,0CH,1,0
             DB 2BH,0CH,1,0
             DB 2BH,0CH,1,0
             DB 2BH,0CH,1,0
             DB 2BH,0CH,1,0
             DB 2BH,0CH,1,0
             DB 2BH,0CH,1,0
             DB '_',0CH,1,0
             DB '_',0CH,0,1
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 3DH,0CH,-1,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB 3DH,0CH,1,0
             DB '_',0CH,8,0
             DB '_',0CH,1,0
             DB '_',0CH,0,1
             DB '_',0CH,-1,0
             DB 3DH,0CH,-8,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB 3DH,0CH,1,0
             DB '_',0CH,8,0
             DB '_',0CH,1,0
             DB '_',0CH,0,1
             DB '_',0CH,-1,0
             DB 7CH,0CH,-8,0
             DB 7CH,0CH,9,1
  aaaa       DB 57                                                        ;字母A像素点描述
             DB '_',0CH,0,0
             DB 7CH,0CH,1,0
             DB 3DH,0CH,0,1
             DB 2FH,0CH,-1,0
             DB 2FH,0CH,-1,1
             DB 2FH,0CH,1,0
             DB 3DH,0CH,1,0
             DB 3DH,0CH,0,1
             DB '_',0CH,-1,0
             DB 2FH,0CH,-1,0
             DB 2FH,0CH,-1,0
             DB 2FH,0CH,-1,1
             DB 2FH,0CH,1,0
             DB '_',0CH,2,0
             DB 7CH,0CH,1,0
             DB '_',0CH,-3,1
             DB 2FH,0CH,-1,0
             DB 2FH,0CH,-1,0
             DB 2FH,0CH,-1,1
             DB 2FH,0CH,1,0
             DB '_',0CH,1,0
             DB '_',0CH,1,0
             DB '_',0CH,0,1
             DB '_',0CH,-1,0
             DB 2FH,0CH,-2,0
             DB 2FH,0CH,-1,0
             DB '_',0CH,-1,1
             DB 2FH,0CH,1,0
             DB '_',0CH,3,0
             DB '_',0CH,1,0
             DB '_',0CH,0,1
             DB '_',0CH,-1,0
             DB 5CH,0CH,-2,0
             DB 5CH,0CH,-1,0
             DB 5CH,0CH,1,1
             DB 5CH,0CH,1,0
             DB '_',0CH,1,0
             DB '_',0CH,1,0
             DB '_',0CH,0,1
             DB 5CH,0CH,-1,0
             DB 5CH,0CH,-1,0
             DB 5CH,0CH,1,1
             DB 5CH,0CH,1,0
             DB '_',0CH,2,0
             DB 7CH,0CH,1,0
             DB 3DH,0CH,0,1
             DB '_',0CH,-1,0
             DB 5CH,0CH,-1,0
             DB 5CH,0CH,-1,0
             DB 5CH,0CH,1,1
             DB 5CH,0CH,1,0
             DB 3DH,0CH,1,0
             DB 3DH,0CH,0,1
             DB 5CH,0CH,-1,0
             DB '_',0CH,0,1
             DB 3DH,0CH,1,0
             DB 7CH,0CH,0,1
  qqq        DB 90                                                    ;字母Q像素点描述
             DB 7CH,0CH,0,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 5CH,0CH,1,1
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 2FH,0CH,-1,0
             DB 2FH,0CH,-1,1
             DB 2FH,0CH,1,0
             DB 5CH,0CH,7,0
             DB 5CH,0CH,1,0
             DB 5CH,0CH,0,1
             DB '_',0CH,-1,0
             DB 2FH,0CH,-8,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB '_',0CH,1,0
             DB 2FH,0CH,7,0
             DB '_',0CH,1,0
             DB '_',0CH,1,0
             DB '_',0CH,0,1
             DB '_',0CH,-1,0
             DB 2FH,0CH,-1,0
             DB 2FH,0CH,-1,0
             DB '_',0CH,-6,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB '_',0CH,1,0
             DB '_',0CH,5,0
             DB 2FH,0CH,1,0
             DB '_',0CH,2,0
             DB '_',0CH,1,0
             DB '_',0CH,0,1
             DB '_',0CH,-1,0
             DB '_',0CH,-3,0
             DB '_',0CH,-5,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB '_',0CH,1,0
             DB '_',0CH,5,0
             DB 5CH,0CH,1,0
             DB '_',0CH,2,0
             DB '_',0CH,1,0
             DB '_',0CH,0,1
             DB '_',0CH,-1,0
             DB 5CH,0CH,-2,0
             DB '_',0CH,-6,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB '_',0CH,1,0
             DB '_',0CH,6,0
             DB 5CH,0CH,1,0
             DB '_',0CH,1,0
             DB '_',0CH,1,0
             DB 2FH,0CH,0,1
             DB '_',0CH,-1,0
             DB 5CH,0CH,-1,0
             DB 5CH,0CH,-7,0
             DB '_',0CH,-1,0
             DB 5CH,0CH,1,1
             DB 5CH,0CH,1,0
             DB 2FH,0CH,7,0
             DB 2FH,0CH,1,0
             DB 5CH,0CH,0,1
             DB 2FH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 5CH,0CH,-1,0
             DB 7CH,0CH,1,1
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 5CH,0CH,2,0
             DB '_',0CH,0,1
             DB 2FH,0CH,0,1
             DB 2FH,0CH,0,1
             DB '_',0CH,-1,0
  nnn        DB 68                                                   ;字母N像素点描述
             DB 7CH,0CH,0,0
             DB 3DH,0CH,0,1
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 3DH,0CH,1,0
             DB 7CH,0CH,0,1
             DB 5CH,0CH,-9,0
             DB '_',0CH,-1,0
             DB 5CH,0CH,1,1
             DB 5CH,0CH,1,0
             DB 5CH,0CH,0,1
             DB 5CH,0CH,1,0
             DB 5CH,0CH,0,1
             DB 5CH,0CH,1,0
             DB 5CH,0CH,0,1
             DB 5CH,0CH,1,0
             DB 5CH,0CH,0,1
             DB 5CH,0CH,1,0
             DB 5CH,0CH,0,1
             DB 5CH,0CH,1,0
             DB 5CH,0CH,0,1
             DB 5CH,0CH,1,0
             DB 5CH,0CH,0,1
             DB 5CH,0CH,1,0
             DB 5CH,0CH,0,1
             DB 3DH,0CH,1,0
             DB '_',0CH,0,1
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 2FH,0CH,-9,1
             DB '_',0CH,-1,0
  ggg        DB 91                                                           ;字母G像素点描述
             DB 7CH,0CH,0,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 5CH,0CH,1,1
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 2FH,0CH,-1,0
             DB 2FH,0CH,-1,1
             DB 2FH,0CH,1,0
             DB 5CH,0CH,7,0
             DB 5CH,0CH,1,0
             DB 5CH,0CH,0,1
             DB '_',0CH,-1,0
             DB 2FH,0CH,-8,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB '_',0CH,1,0
             DB '_',0CH,8,0
             DB '_',0CH,1,0
             DB '_',0CH,0,1
             DB '_',0CH,-1,0
             DB '_',0CH,-8,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB '_',0CH,1,0
             DB '_',0CH,8,0
             DB '_',0CH,1,0
             DB '_',0CH,0,1
             DB '_',0CH,-1,0
             DB 7CH,0CH,-3,0
             DB '_',0CH,-5,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB '_',0CH,1,0
             DB '_',0CH,4,0
             DB 3DH,0CH,1,0
             DB '_',0CH,3,0
             DB '_',0CH,1,0
             DB '_',0CH,0,1
             DB '_',0CH,-1,0
             DB 3DH,0CH,-3,0
             DB '_',0CH,-1,0
             DB '_',0CH,-4,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB 5CH,0CH,1,0
             DB 7CH,0CH,3,0
             DB '_',0CH,1,0
             DB 3DH,0CH,1,0
             DB '_',0CH,3,0
             DB 2FH,0CH,1,0
             DB 2FH,0CH,0,1
             DB 2FH,0CH,-1,0
             DB 3DH,0CH,-3,0
             DB '_',0CH,-1,0
             DB 3DH,0CH,-1,0
             DB '_',0CH,-1,0
             DB 5CH,0CH,-1,0
             DB 5CH,0CH,-1,0
             DB 5CH,0CH,1,1
             DB 7CH,0CH,1,0
             DB 3DH,0CH,1,0
             DB '_',0CH,1,0
             DB 3DH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 2FH,0CH,1,0
             DB 7CH,0CH,-1,1
             DB 7CH,0CH,-1,0
             DB 3DH,0CH,-1,0
             DB '_',0CH,-1,0
             DB 3DH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB '_',0CH,0,1
             DB 3DH,0CH,1,0
             DB '_',0CH,1,0
             DB 3DH,0CH,1,0
             DB 3DH,0CH,1,1
             DB 5CH,0CH,-1,0
             DB '_',0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 5CH,0CH,2,1
             DB 3DH,0CH,1,0
             DB 3DH,0CH,0,1
  jjj        DB 58                                                          ;字母J像素点描述
             DB 7CH,0CH,0,0
             DB 2AH,0CH,7,0
             DB 5CH,0CH,1,0
             DB 5CH,0CH,1,1
             DB 5CH,0CH,-1,0
             DB 3DH,0CH,-8,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB 3DH,0CH,1,0
             DB '_',0CH,8,0
             DB 3DH,0CH,1,0
             DB 3DH,0CH,0,1
             DB '_',0CH,-1,0
             DB 3DH,0CH,-8,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB 3DH,0CH,1,0
             DB '_',0CH,8,0
             DB 3DH,0CH,1,0
             DB 2BH,0CH,0,1
             DB 2FH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 3DH,0CH,-1,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB 3DH,0CH,1,0
             DB 2BH,0CH,1,0
             DB 2BH,0CH,1,0
             DB 2BH,0CH,1,0
             DB 2BH,0CH,1,0
             DB 2BH,0CH,1,0
             DB 2BH,0CH,1,0
             DB 2BH,0CH,1,0
             DB 2BH,0CH,1,0
             DB 2FH,0CH,1,0
             DB 2FH,0CH,-1,1
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 3DH,0CH,-1,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB 3DH,0CH,1,0
             DB 3DH,0CH,0,1
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB 3DH,0CH,1,0
             DB 7CH,0CH,0,1

  ddd        DB 77                                                                          ;字母D像素点描述
             DB '_',0CH,0,0
             DB 5CH,0CH,1,0
             DB 2FH,0CH,9,0
             DB 2FH,0CH,0,1
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 5CH,0CH,-1,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB 3DH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 3DH,0CH,1,0
             DB 3DH,0CH,0,1
             DB '_',0CH,-1,0
             DB 3DH,0CH,-8,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB 3DH,0CH,1,0
             DB '_',0CH,8,0
             DB 3DH,0CH,1,0
             DB 3DH,0CH,0,1
             DB '_',0CH,-1,0
             DB 3DH,0CH,-8,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB 3DH,0CH,1,0
             DB '_',0CH,8,0
             DB 3DH,0CH,1,0
             DB 3DH,0CH,0,1
             DB '_',0CH,-1,0
             DB 3DH,0CH,-8,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB 3DH,0CH,1,0
             DB '_',0CH,8,0
             DB 3DH,0CH,1,0
             DB 3DH,0CH,0,1
             DB '_',0CH,-1,0
             DB 3DH,0CH,-8,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB 3DH,0CH,1,0
             DB '_',0CH,8,0
             DB 3DH,0CH,1,0
             DB 3DH,0CH,0,1
             DB '_',0CH,-1,0
             DB 5CH,0CH,-7,0
             DB 5CH,0CH,-1,0
             DB 5CH,0CH,1,1
             DB 5CH,0CH,1,0
             DB 2FH,0CH,6,0
             DB 2AH,0CH,1,0
             DB 2FH,0CH,-1,1
             DB 28H,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 5CH,0CH,-1,0
             DB 7CH,0CH,1,1
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 29H,0CH,1,0

  uuu        DB 77                                                             ;字母U像素点描述
             DB '_',0CH,0,0
             DB 7CH,0CH,1,0
             DB '_',0CH,-1,1
             DB 3DH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 5CH,0CH,1,1
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 7CH,0CH,-1,0
             DB 3DH,0CH,-1,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB 7CH,0CH,1,0

             DB 5CH,0CH,8,0
             DB 5CH,0CH,1,0
             DB 5CH,0CH,0,1
             DB '_',0CH,-1,0

             DB '_',0CH,0,1
             DB '_',0CH,1,0
             DB '_',0CH,0,1
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB '_',0CH,1,0
             DB '_',0CH,0,1
             DB '_',0CH,-1,0
            ;
             DB '_',0CH,0,1
             DB 2FH,0CH,1,0
             DB 2BH,0CH,0,1
             DB 2FH,0CH,-1,0
             DB 7CH,0CH,-8,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB 3DH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 2AH,0CH,1,0
             DB 2FH,0CH,1,0
             DB 2FH,0CH,-1,1
             DB 2BH,0CH,-1,0
             DB 2BH,0CH,-1,0
             DB 2BH,0CH,-1,0
             DB 2BH,0CH,-1,0
             DB 2BH,0CH,-1,0
             DB 2BH,0CH,-1,0
             DB 2BH,0CH,-1,0
             DB 3DH,0CH,-1,0
             DB '_',0CH,-1,0
             DB '_',0CH,0,1
             DB 3DH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,1,0
             DB 7CH,0CH,-7,1
             DB '_',0CH,-1,0

  CAR        DB 6
             DB 3DH,0EH,0,0
             DB 40H,0BH,1,0
             DB 3DH,0EH,1,0
             DB 3CH,0EH,0,1
             DB 02AH,0BH,-1,0
             DB 3CH,0EH,-1,0

  JEEP       DB 6
             DB 3DH,0EH,0,0
             DB 40H,0BH,1,0
             DB 3DH,0EH,1,0
             DB 3CH,0EH,0,-1
             DB 02AH,0BH,-1,0
             DB 3CH,0EH,-1,0

 CHAR_CNT1     DW ?
 POINTER1      DW ?
 LINE_ON1      DB ?
 COL_ON1       DB ?
 CHAR          DW ?
 aCOUNT        DB ?
 aCOUNT0       DB ?
 aCOUNT1       DB ?
 CAR2  DB 5 DUP(20H) ;汽车图形数据
      DW 0DBDBH
      DB 154 DUP(20H)
      DW 0DBDBH
      DB 20H
      DW 0DBDBH
      DB 20H
      DW 0DBDBH
      DB 20H
      DW 0DBDBH
      DB 151 DUP(20H),4FH,5 DUP(20H),4FH 

      LENCAR  DW 330 ;汽车显示总长度 

      ROAD  DW 80 DUP(01616H) ;公路图形数据
      LENROAD DB 80 ;公路显示总长度
 DATA_SEG    ENDS
 ;------------------ 代码段  ---------------------
 CODE_SEG    SEGMENT
             ASSUME CS:CODE_SEG,DS:DATA_SEG
 ;-----------------主函数-------------------------
 MAIN        PROC  FAR
             PUSH  DS
             SUB   AX,AX
             SUB   CX,CX
             PUSH  AX
             PUSH  CX
             MOV   AX,DATA_SEG
             MOV   DS,AX
             CALL  CLEAR_SCREEN  ;清屏
             MOV   aCOUNT1,2
             MOV   aCOUNT0,11
             MOV CX,80
    NEXT1:   MOV DH,1
             MOV DL,0
             CALL DISPLAY
             MOV DH,2
             MOV DL,0
             CALL DISPLAY
             MOV DH,22
             MOV DL,0
             CALL DISPLAY
             MOV DH,23
             MOV DL,0
             CALL DISPLAY
             LOOP NEXT1
             LEA DI,SCHOOL ;标题
             MOV DH,5
             MOV DL,30
             CALL DISPLAY1

             MOV AH,2
             MOV DH,8
             MOV DL,15
             INT 10H
             LEA DX,ITEM      ;人机对话 第一选项
             MOV AH,9
             INT 21H
             MOV AH,2
             MOV DH,12
             MOV DL,15
             INT 10H
             LEA DX,ITEM1       ;第二选项

             MOV AH,9
             INT 21H
             MOV AH,2
             MOV DH,21
             MOV DL,15
             INT 10H
             LEA DX,HELP
             MOV AH,9
             INT 21H
             MOV AH,1
             INT 21H
             CMP AL,'2'       ;选2退出
             JE WE
             CMP AL,'1'       ;选1执行
             JE ME

   ME:       CALL  CLEAR_SCREEN
             MOV AH,2
             MOV DH,6
             MOV DL,14
             INT 10H
             CALL STORY1          ;调用故事描述函数
             CALL DELAY3
             CALL  CLEAR_SCREEN
             CALL CAR1            ;调用汽车运行函数
             CALL DELAY3
             CALL  CLEAR_SCREEN
             CALL PEOPLE1          ;调用两人第一次对话函数

             MOV CX,10000
     NEXT2:  LOOP NEXT2

             CALL  CLEAR_SCREEN
             CALL ZIXIANSHI          ;调用显示‘XIANYOUDIANDAXUE’函数
            CALL DELAY3
             CALL  PEOPLE2          ;调用两人第二次对话函数
             CALL DELAY3
             CALL MUSIC             ;调用歌曲
  WE:        MOV AH,4CH
             INT 21H
             POP   CX
             RET
;-----------------------------
MAIN        ENDP
 ;-------------第一次对话  ---------------
PEOPLE1 PROC NEAR
      PUSH AX
       PUSH BX
       PUSH CX
       PUSH DX
       PUSH SI
       PUSH DI
       PUSH BP
       PUSH ES
      CALL  CLEAR_SCREEN
             LEA DI,GIRL
             MOV   DH,6
             MOV   DL,10
             CALL  MOVE_SHAPE1
             CALL  aMUST_2
           LEA DI,BOY
            MOV DH,6
            MOV DL,70
            CALL  MOVE_SHAPE1
            CALL  aMUST_2

           MOV  DH,2
           MOV  DL,45
           MOV AH,2
           INT 10H
            LEA DX,LIU1
             MOV AH,9
            INT 21H
            CALL DELAY3

           MOV  DH,2
           MOV  DL,45
           MOV AH,2
           INT 10H
            LEA DX,KO
             MOV AH,9
            INT 21H

            MOV DH,2
            MOV DL,15
            MOV AH,2
            INT 10H
             LEA DX,SHU1
             MOV AH,9
             INT 21H
             CALL DELAY3
           MOV DH,2
            MOV DL,15
            MOV AH,2
            INT 10H
             LEA DX,KO
             MOV AH,9
             INT 21H

            MOV DH,3
            MOV DL,15
            MOV AH,2
            INT 10H
             LEA DX,SHU2
             MOV AH,9
             INT 21H
             CALL DELAY3
            MOV DH,3
            MOV DL,15
            MOV AH,2
            INT 10H
             LEA DX,KO
             MOV AH,9
             INT 21H

             MOV  DH,2
           MOV  DL,45
           MOV AH,2
           INT 10H
            LEA DX,LIU2
             MOV AH,9
            INT 21H
           CALL DELAY3
           MOV  DH,2
           MOV  DL,45
           MOV AH,2
           INT 10H
            LEA DX,KO
             MOV AH,9
            INT 21H

            MOV  DH,3
           MOV  DL,45
           MOV AH,2
           INT 10H
            LEA DX,LIU3
             MOV AH,9
            INT 21H
            CALL DELAY3
            MOV  DH,3
           MOV  DL,45
           MOV AH,2
           INT 10H
            LEA DX,KO
             MOV AH,9
            INT 21H

            MOV DH,2
            MOV DL,15
            MOV AH,2
            INT 10H
             LEA DX,SHU3
             MOV AH,9
             INT 21H
           CALL DELAY3
            MOV DH,2
            MOV DL,15
            MOV AH,2
            INT 10H
             LEA DX,KO
             MOV AH,9
             INT 21H

       POP ES
        POP BP
        POP DI
        POP SI
        POP DX
        POP CX
        POP BX
        POP AX

       RET
PEOPLE1 ENDP
;--------------第二次对话-------------
PEOPLE2 PROC NEAR
      PUSH AX
       PUSH BX
       PUSH CX
       PUSH DX
       PUSH SI
       PUSH DI
       PUSH BP
       PUSH ES
      CALL  CLEAR_SCREEN
             LEA DI,GIRL
             MOV   DH,6
             MOV   DL,10
             CALL  MOVE_SHAPE1
             CALL  aMUST_2
           LEA DI,BOY
            MOV DH,6
            MOV DL,70
            CALL  MOVE_SHAPE1
            CALL  aMUST_2

           MOV  DH,2
           MOV  DL,15
           MOV AH,2
           INT 10H
            LEA DX,SHU4
             MOV AH,9
            INT 21H
            CALL DELAY3

           MOV  DH,2
           MOV  DL,15
           MOV AH,2
           INT 10H
            LEA DX,KO
             MOV AH,9
            INT 21H

            MOV DH,2
            MOV DL,45
            MOV AH,2
            INT 10H
             LEA DX,LIU4
             MOV AH,9
             INT 21H
             CALL DELAY3
           MOV DH,2
            MOV DL,45
            MOV AH,2
            INT 10H
             LEA DX,KO
             MOV AH,9
             INT 21H

            MOV DH,3
            MOV DL,45
            MOV AH,2
            INT 10H
             LEA DX,LIU5
             MOV AH,9
             INT 21H
             CALL DELAY3
            MOV DH,3
            MOV DL,45
            MOV AH,2
            INT 10H
             LEA DX,KO
             MOV AH,9
             INT 21H

             MOV  DH,2
           MOV  DL,15
           MOV AH,2
           INT 10H
            LEA DX,SHU5
             MOV AH,9
            INT 21H
           CALL DELAY3
           MOV  DH,2
           MOV  DL,15
           MOV AH,2
           INT 10H
            LEA DX,KO
             MOV AH,9
            INT 21H

       POP ES
        POP BP
        POP DI
        POP SI
        POP DX
        POP CX
        POP BX
        POP AX

       RET
PEOPLE2 ENDP
;-----------汽车运行函数-----------------------------
CAR1  PROC NEAR
       PUSH AX
       PUSH BX
       PUSH CX
       PUSH DX
       PUSH SI
       PUSH DI
       PUSH BP
       PUSH ES
      MOV AX,DATA_SEG
      MOV DS,AX
      LEA BP,CAR2 ;将汽车数据传给显示入口
      MOV ES,AX
     MOV CX,69D ;69祯画面
     MOV DH,6D ;第6行
    MOV DL,00H ;第0列
S0:  ;动画
   CALL CARDISPLAY ;画汽车
   INC DL ;向后移一列
  CALL DELAY2 ;停留一小段时间
   LOOP S0 ;如果没到第69祯,继续画
        POP ES
        POP BP
        POP DI
        POP SI
        POP DX
        POP CX
        POP BX
        POP AX

       RET
CAR1  ENDP
;**************************显示汽车子程序**********************
CARDISPLAY PROC NEAR
CALL CLEAR ;清屏
PUSH AX
       PUSH BX
       PUSH CX
       PUSH DX
       PUSH SI
       PUSH DI
       PUSH BP
       PUSH ES
  MOV CX,LENCAR  ;设置显示汽车长度
  MOV BH,00H  ;第0页
  MOV BL,0F9H ;白色背景(F) 蓝色前景(9)
  MOV AX,1301H ;显示汽车
  INT 10H
 POP ES
  POP BP
        POP DI
        POP SI
        POP DX
        POP CX
        POP BX
        POP AX

RET
CARDISPLAY ENDP
;************************************************************** 

;***************************清屏子程序*************************
CLEAR PROC NEAR
 PUSH AX
       PUSH BX
       PUSH CX
       PUSH DX
       PUSH SI
       PUSH DI
       PUSH BP
       PUSH ES

  MOV AX,0600H  ;AH=06(滚动) AL=00(全屏空白)
  MOV BH,0F0H  ;黑色背景(0) 白色前景(F)
  SUB CX,CX  ;左上角行:列
  MOV DX,184FH  ;右下角行:列
  INT 10H
  MOV DH,11D ;第11行
CALL ROADDISPLAY
MOV DH,12D ;第12行
CALL ROADDISPLAY
 POP ES
POP BP
        POP DI
        POP SI
        POP DX
        POP CX
        POP BX
        POP AX
  RET
CLEAR ENDP
;**************************************************************  

;**************************显示子程序2*************************
ROADDISPLAY PROC NEAR
    PUSH AX
       PUSH BX
       PUSH CX
       PUSH DX
       PUSH SI
       PUSH DI
       PUSH BP
       PUSH ES
MOV AX,DATA_SEG
  MOV DS,AX 

  LEA BP,ROAD ;将公路数据传给显示入口
  MOV ES,AX 

  MOV DL,00H ;第0列
  MOV CH,00H
  MOV CL,LENROAD  ;设置显示公路长度
  MOV BH,00H  ;第0页
  MOV BL,0F5H  ;白色背景(F) 棕色前景(9)
  MOV AX,1301H ;显示公路
  INT 10H
POP ES
POP BP
        POP DI
        POP SI
        POP DX
        POP CX
        POP BX
        POP AX
RET
ROADDISPLAY ENDP
;************************************************************** 

;***************************延时子程序*************************
DELAY2 PROC
  PUSH AX
       PUSH BX
       PUSH CX
       PUSH DX
       PUSH SI
       PUSH DI
       PUSH BP
       PUSH ES
  MOV DX,0FFFH
 UP:  MOV CX,10000  ;延时
 A: LOOP A
  DEC DX
  JNZ UP
 POP ES
POP BP
        POP DI
        POP SI
        POP DX
        POP CX
        POP BX
        POP AX
  RET ;返回
DELAY2 ENDP
;---------------故事描述函数--------------------
STORY1 PROC NEAR
       PUSH AX
       PUSH BX
       PUSH CX
       PUSH DX
       PUSH SI
       PUSH DI
       PUSH BP
       LEA SI,STORY
       NEXT:MOV DL,[SI]
            CMP DL,'$'
            JE  EXIT3
            MOV AH,2
            INT 21H
            INC SI
            MOV CX,10000
     NEXT4: MOV BX,15000
     NEXT3: DEC BX
            JNZ NEXT3
            DEC CX
            JNZ NEXT4

            jmp next
EXIT3:  POP BP
        POP DI
        POP SI
        POP DX
        POP CX
        POP BX
        POP AX

       RET
STORY1  ENDP
;---------------------音乐函数--------------------------
MUSIC  PROC NEAR
       PUSH AX
       PUSH BX
       PUSH CX
       PUSH DX
       PUSH SI
       PUSH DI
       PUSH BP
       LEA SI,MUS_FREQ
       LEA BP,DS:MUS_TIME
FREQ:  MOV DI,[SI]
       CMP DI,-1
       JE END_MUS
       MOV BX,DS:[BP]
       CALL SOUNF
       ADD SI,2
       ADD BP,2
       JMP FREQ
END_MUS:POP BP
        POP DI
        POP SI
        POP DX
        POP CX
        POP BX
        POP AX

       RET
MUSIC  ENDP
;--------------------发声函数------------------
SOUNF PROC NEAR
      PUSH AX
      PUSH BX
      PUSH CX
      PUSH DX
      PUSH DI
      MOV AL,0B6H
      OUT 43H,AL
      MOV DX,12H
      MOV AX,348CH
      DIV DI
      OUT 42H,AL
      MOV AL,AH
      OUT 42H,AL
      IN AL,61H
      MOV AH,AL
      OR AL,3
      OUT 61H,AL
      WAIT1:CALL WAITF

       DEC BX
      JNZ WAIT1
      MOV AL,AH
      OUT 61H,AL
      POP DI
      POP DX
      POP CX
      POP BX
      POP AX
      RET

SOUNF ENDP
;-----------延时函数--------------------
WAITF PROC NEAR
      PUSH AX
WAITF1:
      IN AL,61H
      AND AL,10H
      CMP AL,AH
      JE WAITF1
      MOV AH,AL
      LOOP WAITF1
      POP AX
      RET
WAITF ENDP    

;-----------------西安邮电大学显示函数---------------
 ZIXIANSHI   PROC NEAR
             PUSH AX
             PUSH BX
             PUSH CX
             PUSH DX  

        aAGAI:    LEA DI,xxx
             MOV   DH,5
             MOV   DL,4
             CALL  MOVE_SHAPE1
             CALL  aMUST_2

             LEA   DI,iii
             MOV   DH,15
             MOV   DL,18
             CALL  MOVE_SHAPE1
             CALL  aMUST_2
             LEA  DI,aaaa
             MOV   DH,13
             MOV   DL,34
             CALL  MOVE_SHAPE1
             CALL  aMUST_2

             LEA   DI,nnn
             MOV   DH,15
             MOV   DL,53
             CALL  MOVE_SHAPE1
             CALL  aMUST_2

             LEA  DI,JEEP
             MOV   DH,4
             MOV   DL,75
             CALL  MOVE_SHAPE1
             CALL  aMUST_21
             CMP   aCOUNT1,1
             JNE   aAGAIN
             POP   CX
             RET

 aAGAIN:
             LEA   DI,yyy
             MOV   DH,4
             MOV   DL,10
             CALL  MOVE_SHAPE1
             CALL  aMUST_2

             LEA   DI,OOO
             MOV   DH,8
             MOV   DL,29
             CALL  MOVE_SHAPE1
             CALL  aMUST_2

             LEA   DI,UUU
             MOV   DH,5
             MOV   DL,48
             CALL  MOVE_SHAPE1
             CALL  aMUST_2

             LEA  DI,JEEP
             MOV   DH,4
             MOV   DL,75
             CALL  MOVE_SHAPE1
             CALL  aMUST_21
             CMP   aCOUNT1,1
             JNE   aAGAIN0
             POP   CX
             RET
aAGAIN0:    LEA    DI,DDD
             MOV   DH,5
             MOV   DL,4
             CALL  MOVE_SHAPE1
             CALL  aMUST_2

             LEA   DI,III
             MOV   DH,15
             MOV   DL,23
             CALL  MOVE_SHAPE1
             CALL  aMUST_2

             LEA   DI,AAAA
             MOV   DH,13
             MOV   DL,38
             CALL  MOVE_SHAPE1
             CALL  aMUST_2

             LEA   DI,NNN
             MOV   DH,15
             MOV   DL,58
             CALL  MOVE_SHAPE1
             CALL  aMUST_2

             LEA   DI,JEEP
             MOV   DH,4
             MOV   DL,75
             CALL  MOVE_SHAPE1
             CALL  aMUST_21
             CMP   aCOUNT1,1
             JNE   aAGAIN1
             POP   CX
             RET
  ;---------------------------------
 aAGAIN1:
             LEA   DI,ddd
             MOV   DH,5
             MOV   DL,3
             CALL  MOVE_SHAPE1
             CALL  aMUST_2

             LEA   DI,AAAA
             MOV   DH,13
             MOV   DL,18
             CALL  MOVE_SHAPE1
             CALL  aMUST_2

             LEA   DI,XXX
             MOV   DH,5
             MOV   DL,36
             CALL  MOVE_SHAPE1
             CALL  aMUST_2
            LEA   DI,UUU
             MOV   DH,5
             MOV   DL,49
             CALL  MOVE_SHAPE1
             CALL  aMUST_2

             LEA   DI,EEE
             MOV   DH,15
             MOV   DL,65
             CALL  MOVE_SHAPE1
             CALL  aMUST_2

             LEA   DI,JEEP
             MOV   DH,4
             MOV   DL,75
             CALL  MOVE_SHAPE1
             CALL  aMUST_21
             POP DX
             POP CX
             POP BX
             POP AX
             RET
ZIXIANSHI ENDP
;----------清屏函数-----------------
CLEAR1   PROC NEAR
       PUSH BX
       PUSH CX
       PUSH ES

       MOV  BX,0B800H
       MOV  ES,BX
       MOV  BX,0
       MOV  CX,2000
SUB1S: MOV  BYTE PTR ES:[BX],' '
       ADD  BX,2
       LOOP SUB1S
       POP  ES
       POP  CX
       POP  BX
       RET
CLEAR1  ENDP
;----------清屏函数-----------------
 CLEAR_SCREEN PROC NEAR
             PUSH   AX
             PUSH   BX
             PUSH   CX
             PUSH   DX
             MOV    AH,6
             MOV    AL,0
             MOV    CH,0
             MOV    CL,0
             MOV    DH,24
             MOV    DL,79
             MOV    BH,7
             INT    10H
             POP     DX
             POP     CX
             POP     BX
             POP     AX
             RET
 CLEAR_SCREEN  ENDP
 ;-------------------------------------
 ;-------------------------------------
 MOVE_SHAPE1    PROC NEAR
                PUSH AX
                PUSH BX
                PUSH CX
                PUSH DX
                PUSH DI
                MOV  AH,0FH
                INT  10H
                SUB  CH,CH
                MOV  CL,[DI]
                INC  DI
                MOV  CHAR_CNT1,CX
                MOV  POINTER1,DI
                MOV  LINE_ON1,DH
                MOV  COL_ON1,DL
                MOV  CHAR,CX
                POP  DI
                POP  DX
                POP  CX
                POP  BX
                POP  AX
                RET
 MOVE_SHAPE1    ENDP
 ;----------------------------
 aMUST_2        PROC       NEAR
                PUSH AX
                PUSH BX
                PUSH CX
                PUSH DX
                PUSH DI
                MOV  AH,0FH
                INT  10H
               SUB  CX,CX
             MOV        CX,CHAR_CNT1
             MOV        DI,POINTER1
             MOV        DH,LINE_ON1
             MOV        DL,COL_ON1
aPLOT_NEXT0:
             ADD  DH,[DI+2]
             ADD  DL,[DI+3]
             MOV  AH,2
             INT  10H
             MOV  AL,[DI]
             MOV  BL,[DI+1]
             PUSH CX
             MOV  CX,1
             MOV  AH,09
             INT  10H
             POP  CX
             ADD  DI,4
             CALL DLY_QRTR
             LOOP aPLOT_NEXT0
  aEXIT6:
             POP  DI
             POP  DX
             POP  CX
             POP  BX
             POP  AX
             RET
  aMUST_2    ENDP
;---------------------------------------------
;***********************************************
 aMUST_21       PROC       NEAR
                PUSH AX
                PUSH BX
                PUSH CX
                PUSH DX
                PUSH DI
                MOV  AH,0FH
                INT  10H
                MOV  aCOUNT,20
 aEXIT1:        CALL DLY_QRTR
                DEC  aCOUNT
                JE   aEXIT5
                JMP  aEXIT1
 aEXIT5:        SUB  CX,CX
             MOV        CX,CHAR_CNT1
             MOV        DI,POINTER1
             MOV        DH,LINE_ON1
             MOV        DL,COL_ON1
aPLOT_NEXT:
             ADD  DH,[DI+2]
             ADD  DL,[DI+3]
             CMP  DL,2
             JE   aEXIT4
             MOV  AH,2
             INT  10H
             MOV  AL,[DI]
             MOV  BL,[DI+1]
             PUSH CX
             MOV  CX,1
             MOV  AH,09
             INT  10H
             POP  CX
             CMP  AL,40H
             JE   aEXITX0
             CMP  AL,02AH
             JE   aEXITX0
             JMP  aEXITX1
 aEXITX0:    DEC  aCOUNT0
             JNE  aPLOT_NEXT
             MOV  aCOUNT0,11
 aEXITX1:    ADD  DI,4
             LOOP aPLOT_NEXT
             CALL DLY_QRTR
             CALL DLY_QRTR
             CALL DLY_QRTR
             CALL aERASE
             JMP  aEXIT5
  aEXIT4:    CALL aERASE
             POP  DI
             POP  DX
             POP  CX
             POP  BX
             POP  AX
             RET
  aMUST_21    ENDP
;********************************************
;-----------------------------------------

 、aERASE        PROC       NEAR
            MOV        CX,CHAR_CNT1
            MOV        DI,POINTER1
            MOV        DH,LINE_ON1
            MOV        DL,COL_ON1
 aERASE_NEXT:
             ADD        DH,[DI+2]
             ADD        DL,[DI+3]
             CMP        DL,2
             JE         aLEFT
             MOV        AH,2
             INT        10H
             MOV        AH,8
             INT        10H
             CMP        AL,40H
             JE         aEXITX2
             CMP        AL,02AH
             JE         aEXITX2
             JMP        aEXITX3
 aEXITX2:    DEC        aCOUNT0
             JNE        aEXITX3
             MOV        aCOUNT0,11
 aEXITX3:    CMP        aCOUNT1,1
             JE         aEXIT0
             MOV        AL,'*'
             MOV        BL,03H
             JMP        aEXIT7
 aEXIT0:     MOV        AL,'*'
             MOV        BL,0
 aEXIT7:     PUSH       CX
             MOV        CX,1
             MOV        AH,9
             INT        10H
             POP        CX
             CMP        aCOUNT0,11
             JNE        aERASE_NEXT
             ADD        DI,4
             LOOP       aERASE_NEXT
             DEC        COL_ON1
             MOV        CX,CHAR_CNT1
             MOV        DI,POINTER1
             MOV        DH,LINE_ON1
             MOV        DL,COL_ON1
 aLEFT:       RET
 aERASE        ENDP
;-----------------------------------------

 ;------------------------------------------
 DLY_QRTR    PROC       NEAR
             PUSH       CX
             PUSH       DX
             MOV        DX,40
 DLL:        MOV        CX,65535
 DL2:        LOOP       DL2
             DEC        DX
             JNZ        DLL
             POP        DX
             POP        CX
             RET
 DLY_QRTR    ENDP
;-----------------------------------------------

 ;--------------------------------------------------

 DISPLAY  PROC NEAR
         PUSH CX
         PUSH DX
         PUSH AX
         MOV AH,0FH
         INT 10H
         MOV AH,2
         INT 10H
         MOV AH,9
         MOV AL,'*'
         MOV BL,02H
         INT 10H
         POP AX
         POP DX
         POP CX
         RET
DISPLAY ENDP

DISPLAY1 PROC NEAR
         PUSH CX
         PUSH DX
         PUSH AX
         MOV AH,2
         INT 10H
         LEA DX,[DI]
         MOV AH,9
         INT 21H
         POP AX
         POP DX
         POP CX
         RET
 DISPLAY1 ENDP  

 DELAY3 PROC
  PUSH AX
       PUSH BX
       PUSH CX
       PUSH DX
       PUSH SI
       PUSH DI
       PUSH BP
       PUSH ES
  MOV DX,40000
 UP1:  MOV CX,30000  ;延时
 A1: LOOP A1
  DEC DX
  JNZ UP1
 POP ES
POP BP
        POP DI
        POP SI
        POP DX
        POP CX
        POP BX
        POP AX
  RET ;返回
DELAY3 ENDP       

 ;----------------------------------
 CODE_SEG    ENDS
             END    MAIN
 
时间: 2024-10-22 07:36:46

汇编决赛的相关文章

代码-win32汇编加速键不好使怎么解决?

问题描述 win32汇编加速键不好使怎么解决? 什么加载加速键,消息循环,响应都弄了,就是不好使 代码:http://pan.baidu.com/s/1o6p6kx8 解决方案 参考:http://wenku.baidu.com/link?url=VJlWwe9eL2dZIazPNIh1YAEisFrJPmScDdfXrpQfp7z9yGq_bSc_IlOrhua5AdvBCJbpuVTAWL_vJN4KGFcXNyafJToLglEaNqWULIdNzku 解决方案二: 参考:http://b

linux下32位汇编调用规则

传递给系统调用的参数必须安装参数顺序一次放到寄存器中,当系统调用完成后,返回值放在eax中: 当系统调用参数<=5个时: eax中存放系统调用的功能号,传递给系统调用的参数顺序依次放到寄存器:ebx,ecx,edx,esi,edi中 当系统调用参数>5个时: eax中存放系统调用的功能号,全部参数应依次放在一块连续的内存区域中,同时在寄存器ebx中保存指向该内存区域的指针(内存块的首地址):linux采用的是C调用模式,这意味着如果要以stack来实现这个连续的内存块(当然可以用其他方式实现,

汇编语言-汇编MOV的一点疑问!!!

问题描述 汇编MOV的一点疑问!!! DATA SEGMENT USE16 MES1 DB 'Please input:',0AH,0DH,'$' SD DB ? DATA ENDS 然后 MOV AH,1 INT 21H MOV SD,AL 然后就对SD进行操作了 想问下MOV的目的操作数可以是变量(SD)吗??不是只能是寄存器和存储器吗? 解决方案 MOV AH,1 INT 21H 是自动转入中断子程序的入口 通过上面两条指令,会把输入或者读取的字符放到AL中,所以是MOV SD,AL 解决

汇编 HelloWorld

图灵奖获奖得主,Alan Perlis曾说过:"如果一门语言没有改变你的编程思维,那么它不值得你去学习" 别人学高级语言,但是高级语言会变,我学低级语言,学了永远也不会变! stack segment stack ; 定义堆栈段 db 100 dup(?) ;堆栈段长100字节, 这里db就是字节的意思,如果是用dw就是字,100 dup(?) 中的dup是重复的意思,这句话是重复100遍,一遍定义一个字节,每个字节里全填0 stack ends ; 堆栈段结束 data segmen

Delphi与嵌入汇编专题

初学Delphi嵌入汇编[30] - 寄存器表 初学Delphi嵌入汇编[29] - 寄存器所能接受的数值范围 初学Delphi嵌入汇编[28] - 把EAX的值置为0的三种方法与效率 初学Delphi嵌入汇编[27] - XCHG 指令: 交换寄存器的内容 初学Delphi嵌入汇编[26] - 大小写字母转换 初学Delphi嵌入汇编[25] - 在汇编中调用函数 初学Delphi嵌入汇编[24] - 汇编语言的简单数据类型 初学Delphi嵌入汇编[23] - LOOP 循环 初学Delph

一个汇编hello world程序

TITLE ***HELLO,WORLD进阶程序之选择分支 BY LLUCT*** DATA SEGMENT ;定义数据段MSG1 DB '***WELCOME TO MY PROGRAM BY LLUCT***','$';定义输出的第一个字符串信息,字符串必须用DB定义,$为结束标志MSG2 DB '1:BASIC MESSAGE 2:ADVANCED MESSAGE','$';定义输出的字符串信息:选择菜单MSG3 DB 'PLEASE CHOOSE:','$';定义输出的字符串信息:选择前

从汇编看编程语言

在学校的时候,不知怎么的机缘巧合就结识了汇编语言,但到找工作时却选择了Vc++.不过到现在,偶还是对汇编有种难以割舍的情怀.虽然现在是本人在搞C#,然对我影响最深的还是汇编. 偶在大二的时候就用汇编写了一个飞机打字符的游戏,可惜由于自己的原因,到毕业时,除了汇编什么也不会.找做单片机和嵌入式的学历不够.碰着就碰到了VC++里.在工作做慢慢的从Vc++转到了C#,不过决定学习c#的过程并不平坦.偶不想放弃以学的C++,想用C++托管扩展进行编程.但发现.c++托管编程并不适合公司里快速开发项目的要

关于c与汇编混合编程的一点总结

在C和汇编混合编程的时候,存在C语言和汇编语言的变量以及函数的接口问题. 在C程序中定义的变量,编译为.asm文件后,都被放进了.bss区,而且变量名的前面都带了一个下划线.在C程序中定义的函数,编译后在函数名前也带了一个下划线.例如: extern int num就会变成 .bss _num, 1 extern float nums[5]就会变成.bss _nums, 5 extern void func ( )就会变成 _func, 一 汇编和C的相互调用可以分以下几种情况: (1)汇编程序

内联汇编基础知识

几天看了孙原等几位仁兄关于汇编语言的几篇文章,颇感兴趣.于是查了查98版的MSDN中,其中也有几篇关于内联汇编的基础,索引字是asm.讲得不算太难,于是试着将其内容写下来了,特此贴来. 一.内联汇编简述 Visual C++ 6.0编译器下,内联汇编可以使用所有的Intel486处理器指令集.而且可以对目标处理器建立起伪指令来实现附加指令功能.内联汇编可以使用MASM编译器所允许的表达式,其中的一些表达式可以通过操作符和操作数的组合,对单精值进行运算. 虽然内联汇编可以访问C\C++中的数据变量