diff options
Diffstat (limited to 'nuttx/arch/z80/src/z80/z80_io.c')
-rw-r--r-- | nuttx/arch/z80/src/z80/z80_io.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/nuttx/arch/z80/src/z80/z80_io.c b/nuttx/arch/z80/src/z80/z80_io.c index cddaa6831..bdd55bc6b 100644 --- a/nuttx/arch/z80/src/z80/z80_io.c +++ b/nuttx/arch/z80/src/z80/z80_io.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/z80/src/z80/z80_io.c * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -44,9 +44,23 @@ #include "up_internal.h" /**************************************************************************** - * Private Definitions + * Pre-processor Definitions ****************************************************************************/ +#undef ASM +#undef ENDASM +#undef NAKED + +#ifdef CONFIG_SDCC_OLD +# define ASM _asm +# define ENDASM _endasm +# define NAKED +#else +# define ASM __asm +# define ENDASM __endasm +# define NAKED __naked +#endif + /**************************************************************************** * Private Data ****************************************************************************/ @@ -69,11 +83,11 @@ void outp(char p, char c) { - _asm + ASM ld c, 4(ix) ; port ld a, 5(ix) ; value out (c), a - _endasm; + ENDASM; } @@ -85,10 +99,10 @@ void outp(char p, char c) * ****************************************************************************/ -char inp(char p) +char inp(char p) NAKED { - _asm + ASM ld c, 4(ix) ;port in l, (c) - _endasm; + ENDASM; } |