From a2e7026e25995d9db5ceadf2bcb586ba37891422 Mon Sep 17 00:00:00 2001 From: kvigor Date: Wed, 30 May 2001 20:38:37 +0000 Subject: [PATCH] Use sparkly new _naked attribute git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@862 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- device/lib/ds390/memcpyx.c | 3 ++- device/lib/ds390/tinibios.c | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/device/lib/ds390/memcpyx.c b/device/lib/ds390/memcpyx.c index 66e7ea7c..d8c4df1f 100644 --- a/device/lib/ds390/memcpyx.c +++ b/device/lib/ds390/memcpyx.c @@ -4,7 +4,7 @@ void _xdata * memcpyx ( void _xdata * dst, void _xdata * src, int count - ) + ) _naked { /* Shut compiler up about unused parameters. */ dst; src; count; @@ -87,6 +87,7 @@ _memcpy_done: pop dpl pop dph pop dpx + ret _endasm; } diff --git a/device/lib/ds390/tinibios.c b/device/lib/ds390/tinibios.c index 318ee027..4c4f0ef2 100755 --- a/device/lib/ds390/tinibios.c +++ b/device/lib/ds390/tinibios.c @@ -487,16 +487,17 @@ void ClockInit() { // This needs to be SUPER fast. What we really want is: #if 0 -void ClockIrqHandler (void) interrupt 1 { +void junk_ClockIrqHandler (void) interrupt 10 { TL0=timer0ReloadValue&0xff; TH0=timer0ReloadValue>>8; milliSeconds++; } #else // but look at the code, and the pushes and pops, so: -#pragma EXCLUDE b,dpl,dph,dpx -void ClockIrqHandler (void) interrupt 1 { +void ClockIrqHandler (void) interrupt 1 _naked +{ _asm + push acc mov _TL0,_timer0ReloadValue mov _TH0,_timer0ReloadValue+1 clr a @@ -507,11 +508,11 @@ void ClockIrqHandler (void) interrupt 1 { inc _milliSeconds+2 cjne a,_milliSeconds+2,_ClockIrqHandlerDone inc _milliSeconds+3 - cjne a,_milliSeconds+3,_ClockIrqHandlerDone _ClockIrqHandlerDone: + pop acc + reti _endasm; } -#pragma EXCLUDE NONE #endif // we can't just use milliSeconds -- 2.30.2