Annotation of gcl520h/_dbg88.equ, revision 1.1.1.1

1.1       root        1: ;
                      2: ; _DBG88.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 standard DOS ISR.  Debug output services are fully
                     12: ; defined in DEBUG88.ASM.
                     13: ;
                     14: ; MODIFICATIONS
                     15: ;
                     16: ;  December 1, 1994   5.10A :  Initial release.
                     17: ;
                     18: 
                     19: ;
                     20: ; The funny segment stuff is here so I can call this code from all
                     21: ; different memory models.  Segments are confusing.
                     22: ;
                     23: ifndef _DEBUG88
                     24: 
                     25: IFDEF ISR_DEBUG
                     26: IF _LCODE NE 0
                     27:                         .CODE DEBUG88_TEXT
                     28: ELSE
                     29:                         .CODE
                     30: ENDIF
                     31:                         EXTRN C _VidGoto:proc
                     32:                         EXTRN C _VidPutc:proc
                     33:                         EXTRN C _VidPutDat:proc
                     34:                         EXTRN C _VidPuts:proc
                     35:                         .CODE
                     36: ENDIF
                     37: 
                     38: endif
                     39: 
                     40: ;
                     41: ;  Macro: VIDPUTWORD data
                     42: ;
                     43: ;
                     44: ;  ARGUMENTS
                     45: ;
                     46: ;   data : Any 16 bit value that can be moved into ax with
                     47: ;          a mov ax, data instruction.
                     48: ;
                     49: ;  DESCRIPTION
                     50: ;
                     51: ;  This macro is used in the DOS ISR to display a single binary
                     52: ;  word in hex.  The real work is done by _VidPutDat, the macro just
                     53: ;  takes care of setting things up to facilitate the call.
                     54: ;
                     55: ;  SIDE EFFECTS
                     56: ;
                     57: ;   None.
                     58: ;
                     59: ;  RETURNS
                     60: ;
                     61: ;   Nothing.
                     62: ;
                     63: ;  AUTHOR
                     64: ;
                     65: ;   SM          October 17, 1994
                     66: ;
                     67: ;  MODIFICATIONS
                     68: ;
                     69: ;
                     70: 
                     71: VIDPUTWORD              MACRO dat  ; Tag: Debug private
                     72:                         push  ax
                     73:                         push  cx
                     74:                         mov   cl,8
                     75:                         mov   ax,dat      ;Get the word to display
                     76:                         ror   ax,cl       ;Get the upper eight bits
                     77:                         push  ax          ;Send the upper bits to _VidPutDat
                     78:                         call  _VidPutDat
                     79:                         add   sp,2
                     80:                         mov   ax,dat
                     81:                         push  ax          ;Now send the lower bits
                     82:                         call  _VidPutDat
                     83:                         add   sp,2
                     84:                         pop  cx
                     85:                         pop  ax
                     86:                         ENDM
                     87: 
                     88: ;
                     89: ;  Macro: VIDGOTO row,col
                     90: ;
                     91: ;  ARGUMENTS
                     92: ;
                     93: ;   row : The row to go to on the screen.  This can be any sort
                     94: ;         of identifier that can be accessed with a mov ax,row
                     95: ;         instruction, loading 16 bits.
                     96: ;
                     97: ;   col : The column to go to on the screen. This can be any sort
                     98: ;         of identifier that can be accessed with a mov ax,col
                     99: ;         instruction, loading 16 bits.
                    100: ;
                    101: ;  DESCRIPTION
                    102: ;
                    103: ;  This macro is used in the DOS ISR to move the cursor, or current
                    104: ;  output location, to a specific location on the screen.
                    105: ;
                    106: ;  SIDE EFFECTS
                    107: ;
                    108: ;   None.
                    109: ;
                    110: ;  RETURNS
                    111: ;
                    112: ;  Nothing.
                    113: ;
                    114: ;  AUTHOR
                    115: ;
                    116: ;   SM          October 17, 1994
                    117: ;
                    118: ;  MODIFICATIONS
                    119: ;
                    120: 
                    121: VIDGOTO                 MACRO   row,col  ; Tag: Debug private
                    122:                         push    ax
                    123:                         mov     ax,col
                    124:                         push    ax
                    125:                         mov     ax,row
                    126:                         push    ax
                    127:                         call    _VidGoto
                    128:                         add     sp,4
                    129:                         pop     ax
                    130:                         ENDM
                    131: 
                    132: ;
                    133: ;  Macro: VIDPUTC char
                    134: ;
                    135: ;
                    136: ;  ARGUMENTS
                    137: ;
                    138: ;   char : A single character that needs to be displayed on the screen.
                    139: ;
                    140: ;  DESCRIPTION
                    141: ;
                    142: ;  This macro is used in the MS-DOS ISR to display a single character
                    143: ;  at the current cursor position on the screen.  It does this with
                    144: ;  a single call to _VidPutc.  Note that the argument can be anything
                    145: ;  that can load a 16 bit value with mov ax,value.
                    146: ;
                    147: ;  SIDE EFFECTS
                    148: ;
                    149: ;   None.
                    150: ;
                    151: ;  RETURNS
                    152: ;
                    153: ;   Nothing.
                    154: ;
                    155: ;  AUTHOR
                    156: ;
                    157: ;   SM          October 17, 1994
                    158: ;
                    159: ;  MODIFICATIONS
                    160: ;
                    161: ;
                    162: 
                    163: VIDPUTC                 MACRO   Char  ; Tag: Debug private
                    164:                         push    ax
                    165:                         mov     ax,Char
                    166:                         push    ax
                    167:                         call    _VidPutc
                    168:                         add     sp,2
                    169:                         pop     ax
                    170:                         ENDM
                    171: 
                    172: ;
                    173: ;  Macro: VIDPUTS str
                    174: ;
                    175: ;
                    176: ;  ARGUMENTS
                    177: ;
                    178: ;   str : A string that needs to be displayed on the screen.  Note
                    179: ;         that this doesn't have to be a null terminated string, we
                    180: ;         make a copy of it here and then null terminate the copy.
                    181: ;
                    182: ;  DESCRIPTION
                    183: ;
                    184: ;  This macro is used in the DOS ISR to display an entire string
                    185: ;  on the screen.  We make a local copy of the string in our code
                    186: ;  segment, and null terminate it.  Then we push a pointer to the copy
                    187: ;  on the stack and call _VidPuts.
                    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: VIDPUTS                 MACRO   s  ; Tag: Debug private
                    205:                         LOCAL   skip, string
                    206:                         jmp     short skip
                    207: string                  db      s, 0
                    208: skip:                   push    ax
                    209:                         push    cs
                    210:                         mov     ax, offset string
                    211:                         push    ax
                    212:                         call    _VidPuts
                    213:                         add     sp,4
                    214:                         pop     ax
                    215:                         ENDM
                    216: 
                    217: 

unix.superglobalmegacorp.com

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