Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.3 KiB

  1. ;--- Debugging Facilities (skkhang) ------------------------------
  2. IF DEBUG
  3. EXTRN _DebugChar:Near, _DebugString:Near, _DebugNumber:Near
  4. ENDIF
  5. DBGCh MACRO reg
  6. IF DEBUG
  7. IFDIF <reg>, <al>
  8. push ax
  9. mov al, reg
  10. ENDIF
  11. call _DebugChar
  12. IFDIF <reg>, <al>
  13. pop ax
  14. ENDIF
  15. ENDIF
  16. ENDM
  17. DBGStr MACRO addr
  18. IF DEBUG
  19. IFDIF <addr>, <bx>
  20. push bx
  21. mov bx, addr
  22. ENDIF
  23. call _DebugString
  24. IFDIF <addr>, <bx>
  25. pop bx
  26. ENDIF
  27. ENDIF
  28. ENDM
  29. DBGNum MACRO val
  30. IF DEBUG
  31. push ax
  32. IFDIF <val>, <ax>
  33. mov ax, val
  34. ENDIF
  35. call _DebugNumber
  36. mov al, 0Dh
  37. call _DebugChar
  38. mov al, 0Ah
  39. call _DebugChar
  40. pop ax
  41. ENDIF
  42. ENDM
  43. DBGNum2 MACRO val
  44. IF DEBUG
  45. IFDIF <val>, <ax>
  46. push ax
  47. mov ax, val
  48. ENDIF
  49. call _DebugNumber
  50. IFDIF <val>, <ax>
  51. pop ax
  52. ENDIF
  53. ENDIF
  54. ENDM
  55. DBGCrLf MACRO
  56. IF DEBUG
  57. push ax
  58. mov al, 0Dh
  59. call _DebugChar
  60. mov al, 0Ah
  61. call _DebugChar
  62. pop ax
  63. ENDIF
  64. ENDM