added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / arch / .unmaintained / m68k-native / exec / getcc.s
blob5967b8858d340d44fbe8c57f4d974c30e011d996
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 /*****************************************************************************
8 NAME
10 AROS_LH0(UWORD, GetCC,
12 LOCATION
13 struct ExecBase *, SysBase, 88, Exec)
15 FUNCTION
16 Read the contents of the sr in a easy and compatible way.
18 INPUTS
20 RESULT
21 The contents of sr as a UWORD.
23 NOTES
24 This function will most likely be implemented by a few instructions
25 directly in the jumptable.
27 EXAMPLE
29 BUGS
31 SEE ALSO
32 SetSR()
34 INTERNALS
36 HISTORY
38 ******************************************************************************/
41 XDEF AROS_SLIB_ENTRY(GetCC,Exec) 68000 version
42 XDEF AROS_SLIB_ENTRY(GetCC_10,Exec) 68010+ version
45 #include "machine.i"
47 .text
48 .balign 4
49 .globl AROS_SLIB_ENTRY(GetCC,Exec)
50 .type AROS_SLIB_ENTRY(GetCC,Exec),@function
52 /* This function is implemented directly in the jumptable - but it
53 does no harm to see what it looks like.
54 68000 version */
55 AROS_SLIB_ENTRY(GetCC,Exec):
56 move.w sr,d0
57 rts
59 /* 68010 and up */
60 .text
61 .balign 4
62 .globl AROS_SLIB_ENTRY(GetCC_10,Exec)
63 .type AROS_SLIB_ENTRY(GetCC_10,Exec),@function
64 AROS_SLIB_ENTRY(GetCC_10,Exec):
65 move.w ccr,d0
66 rts