home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Library / Manuels & Misc / Assembly / AOA.ZIP / CH08 / EX8_4.ASM < prev    next >
Encoding:
Assembly Source File  |  1996-02-07  |  700 b   |  47 lines

  1. ; Ex8_4.asm
  2. ;
  3. ; Demonstration of IFDEF to control
  4. ; debugging features.  This code
  5. ; assumes there are two levels of
  6. ; debugging controlled by the two
  7. ; symbols DEBUG1 and DEBUG2.  In
  8. ; this code example DEBUG1 is
  9. ; defined while DEBUG2 is not.
  10.  
  11.         .xlist
  12.         include    stdlib.a
  13.         .list
  14.         .nolistmacro
  15.         .listif
  16.  
  17. DEBUG1        =    0
  18.  
  19. cseg        segment
  20. DummyProc    proc
  21.         ifdef    DEBUG2
  22.         print
  23.         byte    "In DummyProc"
  24.         byte    cr,lf,0
  25.         endif
  26.         ret
  27. DummyProc    endp
  28.  
  29. Main        proc
  30.         ifdef    DEBUG1
  31.         print
  32.         byte    "Calling DummyProc"
  33.         byte    cr,lf,0
  34.         endif
  35.  
  36.         call    DummyProc
  37.  
  38.         ifdef    DEBUG1
  39.         print
  40.         byte    "Return from DummyProc"
  41.         byte    cr,lf,0
  42.         endif
  43.         ret
  44. Main        endp
  45. cseg        ends
  46.         end
  47.