home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c011 / 1.ddi / INCS / FXMACS.INC < prev   
Encoding:
Text File  |  1989-06-01  |  2.5 KB  |  49 lines

  1. ; fxMacs.INC                                                                 ;
  2. ; Copyright (c) Genus Microprogramming, Inc. 1988-89  All Rights Reserved.   ;
  3.  
  4. ;****************************************************************************;
  5. ;                                                                            ;
  6. ; This file contains defines and macros for DOS and BIOS interfacing.        ;
  7. ;                                                                            ;
  8. ;                                                                            ;
  9. ;                                                                            ;
  10. ;                                                                            ;
  11. ;                                                                            ;
  12. ;                                                                            ;
  13. ; Microsoft ASM 5.x version.              Programmer: Chris Howard  3/15/89  ;
  14. ;                                                                            ;
  15. ;****************************************************************************;
  16.  
  17.  
  18. ;Interrupts
  19. INT_CLOCK equ       1AH                     ;Clock services
  20. INT_TIMER equ       1CH                     ;Timer interrupt
  21.  
  22. ; Clock
  23. READCLOCK equ       00H                     ;Read the current clock count
  24. SETCLOCK  equ       01H                     ;Set the current clock count
  25.  
  26. ; Sound Chip
  27. PPIPORT   equ       61H                     ;PPI chip port
  28. PPIBITS   equ       00000011B               ;Bits 0 and 1 turn on speaker
  29. TIMERPORT equ       43H                     ;Signal timer
  30. COUNTRDY  equ       0B6H                    ;Count is ready signal
  31. FREQPORT  equ       42H                     ;Load frequency
  32. COUNTHI   equ       0012H                   ;Maximum timer count high
  33. COUNTLO   equ       3540H                   ; and low words
  34.  
  35. @CLOCK    MACRO     func                    ;;Macro to use DOS function calls
  36.           mov       ah,func
  37.           int       INT_CLOCK
  38.           ENDM
  39.  
  40. @InitFX   MACRO     type,fx    
  41.           mov       ax,type                 ;;Macro to initialize a display
  42.           push      ax                      ;; function pointer
  43.           call      fxGetEffectStruc
  44.           mov       bx,ax                   ;;Calc structure offset
  45.           mov       BYTE PTR [bx].fxtype,  type
  46.           mov       WORD PTR [bx].fxfunc,  OFFSET fx    
  47.           mov       WORD PTR [bx].fxfunc+2,SEG    fx    
  48.           ENDM
  49.