home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / programming / asm_programming / ASCIIORG.LST < prev    next >
File List  |  1990-10-03  |  3KB  |  104 lines

  1. Microsoft (R) Macro Assembler Version 5.10                  10/3/90 21:13:43
  2.                                                              Page     1-1
  3.  
  4.  
  5.                 ;ASCII Organ
  6.                 
  7.  0000                        code    segment
  8.  0100                        org     100h
  9.                         assume  cs:code
  10.                 
  11.  = 0042                timer   equ     42h
  12.  = 0061                speaker equ     61h
  13.                 
  14.  0100  E8 010E R        start:  call    getkey          ; store key pre
  15.                 ssed in AL
  16.  0103  3C 1B                    cmp     al,1bh          ; escape?
  17.  0105  75 02                    jne     skip
  18.  0107  CD 20                    int     20h
  19.  0109  E8 0113 R        skip:   call    beep            ; if not escape
  20.                 , beep according to
  21.  010C  EB F2                    jmp     start           ; value in AL, 
  22.                 and return
  23.                 
  24.  010E  B4 07            getkey: mov     ah,7            ; prepare for i
  25.                 nterrupt
  26.  0110  CD 21                    int     21h             ; execute DOS f
  27.                 unction 7
  28.  0112  C3                    ret            ; return with k
  29.                 ey in AL
  30.                 
  31.  0113  8A D8            beep:   mov     bl,al           ; store key in 
  32.                 BL
  33.  0115  B0 B6                    mov     al,0b6h         ; prepare timer
  34.                  for
  35.  0117  E6 43                    out     timer+1,al      ; accepting new
  36.                  division
  37.  0119  B0 00                    mov     al,0            ; send 0 as LSB
  38.  011B  E6 42                    out     timer,al        ; of the new di
  39.                 visor
  40.  011D  8A C3                    mov     al,bl           ; and key value
  41.  011F  E6 42                    out     timer,al        ; like MSB
  42.  0121  B0 4F                    mov     al,4fh          ; start sound b
  43.                 y linking the
  44.  0123  E6 61                    out     speaker,al      ; speaker and t
  45.                 imer
  46.  0125  B9 FFFF                    mov     cx,0ffffh       ; pause
  47.  0128  F3/ AD                    rep     lodsw           ; while the not
  48.                 e is played
  49.  012A  B0 4D                    mov     al,4dh          ; stop by cutti
  50.                 ng the connection
  51.  012C  E6 61                    out     speaker,al      ; between speak
  52.                 er and timer
  53.  012E  B4 02                    mov     ah,2            ; prepare for D
  54.                 OS output function
  55.  0130  B2 0E                    mov     dl,0eh          ; (out) charact
  56.                 er to send
  57.  0132  CD 21                    int     21h             ; symbol of the
  58.                  note to the screen
  59. Microsoft (R) Macro Assembler Version 5.10                  10/3/90 21:13:43
  60.                                                              Page     1-2
  61.  
  62.  
  63.  0134  C3                    ret
  64.                 
  65.  0135                code    ends
  66.                         end     start
  67. Microsoft (R) Macro Assembler Version 5.10                  10/3/90 21:13:43
  68.                                                              Symbols-1
  69.  
  70.  
  71. Segments and Groups:
  72.  
  73.                 N a m e             Length     Align    Combine Class
  74.  
  75. CODE . . . . . . . . . . . . . .      0135    PARA    NONE    
  76.  
  77. Symbols:            
  78.  
  79.                 N a m e             Type     Value     Attr
  80.  
  81. BEEP . . . . . . . . . . . . . .      L NEAR    0113    CODE
  82.  
  83. GETKEY . . . . . . . . . . . . .      L NEAR    010E    CODE
  84.  
  85. SKIP . . . . . . . . . . . . . .      L NEAR    0109    CODE
  86. SPEAKER  . . . . . . . . . . . .      NUMBER    0061    
  87. START  . . . . . . . . . . . . .      L NEAR    0100    CODE
  88.  
  89. TIMER  . . . . . . . . . . . . .      NUMBER    0042    
  90.  
  91. @CPU . . . . . . . . . . . . . .      TEXT  0101h        
  92. @FILENAME  . . . . . . . . . . .      TEXT  asciiorg        
  93. @VERSION . . . . . . . . . . . .      TEXT  510        
  94.  
  95.  
  96.      40 Source  Lines
  97.      40 Total   Lines
  98.      12 Symbols
  99.  
  100.   47908 + 289671 Bytes symbol space free
  101.  
  102.       0 Warning Errors
  103.       0 Severe  Errors
  104.