Annotation of gcl520h/_dbg286.equ, revision 1.1

1.1     ! root        1: ;
        !             2: ; _DBG286.EQU            5.20A  June 8, 1995
        !             3: ;
        !             4: ; The Greenleaf Comm Library
        !             5: ;
        !             6: ; Copyright (C) 1991-94 Greenleaf Software Inc.  All Rights Reserved.
        !             7: ;
        !             8: ; NOTES
        !             9: ;
        !            10: ; This file contains the macros used to provide debug output services
        !            11: ; for the protected mode ISR.  Debug output services are fully
        !            12: ; defined in DEBUG286.ASM.
        !            13: ;
        !            14: ; MODIFICATIONS
        !            15: ;
        !            16: ;  December 1, 1994   5.10A :  Initial release.
        !            17: ;
        !            18: 
        !            19: ;
        !            20: ; Any routine that wants to use debug services can include this header
        !            21: ; file.  Unfortunately, if it gets included by DEBUG286.ASM, we are
        !            22: ; going to see a conflict between these EXTRN definitions and the
        !            23: ; PUBLIC definitions in the source module.  We avoid this conflict by
        !            24: ; simply defining _DEBUG286 in DEBUG286.ASM so that these guys won't get
        !            25: ; pulled in by
        !            26: ;
        !            27: ; Any routine that wants to use debug services can include this header
        !            28: ; file.  Unfortunately, if it gets included by DEBUG88.ASM, we are
        !            29: ; going to see a conflict between these EXTRN definitions and the
        !            30: ; PUBLIC definitions in the source module.  We avoid this conflict by
        !            31: ; simply defining _DEBUG88 in DEBUG88.ASM so that these guys won't get
        !            32: ; pulled in by that module.
        !            33: ;
        !            34: ; Note also that these externs don't get defined if ISR_DEBUG is not turned
        !            35: ; on.  This prevents this code from being linked in in a production release.
        !            36: ;
        !            37: IFNDEF _DEBUG286
        !            38: 
        !            39: IFDEF ISR_DEBUG
        !            40: 
        !            41: DEBUG_ISR_CODE          SEGMENT 'CODE'
        !            42:                         EXTRN C _VidGoto:FAR
        !            43:                         EXTRN C _VidPutc:FAR
        !            44:                         EXTRN C _VidPutDat:FAR
        !            45:                         EXTRN C _VidPuts:FAR
        !            46: 
        !            47: DEBUG_ISR_CODE          ENDS
        !            48: 
        !            49: ENDIF
        !            50: 
        !            51: ENDIF
        !            52: 
        !            53: ;
        !            54: ;  Macro: VIDPUTWORD data
        !            55: ;
        !            56: ;
        !            57: ;  ARGUMENTS
        !            58: ;
        !            59: ;   data : Any 16 bit value that can be moved into ax with
        !            60: ;          a mov ax, data instruction.
        !            61: ;
        !            62: ;  DESCRIPTION
        !            63: ;
        !            64: ;  This macro is used in the protected ISR to display a single binary
        !            65: ;  word in hex.  The real work is done by _VidPutDat, the macro just
        !            66: ;  takes care of setting things up to facilitate the call.
        !            67: ;
        !            68: ;  Note that the real mode ISR and the protected mode ISR are distinguished
        !            69: ;  by the presence or absence of the _REAL equate.  If we are in the real
        !            70: ;  mode ISR, we call a slightly different version of _VidPutDat.  Same
        !            71: ;  functionality, slightly different code.
        !            72: ;
        !            73: ;  SIDE EFFECTS
        !            74: ;
        !            75: ;   None.
        !            76: ;
        !            77: ;  RETURNS
        !            78: ;
        !            79: ;   Nothing.
        !            80: ;
        !            81: ;  AUTHOR
        !            82: ;
        !            83: ;   SM          October 17, 1994
        !            84: ;
        !            85: ;  MODIFICATIONS
        !            86: ;
        !            87: ;
        !            88: 
        !            89: VIDPUTWORD              MACRO dat  ; Tag: Debug private
        !            90:                         push  ax
        !            91:                         push  cx
        !            92:                         mov   cl,8
        !            93:                         mov   ax,dat   ; Get the data to display
        !            94:                         ror   ax,cl    ; Shift upper byte to lower byte
        !            95:                         push  ax       ; Pass it to _VidPutDat
        !            96: IFDEF _REAL
        !            97:                         call  _VidPutDatReal
        !            98: ELSE
        !            99:                         call  _VidPutDat
        !           100: ENDIF
        !           101:                         add   sp,2
        !           102:                         mov   ax,dat
        !           103:                         push  ax
        !           104: IFDEF _REAL
        !           105:                         call  _VidPutDatReal
        !           106: ELSE
        !           107:                         call  _VidPutDat
        !           108: ENDIF
        !           109:                         add   sp,2
        !           110:                         pop  cx
        !           111:                         pop  ax
        !           112:                         ENDM
        !           113: 
        !           114: ;
        !           115: ;  Macro: VIDGOTO row,col
        !           116: ;
        !           117: ;
        !           118: ;  ARGUMENTS
        !           119: ;
        !           120: ;   row : The row to go to on the screen.  This can be any sort
        !           121: ;         of identifier that can be accessed with a mov ax,row
        !           122: ;         instruction, loading 16 bits.
        !           123: ;
        !           124: ;   col : The column to go to on the screen. This can be any sort
        !           125: ;         of identifier that can be accessed witha mov ax,col
        !           126: ;         instruction, loading 16 bits.
        !           127: ;
        !           128: ;  DESCRIPTION
        !           129: ;
        !           130: ;  This macro is used in the protected ISR to move the cursor, or current
        !           131: ;  output location, to a specific location on the screen.
        !           132: ;
        !           133: ;  Note that the real mode ISR and the protected mode ISR are distinguished
        !           134: ;  by the presence or absence of the _REAL equate.  If we are in the real
        !           135: ;  mode ISR, we call a slightly different version of _VidGoto.  Same
        !           136: ;  functionality, slightly different code.
        !           137: ;
        !           138: ;  SIDE EFFECTS
        !           139: ;
        !           140: ;   None.
        !           141: ;
        !           142: ;  RETURNS
        !           143: ;
        !           144: ;  Nothing.
        !           145: ;
        !           146: ;  AUTHOR
        !           147: ;
        !           148: ;   SM          October 17, 1994
        !           149: ;
        !           150: ;  MODIFICATIONS
        !           151: ;
        !           152: ;
        !           153: 
        !           154: VIDGOTO                 MACRO   row,col  ; Tag: Debug private
        !           155:                         push    ax
        !           156:                         mov     ax,col
        !           157:                         push    ax
        !           158:                         mov     ax,row
        !           159:                         push    ax
        !           160: IFDEF _REAL
        !           161:                         call    _VidGotoReal
        !           162: ELSE
        !           163:                         call    _VidGoto
        !           164: ENDIF
        !           165:                         add     sp,4
        !           166:                         pop     ax
        !           167:                         ENDM
        !           168: 
        !           169: ;
        !           170: ;  Macro: VIDPUTC char
        !           171: ;
        !           172: ;
        !           173: ;  ARGUMENTS
        !           174: ;
        !           175: ;   char : A single character that needs to be displayed on the screen.
        !           176: ;
        !           177: ;  DESCRIPTION
        !           178: ;
        !           179: ;  This macro is used in the protected ISR to display a single character
        !           180: ;  at the current cursor position on the screen.  It does this with
        !           181: ;  a single call to _VidPutc.  Note that the argument can be anything
        !           182: ;  that can load a 16 bit value with mov ax,value.
        !           183: ;
        !           184: ;  Note that the real mode ISR and the protected mode ISR are distinguished
        !           185: ;  by the presence or absence of the _REAL equate.  If we are in the real
        !           186: ;  mode ISR, we call a slightly different version of _VidPutc.  Same
        !           187: ;  functionality, slightly different code.
        !           188: ;
        !           189: ;  SIDE EFFECTS
        !           190: ;
        !           191: ;   None.
        !           192: ;
        !           193: ;  RETURNS
        !           194: ;
        !           195: ;   Nothing.
        !           196: ;
        !           197: ;  AUTHOR
        !           198: ;
        !           199: ;   SM          October 17, 1994
        !           200: ;
        !           201: ;  MODIFICATIONS
        !           202: ;
        !           203: ;
        !           204: 
        !           205: VIDPUTC                 MACRO   Char  ; Tag: Debug private
        !           206:                         push    ax
        !           207:                         mov     ax,Char
        !           208:                         push    ax
        !           209: IFDEF _REAL
        !           210:                         call    _VidPutcReal
        !           211: ELSE
        !           212:                         call    _VidPutc
        !           213: ENDIF
        !           214:                         add     sp,2
        !           215:                         pop     ax
        !           216:                         ENDM
        !           217: 
        !           218: ;
        !           219: ;  Macro: VIDPUTS str
        !           220: ;
        !           221: ;
        !           222: ;  ARGUMENTS
        !           223: ;
        !           224: ;   str : A string that needs to be displayed on the screen.  Note
        !           225: ;         that this doesn't have to be a null terminated string, we
        !           226: ;         make a copy of it here and then null terminate the copy.
        !           227: ;
        !           228: ;  DESCRIPTION
        !           229: ;
        !           230: ;  This macro is used in the protected ISR to display an entire string
        !           231: ;  on the screen.  We make a local copy of the string in our code
        !           232: ;  segment, and null terminate it.  Then we push a pointer to the copy
        !           233: ;  on the stack and call _VidPuts.
        !           234: ;
        !           235: ;  Note that the real mode ISR and the protected mode ISR are distinguished
        !           236: ;  by the presence or absence of the _REAL equate.  If we are in the real
        !           237: ;  mode ISR, we call a slightly different version of _VidPuts.  Same
        !           238: ;  functionality, slightly different code.
        !           239: ;
        !           240: ;  SIDE EFFECTS
        !           241: ;
        !           242: ;   None.
        !           243: ;
        !           244: ;  RETURNS
        !           245: ;
        !           246: ;   Nothing.
        !           247: ;
        !           248: ;  AUTHOR
        !           249: ;
        !           250: ;   SM          October 17, 1994
        !           251: ;
        !           252: ;  MODIFICATIONS
        !           253: ;
        !           254: ;
        !           255: 
        !           256: VIDPUTS                 MACRO   s  ; Tag: Debug private
        !           257:                         LOCAL   skip, string
        !           258:                         jmp     short skip
        !           259: string                  db      s, 0
        !           260: skip:                   push    ax
        !           261:                         mov     ax, offset string
        !           262:                         push    ax
        !           263: IFDEF _REAL
        !           264:                         call    _VidPutsReal
        !           265: ELSE
        !           266:                         call    _VidPuts
        !           267: ENDIF
        !           268:                         add     sp,2
        !           269:                         pop     ax
        !           270:                         ENDM
        !           271: 
        !           272: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.