home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / hp / 14761 < prev    next >
Encoding:
Text File  |  1993-01-12  |  2.2 KB  |  74 lines

  1. Path: sparky!uunet!mcsun!julienas!ensta!bertrand.ensta.fr!baudoin
  2. From: baudoin@bertrand.ensta.fr (Marc Baudoin)
  3. Newsgroups: comp.sys.hp
  4. Subject: Please, write it in PA RISC
  5. Date: 12 Jan 1993 11:42:24 GMT
  6. Organization: Ecole Nationale Superieure de Techniques Avancees, Paris
  7. Lines: 62
  8. Distribution: world
  9. Message-ID: <1iuar0INNs3c@ensta.ensta.fr>
  10. NNTP-Posting-Host: bertrand.ensta.fr
  11.  
  12. This a call to all PA RISC wizards. I'd like to compile dbx on a HP 9000/700,
  13. but it needs a small assembly program. This is the mc68020 version :
  14.  
  15.  
  16.  
  17. /*
  18.  * Copyright (c) 1983 The Regents of the University of California.
  19.  * All rights reserved.
  20.  *
  21.  * Redistribution and use in source and binary forms are permitted
  22.  * provided that the above copyright notice and this paragraph are
  23.  * duplicated in all such forms and that any documentation,
  24.  * advertising materials, and other materials related to such
  25.  * distribution and use acknowledge that the software was developed
  26.  * by the University of California, Berkeley.  The name of the
  27.  * University may not be used to endorse or promote products derived
  28.  * from this software without specific prior written permission.
  29.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  30.  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  31.  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  32.  *
  33.  *    @(#)cerror.sun.s    5.2 (Berkeley) 5/23/89
  34.  */
  35.  
  36. /*
  37.  * modified version of cerror
  38.  *
  39.  * The idea is that every time an error occurs in a system call
  40.  * I want a special function "syserr" called.  This function will
  41.  * either print a message and exit or do nothing depending on
  42.  * defaults and use of "onsyserr".
  43.  */
  44.  
  45. .data
  46. .globl    _errno
  47. _errno:
  48.     .long    0
  49. .text
  50.  
  51. .globl    cerror
  52. cerror:
  53.     movl    d0,_errno
  54.     jbsr    _syserr        /* new code */
  55.     moveq    #-1,d0
  56.     rts
  57.  
  58. .globl    __mycerror        /* clumsy way to get this loaded */
  59.  
  60. __mycerror:
  61.     rts
  62.  
  63.  
  64.  
  65. Can anybody translate it into PA RISC assembly code ?
  66.  
  67. Thanks
  68.  
  69. -- 
  70.                        ___   __    ___   __    ___  __
  71.  Marc Baudoin         /  /  /  \  /  /  /  \  /    /  \  /   /   Babassez-vous
  72.  le babasseur fou    /  \  /---/ /  \  /---/ /--  /   / /   /    les uns
  73.  baudoin@ensta.fr   /___/ /   / /___/ /   / /     \__/  \__/     les autres
  74.