Commit 96475ccd authored by Stewart Brodie's avatar Stewart Brodie
Browse files

Added escape condition checking and handling code.

Detail:
  escape_check returns R0:0 as the escape condition flag (returned in
    C flag from OS_ReadEscapeState).
  escape_check_ack will acknowledge an escape condition if one exists
    (OS_Byte 126)
  escape_check_clear will clear an escape condition if one exists
    (OS_Byte 124)
Admin:
  Built.

Version 0.08. Tagged as 'AsmUtils-0_08'
parent 985d3e76
......@@ -78,13 +78,13 @@ SOURCE =
EXPORTS =
OBJS= o.callbacks o.sixtyfour o.heapswis o.rminfo o.irqs \
o.osvarlen o.muldiv o.modulefp o.fpsr
o.osvarlen o.muldiv o.modulefp o.fpsr o.escape
OBJSZ= oz.callbacks oz.sixtyfour oz.heapswis oz.rminfo oz.irqs \
oz.osvarlen oz.muldiv oz.modulefp oz.fpsr
oz.osvarlen oz.muldiv oz.modulefp oz.fpsr oz.escape
HDRS= h.callbacks h.sixtyfour h.heapswis h.rminfo h.irqs \
h.osvarlen h.muldiv h.modulefp h.fpsr
h.osvarlen h.muldiv h.modulefp h.fpsr h.escape
LIBS = ${TARGET} ${TARGETZ}
......@@ -129,6 +129,7 @@ export_hdrs: ${HDRS} export_dirs
${CP} h.muldiv ${LIBDIR}.h.muldiv ${CPFLAGS}
${CP} h.modulefp ${LIBDIR}.h.modulefp ${CPFLAGS}
${CP} h.fpsr ${LIBDIR}.h.fpsr ${CPFLAGS}
${CP} h.escape ${LIBDIR}.h.escape ${CPFLAGS}
${CP} VersionNum ${LIBDIR}.LibVersion ${CPFLAGS}
@echo ${COMPONENT}: export complete (hdrs)
......
/* (0.07)
/* (0.08)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 0.07
#define Module_MajorVersion_CMHG 0.08
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 05 May 2000
#define Module_Date_CMHG 08 May 2000
#define Module_MajorVersion "0.07"
#define Module_Version 7
#define Module_MajorVersion "0.08"
#define Module_Version 8
#define Module_MinorVersion ""
#define Module_Date "05 May 2000"
#define Module_Date "08 May 2000"
#define Module_FullVersion "0.07"
#define Module_FullVersion "0.08"
/* Copyright 2000 Pace Micro Technology plc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* AsmUtils (irqs.h)
*
* Copyright (C) Pace Micro Technology plc. 2000
*
*/
#ifndef asmutils_escape_h_inluded
#define asmutils_escape_h_inluded
#ifdef __cplusplus
extern "C" {
#endif
/* Support for ESCAPE condition detection, clearing & acknowledging */
/* Bit 0 of the return value is set if an escape condition existed
* Bits 1-31 are indeterminate
*/
extern unsigned int escape_check(void);
extern unsigned int escape_check_ack(void);
extern unsigned int escape_check_clear(void);
#ifdef __cplusplus
}
#endif
#endif
; Copyright 2000 Pace Micro Technology plc
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
; escape.s
;
GET Hdr:ListOpts
GET Hdr:Macros
GET Hdr:System
GET Hdr:APCS.<APCS>
; extern unsigned int escape_check(void);
; extern unsigned int escape_check_ack(void);
; extern unsigned int escape_check_clear(void);
AREA |AsmUtils$escape1$$Code|, CODE, READONLY, PIC
EXPORT escape_check
escape_check
FunctionEntry
SWI XOS_ReadEscapeState
MOV r0, #0
ADC r0, r0, r0
Return
AREA |AsmUtils$escape2$$Code|, CODE, READONLY, PIC
EXPORT escape_check_clear
EXPORT escape_check_ack
escape_check_clear
MOV r0, #124
B escape_common
escape_check_ack
MOV r0, #126
escape_common
FunctionEntry
SWI XOS_ReadEscapeState
MOVS r3, r3, RRX ; C->R3:31, N=C
SWIMI XOS_Byte
MOV r0, r3, LSR #31
Return
END
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment