home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / asmutil / ovl301.zip / MULTEST.ASM < prev    next >
Assembly Source File  |  1989-01-11  |  1KB  |  52 lines

  1. DOSSEG
  2. .MODEL    large
  3. .STACK    100h
  4.  
  5. PUBLIC messa,messb,messc,messd
  6.  
  7. EXTRN multa:PROC,multb:PROC,multc:PROC,multd:PROC
  8.  
  9. .CODE
  10. start:
  11.     mov    ax,dgroup
  12.     mov    ds,ax
  13.     mov    dx,offset message
  14.     mov    ah,9
  15.     int    21h
  16.     mov    ah,1        ; keyboard input with echo
  17.     int    21h
  18.     and    al,0dfh        ; upshift lowercase chars
  19.     cmp    al,65        ; 'A' keypress
  20.     jne    nota
  21.     call    multa
  22.     jmp    short start
  23. nota:
  24.     cmp    al,66        ; 'B' keypress
  25.     jne    notb
  26.     call    multb
  27.     jmp    short start
  28. notb:
  29.     cmp    al,67        ; 'C' keypress
  30.     jne    notc
  31.     call    multc
  32.     jmp    short start
  33. notc:
  34.     cmp    al,68        ; 'D' keypress
  35.     jne    notd
  36.     call    multd
  37.     jmp    short start
  38. notd:
  39.     cmp    al,81        ; 'Q'
  40.     jne    start        ; invalid keypress, reloop
  41.     mov    ax,4c00h    ; terminate with errorlevel 0
  42.     int        21h
  43.  
  44. .DATA
  45.     message db 13,10,"Press A,B,C,D or Q to quit: ",'$'
  46.     messa db 13,10,13,10,"Now in process A",13,10,'$'
  47.     messb db 13,10,13,10,"Now in process B",13,10,'$'
  48.     messc db 13,10,13,10,"Now in process C",13,10,'$'
  49.     messd db 13,10,13,10,"Now in process D",13,10,'$'
  50.  
  51.     END        start
  52.