home *** CD-ROM | disk | FTP | other *** search
/ RBBS in a Box Volume 1 #2 / RBBS_vol1_no2.iso / 011d / charop.asm < prev    next >
Assembly Source File  |  1984-02-18  |  1KB  |  60 lines

  1. title MSDOS 2.00 Function Library for Lattice C
  2. subttl -
  3. ;;
  4. ;;FUNCTION:    Sets and returns switch char-
  5. ;;    acter and device availability.
  6. ;;
  7. ;;
  8. ;;CALL:
  9. ;;
  10. ;;    ret= _charop(al,dl)
  11. ;;    int ret;    DL return value, 
  12. ;;    int al;        charoper function
  13. ;;    int dl;        charoper data
  14. ;;
  15. ;;RETURN:
  16. ;;    See the DOS docs for details. 
  17. ;;_charop(0,0) returns the ASCII switch char,
  18. ;;_charop(1,'-') sets the switch to -,
  19. ;;_charop(2,0) returns device availability,
  20. ;;_charop(3,i) sets device availability.
  21. ;;
  22. ;;
  23. ;;DESCRIPTION:
  24. ;;
  25. ;;EXAMPLE:
  26. ;;
  27. ;;
  28. ;;CAUTIONS:
  29. ;;
  30. ;;
  31. ;;ASSUMPTIONS:
  32. ;;
  33. ;;LONG    32 bits (4 bytes)
  34. ;;INT    16 bits (2 bytes)
  35. ;;CHAR     8 bits (1 byte)
  36. ;;
  37. page
  38. pgroup group prog
  39. prog segment byte public 'prog'
  40. assume cs:pgroup,ds:pgroup
  41.  
  42. public     _charop
  43.  
  44. _charop proc near
  45.     push    bp
  46.     mov    bp,sp
  47.     mov    al,[bp+4]
  48.     mov    dl,[bp+6]
  49.     mov    ah,55
  50.     int    33
  51.     mov    al,dl
  52.     mov    ah,0
  53.     pop    bp
  54.     ret
  55. _charop endp
  56.  
  57. prog ends
  58.  
  59.     end
  60.