URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [newlib-1.10.0/] [libgloss/] [pa/] [op50n-io.S] - Rev 1765
Compare with Previous | Blame | View Log
/* op50n-io.S -- low-level I/O routines for the Oki OP50N eval board.** Copyright (c) 1995 Cygnus Support** The authors hereby grant permission to use, copy, modify, distribute,* and license this software and its documentation for any purpose, provided* that existing copyright notices are retained in all copies and that this* notice is included verbatim in any distributions. No written agreement,* license, or royalty fee is required for any of the authorized uses.* Modifications to this software may be copyrighted by their authors* and need not follow the licensing terms described here, provided that* the new terms are clearly indicated on the first page of each file where* they apply.*/mon_start .EQU 0xd0000000where_dp .EQU mon_start+4*4where_ci .EQU mon_start+14*4where_co .EQU mon_start+15*4where_read .EQU mon_start+22*4where_write .EQU mon_start+23*4/**int c = inbyte(wait);*/.space $TEXT$.align 4.EXPORT inbyte,CODE,ARGW0=GR,RTNVAL=GRinbyte.PROC.CALLINFO CALLER,FRAME=64,SAVE_RP.ENTRYstw %r2,-20(0,%r30)ldo 64(%r30),%r30stw %r27,-56(0,%r30) ; save my dpldil l%where_dp,%r27 ; load monitors dpldw r%where_dp(0,%r27),%r27ldil l%where_ci,%r1ldw r%where_ci(0,%r1),%r1ble 0(0,%r1)copy %r31,%r2ldw -56(0,%r30),%r27 ; load my dpldw -84(0,%r30),%r2ldo -64(%r30),%r30bv %r0(%r2)nop.EXIT.PROCEND/* int c = outbyte(c);*/.EXPORT outbyte,CODE,ARGW0=GR,RTNVAL=GRoutbyte.PROC.CALLINFO CALLER,FRAME=64,SAVE_RP.ENTRYstw %r2,-20(0,%r30)ldo 64(%r30),%r30stw %r27,-56(0,%r30) ; save my dpldil l%where_dp,%r27 ; load monitors dpldw r%where_dp(0,%r27),%r27ldil l%where_co,%r1ldw r%where_co(0,%r1),%r1ble 0(0,%r1)copy %r31,%r2ldw -56(0,%r30),%r27 ; load my dpldw -84(0,%r30),%r2ldo -64(%r30),%r30bv %r0(%r2)nop.EXIT.PROCEND#if 0/* cnt = read(fd, bufp, cnt);*/.EXPORT read,CODE,ARGW0=NO,ARGW1=NO,ARGW2=NO,ARGW3=NO,RTNVAL=NOread.PROC.CALLINFO FRAME=64,CALLS,SAVE_RP.ENTRYstw %r2,-20(0,%r30)ldo 64(%r30),%r30stw %dp,-56(0,%r30) ; save my dpldil l%where_dp,%dp ; load monitors dpldw r%where_dp(0,%dp), %dpldil l%where_read,%r1ldw r%where_read(0,%r1), %r1ble 0(0,%r1)copy %r31,%r2ldw -56(0,%r30),%dp ; load my dpldw -84(0,%r30),%r2bv %r0(%r2)ldo -64(%r30),%r30.EXIT.PROCEND/* cnt = write(fd, bufp, cnt);*/.EXPORT write,CODE,ARGW0=NO,ARGW1=NO,ARGW2=NO,ARGW3=NO,RTNVAL=NOwrite.PROC.CALLINFO FRAME=64,CALLS,SAVE_RP.ENTRYstw %r2,-20(0,%r30)ldo 64(%r30),%r30stw %dp,-56(0,%r30) ; save my dpldil l%where_dp,%dp ; load monitors dpldw r%where_dp(0,%dp), %dpldil l%where_write,%r1ldw r%where_write(0,%r1), %r1ble 0(0,%r1)copy %r31,%r2ldw -56(0,%r30),%dp ; load my dpldw -84(0,%r30),%r2bv %r0(%r2)ldo -64(%r30),%r30.EXIT.PROCEND#endif
