Annotation of os2sdk/startup/dos/crt0msg.asm, revision 1.1.1.1

1.1       root        1:        TITLE   crt0msg - startup messages
                      2: ;*** 
                      3: ;crt0msg.asm - startup error messages
                      4: ;
                      5: ;      Copyright (c) 1985-1987, Microsoft Corporation.  All rights reserved.
                      6: ;
                      7: ;Purpose:
                      8: ;      Core collection of error messages contained in programs
                      9: ;      which use the C startup code; also contains _FF_MSGBANNER
                     10: ;      for writing the first portion of run-time error messages.
                     11: ;
                     12: ;*******************************************************************************
                     13: 
                     14: 
                     15: ?DF=           1                       ; this is special for c startup
                     16: include version.inc
                     17: .xlist
                     18: include cmacros.inc
                     19: .list
                     20: 
                     21: createSeg      HDR,    nhdr,   byte,   public, MSG,    DGROUP
                     22: createSeg      MSG,    nmsg,   byte,   public, MSG,    DGROUP
                     23: createSeg      PAD,    npad,   byte,   common, MSG,    DGROUP
                     24: createSeg      EPAD,   nepad,  byte,   common, MSG,    DGROUP
                     25: 
                     26: createSeg      _TEXT,  code,   word,   public, CODE,   <>
                     27: createSeg      _DATA,  data,   word,   public, DATA,   DGROUP
                     28: 
                     29: defGrp DGROUP                          ; define DGROUP
                     30: 
                     31: 
                     32: public __acrtmsg
                     33: __acrtmsg=     9876h
                     34: 
                     35: ;      Messages used by crt0.asm
                     36: 
                     37: sBegin nmsg
                     38: assumes ds,data
                     39:        dw      0
                     40:        db      'R6000',13,10,'- stack overflow',13,10,0
                     41:        dw      3
                     42:        db      'R6003',13,10,'- integer divide by 0',13,10,0
                     43:        dw      9
                     44:        db      'R6009',13,10,'- not enough space for environment',13,10,0
                     45: ifdef  _QC
                     46:        dw      12
                     47:        db      'R6012',13,10,'- illegal near pointer use',13,10,0
                     48:        dw      13
                     49:        db      'R6013',13,10,'- illegal far pointer use',13,10,0
                     50:        dw      14
                     51:        db      'R6014',13,10,'- control-BREAK encountered',13,10,0
                     52: endif  ;_QC
                     53:        dw      252
                     54:        db      13,10,0 
                     55:        dw      255
                     56:        db      'run-time error ',0     
                     57: sEnd   nmsg
                     58: 
                     59: sBegin npad
                     60: assumes ds,data
                     61:        dw      -1
                     62: ; no padding for now;
                     63: ; MAX padding would be
                     64: ;      db      114 dup(0)      
                     65: sEnd
                     66: 
                     67: externP                _NMSG_WRITE
                     68: 
                     69: sBegin data
                     70:        assumes ds,data
                     71:        
                     72: globalCP       _adbgmsg,0              ; For C, _FF_DBGMSG is inactive, so
                     73:                                        ; _adbgmsg is set to null;
                     74:                                        ; For FORTRAN, _adbgmsg is set to 
                     75:                                        ; point to _FF_DBGMSG in dbginit 
                     76:                                        ; initializer in dbgmsg.asm 
                     77: 
                     78: sEnd   data
                     79: 
                     80: 
                     81: sBegin code
                     82:        assumes cs,code
                     83:        assumes ds,data
                     84: 
                     85: page
                     86: ;*** 
                     87: ;_FF_MSGBANNER - writes out first part of run-time error messages
                     88: ;
                     89: ;Purpose:
                     90: ;      This routine writes "\r\n" followed by "run-time error " to standard 
                     91: ;      error. 
                     92: ;
                     93: ;      For FORTRAN $DEBUG error messages, it also uses the _FF_DBGMSG 
                     94: ;      routine whose address is stored in the _adbgmsg variable to print out
                     95: ;      file and line number information associated with the run-time error.
                     96: ;      If the value of _adbgmsg is found to be null, then the _FF_DBGMSG 
                     97: ;      routine won't be called from here (the case for C-only programs).
                     98: ;
                     99: ;Entry:
                    100: ;      No arguments.
                    101: ;
                    102: ;Exit:
                    103: ;      Nothing returned.
                    104: ;
                    105: ;Uses:
                    106: ;      AX,BX,CX,DX,ES are destroyed.
                    107: ;
                    108: ;Exceptions:
                    109: ;      None handled.
                    110: ;
                    111: ;*******************************************************************************
                    112: 
                    113: 
                    114: cProc  _FF_MSGBANNER,<PUBLIC>,<>
                    115: cBegin
                    116:        mov     ax,252                  ; "\r\n" to begin error message
                    117:        push    ax
                    118:        call    _NMSG_WRITE
                    119: if sizeC
                    120:        cmp     word ptr [__adbgmsg+2],0
                    121:        jz      dbgmsg_inactive
                    122:        call    dword ptr [__adbgmsg]   ; call __FF_DBGMSG for FORTRAN
                    123: else                                           ; not needed for C-only version
                    124:        cmp     [__adbgmsg],0
                    125:        jz      dbgmsg_inactive
                    126:        call    word ptr [__adbgmsg]    
                    127: endif
                    128: dbgmsg_inactive:
                    129:        mov     ax,255                  ; run-time error message banner
                    130:        push    ax
                    131:        call    _NMSG_WRITE
                    132: cEnd
                    133: 
                    134: sEnd   code
                    135: 
                    136:        end

unix.superglobalmegacorp.com

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