home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / test / pdp11 / krter1.mac < prev    next >
Text File  |  1996-10-17  |  4KB  |  130 lines

  1.     .title    rmser1    1st ovrelay for rms11 error text
  2.     .ident    /V04.64/
  3.  
  4. ; /E64/    10-May-96  John Santos
  5.  
  6.  
  7.     .psect
  8.  
  9.  
  10.     .macro    save    list
  11.     .if b , <list>
  12.     .ift
  13.      save    <r0,r1,r2,r3,r4,r5>
  14.     .iff
  15.     .irp    x,<list>
  16.      mov    x,-(sp)
  17.         .endr
  18.     .endc
  19.     .endm    save
  20.  
  21.  
  22.     .macro    unsave    list
  23.     .if b , <list>
  24.     .ift
  25.     unsave    <r5,r4,r3,r2,r1,r0>
  26.     .iff
  27.     .irp    x,<list>
  28.      mov    (sp)+,x
  29.         .endr
  30.     .endc
  31.     .endm    unsave
  32.  
  33.  
  34. rmser1::save    <r0,r1,r2>        ; be nice to our caller
  35.     mov    4(r5)    ,r1        ; return buffer address
  36.     mov    r1    ,r2        ; save buffer address
  37.     clrb    (r1)+            ; make first char .asciz
  38.     mov    #77    ,r0        ; clear it out first
  39. 10$:    movb    #40    ,(r1)+        ; fill rest of buffer with spaces
  40.     sob    r0    ,10$        ; next please
  41.     mov    #dsp    ,r0        ; get the index table for errors
  42. 20$:    tst    @r0            ; hit the end yet ?
  43.     beq    100$            ; yes, exit with no text
  44.     cmp    @2(r5)    ,@r0        ; type indexentry = record
  45.     beq    30$            ;       errnum: integer
  46.     cmp    (r0)+    ,(r0)+        ;    errtxt: textaddress
  47.     br    20$            ;      end ;
  48.  
  49. 30$:    mov    2(r0)    ,r0        ; get the error text address
  50.     mov    #77    ,r1        ; maxlength of 77 (8) bytes
  51. 40$:    movb    (r0)+    ,(r2)+        ; copy until 63 characters or a
  52.     beq    50$            ; null byte is found
  53.     sob    r1    ,40$        ; next please
  54. 50$:    clrb    @r2            ; insure .asciz for output text
  55.  
  56. 100$:    unsave    <r2,r1,r0>        ; pop our registers and exit
  57.     return
  58.  
  59.  
  60.  
  61.  
  62.     .psect    dsp    ,ro,d,lcl,rel,con
  63. dsp:
  64.     .psect    msgtxt    ,ro,d,lcl,rel,con
  65.     .macro    $ioer$    nam,code,txt
  66.  
  67.     .psect    msgtxt
  68.     $$ = .
  69.     .ascii    #nam#
  70.     .ascii    #-#            ;/*60*/
  71.     .asciz    #txt#
  72.     .psect    dsp
  73.     .word    code,$$
  74.     nam    =    code
  75.     .psect
  76.     .endm
  77.  
  78.  
  79. $IOER$    ER$ABO,-16.,<This error code no longer in use>
  80. $IOER$    ER$ACC,-32.,<F11ACP access error or file improperly closed or created>
  81. $IOER$    ER$ACT,-48.,<Current RMS activity precludes operation>
  82. $IOER$    ER$AID,-64.,<Bad area ID (STV=@XAB)>
  83. $IOER$    ER$ALN,-80.,<Alignment options error (STV=@XAB)>
  84. $IOER$    ER$ALQ,-96.,<Improper allocation quantity>
  85. $IOER$    ER$ANI,-112.,<Not ANSI "D" format>
  86. $IOER$    ER$AOP,-128.,<Allocation options error (STV=@XAB)>
  87. $IOER$    ER$AST,-144.,<Invalid operation at AST level>
  88. $IOER$    ER$ATR,-160.,<Attribute read error (STV=SYS err code)>
  89. $IOER$    ER$ATW,-176.,<Attribute write error (STV=SYS err code)>
  90. $IOER$    ER$BKS,-192.,<Bucket size too large (FAB)>
  91. $IOER$    ER$BKZ,-208.,<Bucket size too large (STV=@XAB)>
  92. $IOER$    ER$BLN,-224.,<This error code no longer in use>
  93. $IOER$    ER$BOF,-232.,<Beginning of file detected ($SPACE)>
  94. $IOER$    ER$BPA,-240.,<Private pool address zero or not word-aligned>
  95. $IOER$    ER$BPS,-256.,<Private pool size not multiple of "4">
  96. $IOER$    ER$BUG,-272.,<Internal RMS error condition detected>
  97. $IOER$    ER$CCR,-288.,<Can't connect RAB>
  98. $IOER$    ER$CHG,-304.,<$UPDATE-Key change without having attribute of XB$CHG set>
  99. $IOER$    ER$CHK,-320.,<Bucket header corrupted>
  100. $IOER$    ER$CLS,-336.,<RSTS/E close function failed (STV=SYS err code)>
  101. $IOER$    ER$COD,-352.,<Invalid or unsupported "COD" field (STV=@XAB)>
  102. $IOER$    ER$CPB,-360.,<Parameter block has invalid argument list>
  103. $IOER$    ER$CRE,-368.,<Could not create file (STV=SYS err code)>
  104. $IOER$    ER$CUR,-384.,<No current record (Operation not preceded by GET/FIND)>
  105. $IOER$    ER$DAC,-400.,<F11ACP deaccess error during "CLOSE" (STV=SYS err code)>
  106. $IOER$    ER$DAN,-416.,<Data area number invalid (STV=@XAB)>
  107. $IOER$    ER$DEL,-432.,<RFA-Accessed record was deleted>
  108. $IOER$    ER$DEV,-448.,<Bad device, or inappropriate device type>
  109. $IOER$    ER$DFW,-456.,<Error occurred on deferred write (STV=SYS err code)>
  110. $IOER$    ER$DIR,-464.,<Error in directory name>
  111. $IOER$    ER$DME,-480.,<Dynamic memory exhausted>
  112. $IOER$    ER$DNA,-488.,<Zero DNA with non-zero DNS>
  113. $IOER$    ER$DNF,-496.,<Directory not found>
  114. $IOER$    ER$DNR,-512.,<Device not ready>
  115. $IOER$    ER$DPE,-520.,<Device positioning error (STV=SYS err code)>
  116. $IOER$    ER$DTP,-528.,<"DTP" field invalid (STV=@XAB)>
  117. $IOER$    ER$DUP,-544.,<Duplicate key detected, XB$DUP attribute not set>
  118. $IOER$    ER$ENT,-560.,<RSX-F11ACP ENTER function failed (STV=SYS err code)>
  119. $IOER$    ER$ENV,-576.,<Operation not selected in ORG$ or TKB>
  120. $IOER$    ER$EOF,-592.,<End-of-file>
  121. $IOER$    ER$ESA,-600.,<Expanded string address is zero>
  122. $IOER$    ER$ESL,-604.,<No expanded string in expanded string area>
  123. $IOER$    ER$ESS,-608.,<Expanded string area too short>
  124. $IOER$    ER$EXP,-616.,<File expiration date not yet reached>
  125.  
  126.     .psect    dsp
  127.     .word    0,0            ; mark end of text
  128.  
  129.     .end
  130.