汇编比赛--情定迷宫

简介: ;-------------------------数据段的定义---------------------------------- data_seg segmentschool db 'THE SCHOOL LIFE$'item db '...
;-------------------------数据段的定义---------------------------------- 
  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

目录
相关文章
|
7月前
|
C语言
【汇编语言实战】解迷宫问题
【汇编语言实战】解迷宫问题
55 2
|
算法 vr&ar 网络架构
汇编实验4(99乘法表,整数分解,素数环,迷宫问题)【栈传参,递归,寻址方式】
汇编实验4(99乘法表,整数分解,素数环,迷宫问题)【栈传参,递归,寻址方式】
97 0
|
7月前
|
存储 Unix 编译器
汇编语言----X86汇编指令
汇编语言----X86汇编指令
235 2
|
2月前
|
存储 移动开发 C语言
【ARM汇编速成】零基础入门汇编语言之指令集(三)
【ARM汇编速成】零基础入门汇编语言之指令集(三)
|
2月前
|
编译器 C语言 计算机视觉
【ARM汇编速成】零基础入门汇编语言之指令集(二)
【ARM汇编速成】零基础入门汇编语言之指令集(二)
168 0
|
7月前
|
存储 机器学习/深度学习 移动开发
汇编语言指令系列
汇编语言指令系列
726 0
几组汇编指令的比较
几组汇编指令的比较
|
5月前
|
存储 机器学习/深度学习 芯片
8086 汇编笔记(十二):int 指令 & 端口 & 直接定址表
8086 汇编笔记(十二):int 指令 & 端口 & 直接定址表
|
5月前
|
存储 算法 安全
深入理解汇编语言:基础语法和常用指令介绍
深入理解汇编语言:基础语法和常用指令介绍
|
6月前
汇编语言(第四版) 实验一 查看CPU和内存,用机器指令和汇编指令编程
汇编语言(第四版) 实验一 查看CPU和内存,用机器指令和汇编指令编程