ELE 408 Design Project

OJ Security System

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Owen Martin

Jeff Goguen

Spring 2001


 


 

In today’s fast paced world, technology has afforded us many luxuries. From email and e-commerce to wireless networking and video, there are many innovative and useful products available. But there is one thing that they cannot provide, which is peace of mind. Our final project for ELE 408 was to develop an application using the Motorola ColdFire that would bring the user some peace of mind, an electronic intruder detection system.

 

More important than one’s possessions, is perhaps one’s life and family. Our OJ Security system would be able to provide today’s consumer with protection for both there loved ones’ and their belongings. Now that we have all of these new innovative products to make our lives easier, who wants to be worrying about getting them stolen?  The OJ Security System will let the consumer be able to sleep at night knowing that the entrances to their home are well protected.

 

Design Issues

The system is both simple and elegant in its design. The current prototype is able to handle up to four different sensors from different locations. This is sufficient to secure the entrances to a small household. Expandability is also available, future versions will be able to support up to 16 sensor inputs. We chose to use the ColdFire’s parallel port to handle these sensor inputs. The decision was made to use the parallel port over a serial connection for several reasons. We wanted to allow for ease of implementation and cost effectiveness. By choosing the parallel port, we could support a limited number of devices, yet it would be relatively simple to develop.

 

If we had gone with a serial communication interface, it would make each sensor more complicated and expensive. Each would need to be able to send and receive data over a serial link. A more robust system would include this type of sensor. With serial data, we could support almost an unlimited number of devices and use the homes own internal phone network to connect them. The ColdFire is powerful and versatile enough to handle even more complex tasks. Our original plan was to develop a web server to work in tandem with the OJ Security System. We could use the Ethernet port on the board to connect the system to the Internet. With a working IP address we could make a network interface that could transmit the status of the system over the Internet in response to a request. A simple web server could be employed with a Java applet that would query the device and interpret the response. The user would be able to get the real-time status of the system from any portable device. Given more time, the web interface would be an excellent enhancement.

 

The design that we chose to go with was much more feasible given the time frame. The sensors we employed are simple low cost switches that when turned off, will generate an interrupt to the system. This will provide a cost effective yet reliable solution. The disadvantage would be that the sensors would each need to be connected to the main system by a single wire. Many people would not want to have to run wires all over their house from each door and window. To alleviate this, a wireless sensor system could be looked into. There are many vendors that support short distance wireless links, a cost factor that could be considered for future versions.

 

Implementation

The user interface to the OJ Security System is handled using the evaluation boards DEBUG module. When the system is first started, the user will be asked for a password to gain access to the features. From the main menu, the user will be able to perform several different functions. The available functions are: Arm, Disarm, Update Status and Lock. The interface is versatile enough to give the user accurate, current data about the system. They are constantly informed on the status of the system and have full control over all the functions.

 

The alarm can be armed from the main menu. When this option is selected, the system will check the status of the input sensors. If all the sensors are secure, we configure it to accept interrupts from IRQ1.  The digital hardware is designed such that if any one of the sensors are tripped (toggle switch flipped), the line connected to IRQ1 will go low to trigger the interrupt.  Otherwise, the state of this line is always high (see Electrical Hardware Schematic for design implementation specifics). Once IRQ1 has been enabled, the status of the system is displayed to the user and then they return to either the main menu or the password prompt.  The determining condition of this is whether or not the user selected the Lock operation prior to the alarm trigger.  This feature was imperative to our Security System to ensure that only the owner would have access to disarming.  Otherwise, the Security System would be useless if a burglar could disarm it via the easily accessible main menu. 

 

The interrupt handler is the key software component of the OJ Security System. This is what gives our system the real time data acquisition. It is superior over a polling event handler since it will work faster and make more efficient use of the processor resources. Once an interrupt is detected, the CPU will read the Parallel Ports input pins and reports it to the user via the DEBUG module. We then use the timer output to flash the lights of the LED indicators. A polling system would severely limit the expandability of the system. By freeing up the CPU, we would be able to support additional features in the future.

 

Once the alarm is active, the user must manually disable it. If the system is in the locked state, it will be first necessary to enter the correct password. Once that user has gained access to the main menu, they will then be able to disable the alarm by selecting the proper menu choice. When the alarm is active, you will be able to see exactly which sensor is causing the problem.

 

Functional Units

When we designed the system, we tried to use a modular approach. We created numerous functions to implement the functionality of the system. Our design is both scalable and easily debugged. Once a function is proved to behave predictably its task can be abstracted. Listed here are some of the functions and a description of the job that they perform.

 

INITIALIZE – This function needs to be called when the system is first started. All of display messages are stored into memory.  The alarm status is set to disarmed and the alarm detection trigger (IRQ1) is disabled.

 

WELCOME – Here we display a welcome message and prompt for the user’s password. A check is performed on the password and the function will not exit until the password is valid.

MENU – Displays the menu selection and interprets the user’s choice. It will then call the appropriate subroutine to complete the task.

 

DISPLAY – This is a simple function that takes a pointer to a string of characters and displays it to the screen. The function assumes that the address of the character array is in A6 and that the last character is End of Text (ETX).

 

GET_PASSWORD – Enables the user to enter a string of characters via the DEBUG module. Stores all characters until Enter is pressed, also appends and ETX to the end of the string. Assumes that A5 contains the address of where the data should be stored.

 

ARM_SYSTEM – Initializes the interrupt handler and enables interrupts on IRQ1. We use an autovector to point to the exception handler. First the status of the input ports in determined, then this information is relayed to the user.  Will also cause the alarm enabled indicator to blink on the proto board.

 

ALARM_EXCEPTION– When an interrupt is found, this function is called. It first enables the alarm, and then displays a message to the user via DEBUG module.  Will also cause the specific triggered alarm sensor indicator(s) to blink on the proto board.

 

DISARM_SYSTEM – Disables all interrupts using the Interrupt Mask Register.  Shuts off the alarm enabled indicator on the proto board, and stops the alarm sensor indicator(s) from blinking.

 

GET_STATUS – Reports on the status of the system. Determines what state the system is in and also the state of the sensors on the parallel port.

 

DISABLE_INTERRUPT – Masks IRQ1 in the IMR to prevent the CPU from servicing interrupts.

 

 

 

Conclusion

Our goal in designing the OJ Security System was to develop a low cost yet effective means of protection for the home. It is not only the wealthy an affluent people that need defense from intruders. Our system is both flexible and expandable to be able to meet any budget. Our low-end model that was implemented in the ELE lab could be manufactured for less than $50 per unit. By utilizing a ColdFire core, it allows us to feature powerful and efficient service. There is also the ability to support additional features such as the web interface. We were able to develop a solid and stable real time embedded system that was a good application of the skills acquired in class. We integrated some features that we had learned about and also develop the techniques to utilize some additional functionality.

 

 

 

 

                   Appendix A: Specifications


 


 


Appendix C: Schematic



Appendix D: Code Listing

 


| Owen Martin Jeff Goguen

| ELE 408 Final Project

 

|-------------------------------------------------------------------------------

 

MBAR          =      0x10000000

 

| **** Definitions for Interrupt (IRQ-1)

VBR           =      0x00000000

AVCR          =      MBAR + 0x4B

IMR           =      MBAR + 0x44

IPR           =      MBAR + 0x40

 

| **** Definitions for PP

PAR           =      MBAR + 0x004

PADDR         =      MBAR + 0x244

PADAT         =      MBAR + 0x248

 

| **** Definitions for Timer Module

TMR1          =      MBAR + 0x140      |Timer Mode Register

TRR1          =      MBAR + 0x144      |Timer Reference Register

TCR1          =      MBAR + 0x148      |Timer Capture Register

TCN1          =      MBAR + 0x14C      |Timer Count Register

TER1          =      MBAR + 0x150      |Timer Event Register

 

TMR2          =      MBAR + 0x180      |Timer Mode Register

TRR2          =      MBAR + 0x184      |Timer Reference Register

TCR2          =      MBAR + 0x188      |Timer Capture Register

TCN2          =      MBAR + 0x18C      |Timer Count Register

TER2          =      MBAR + 0x191      |Timer Event Register

 

 

VAR_ROOT      =      0x23000              | Defines the mem addr where the data will be initialized

 

MAIN_HEADER_MESSAGE= VAR_ROOT + 0x000    

GET_PASS_MESSAGE     =      VAR_ROOT + 0x200    

SYSTEM_PASS          =      VAR_ROOT + 0x400

STATUS_HEADER =      VAR_ROOT + 0x600    

ACTION_HEADER =      VAR_ROOT + 0x700    

MENU_MESSAGE  =      VAR_ROOT + 0x800    

SOUNDING_ALARM       =      VAR_ROOT + 0xA00

SYS_DISARMED  =      VAR_ROOT + 0xC00

SYS_ARMED            =      VAR_ROOT + 0xE00

SYS_PENDING          =      VAR_ROOT + 0xF00

SYS_SECURE           =      VAR_ROOT + 0x1000

SYS_NOT_SECURE       =      VAR_ROOT + 0x1200

ERROR_RETURN  =      VAR_ROOT + 0x1400   

WARNING_HEADER       =      VAR_ROOT + 0x1600   

CHAR_BS              =      VAR_ROOT + 0x1800

CHAR_AS              =      VAR_ROOT + 0x1A00

CHAR_SP              =      VAR_ROOT + 0x1C00

USER_DISARMED =      VAR_ROOT + 0x1E00

USER_ARMED           =      VAR_ROOT + 0x2000

USER_NONE            =      VAR_ROOT + 0x2100

F_DOOR_ERR           =      VAR_ROOT + 0x2200   

B_DOOR_ERR           =      VAR_ROOT + 0x2400

WIN_ERR              =      VAR_ROOT + 0x2600   

G_DOOR_ERR           =      VAR_ROOT + 0x2800

CAN_NOT_ARM          =      VAR_ROOT + 0x2900

INVALID_PASSWORD     =      VAR_ROOT + 0x3000

 

 

USER_PASS            =      VAR_ROOT + 0x3100

USER_SELECTION       =      VAR_ROOT + 0x3200

ALARM_LOCK           =      VAR_ROOT + 0x3300    | 0: User not locked out, 1: user is locked out (upon ALARM)

ALARM_STATUS  =      VAR_ROOT + 0x3400    | 2: SYS armed, 1: SYS disarmed  0: Pending

INTR_STATUS          =      VAR_ROOT + 0x3500    | 0: ALARM NOT SOUNDING, 1: ALARM IS SOUNDING

SECURE_STATUS =      VAR_ROOT + 0x3600    | 0: SYS not secure, 1: SYS secure

INVALID_PASS_STATUS= VAR_ROOT + 0x3700    | 1: Password enrty just made was invlaid 0: not the case

 

CFI                  =      VAR_ROOT + 0x3800   

 

|-------------------------------------------------------------------------------

|----- MAIN FUNCTION-------------------------------------------------

|-------------------------------------------------------------------------------

       | **** Initialize Alarm Interrupt (IRQ-1)

       move.l        #VBR,%A6      | Initialize the Vector

       move.l        %A6,VBR       | Base Register

 

       move.l #0x20044,%d0

       move.l %d0,VBR+0x64 

      

       move.w #0x202,%d0    | autovector for IRQ1

       move.w %d0,AVCR

 

move.l #0xFFFFFFFE,%d0            | Set Interrupt Mask register to disable

move.l %d0,IMR                    | interrupts on IRQ1

bsr    INITIALIZE           | initialize memory

 

 

LOCK_OUT:

bsr    WELCOME              | authenticate user

 

CLEAR_ALARM:

| 2) **** Set Calling Function Indicator CFI = 0x00

move.l #CFI,%a0     

move.l        #0x00,%a0@

bra           GET_STATUS

GET_STATUS_RET0:

 

 

bra    MENU                 | Display user menu 

MENU_RETURN:

 

trap #15

|-------------------------------------------------------------------------------

 

|-------------------------------------------------------------------------------

ALARM_EXCEPTION:  | (addr: CHANGES ALL THE TIME IF CODE BEFORE THIS POINT IS ADDED/REMOVED !!!!

 

       | 1) **** Set INTR_STATUS = 1

       move.l #INTR_STATUS,%a1

       move.l #0x01,%a1@

 

       nop

       nop

       nop

       nop

       nop

 

       move.w IPR,%d0

       | 3) **** Drive ALARM INDICATORS via TOUT

       move.w #0xB632,%d0  | 0.201 sec / 65535 = 3.07uS per increment of TMR1

                                          | Set to 0x7F3D to set delay to ~ 0.2sec period based on

                                         | prescalar and CE1-CE0 settings of TMR1

 

       move.w %d0,TRR1             | Initialize Timer Reference Register to reg. d6

 

       move.w #0x893B,%d0  | Set timer (prescalar field=0x0A), OM=1, ORI=1, FRR=1,

                                          | and CLK1-CLK0 = 01 for 0.201 sec. delay until

                                          | count = 0xFFFF

 

       move.w %d0,TMR1     | Start Timer, toggle TOUT when count = value in d6

 

      

       bsr    DISABLE_INTERRUPT

 

       | 4) **** Return to appropriate location per ALARM_LOCK

       move.l #ALARM_LOCK,%a0 | get current value of ALARM_LOCK

       move.l        %a0@,%d0

 

       cmp.l         #0x00,%d0            | If ALARM_LOCK = 0 then return to Menu

       beq          CLEAR_ALARM

 

       cmp.l         #0x01,%d0            | If ALARM_LOCK = 1 then return to Password

       beq          LOCK_OUT

 

       move.l #ERROR_RETURN,%a6   

       bsr           DISPLAY

 

|-------------------------------------------------------------------------------

 

|-------------------------------------------------------------------------------

DISABLE_INTERRUPT:

 

move.l #0xFFFFFFFE,%d0            | Set Interrupt Mask register to disable

move.l %d0,IMR                    | interrupts on IRQ1

 

rts

|-------------------------------------------------------------------------------

 

 

 

|-------------------------------------------------------------------------------

INITIALIZE:          | Initialize will place all the proper ASCII values of the

                     | messages into memory sarting at the message's pointer

 

 

       | ------- DEFINE MAIN_HEADER_MESSAGE --------

       move.l #MAIN_HEADER_MESSAGE,%a0   | pointer to message

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x4F,%a0@+         | O

       move.l #0x4A,%a0@+         | J

       move.l #0x20,%a0@+         | SPACE

       move.l #0x53,%a0@+         | S

       move.l #0x45,%a0@+         | E

       move.l #0x43,%a0@+         | C

       move.l #0x55,%a0@+         | U

       move.l #0x52,%a0@+         | R

       move.l #0x49,%a0@+         | I

       move.l #0x54,%a0@+         | T

       move.l #0x59,%a0@+         | Y

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x2B,%a0@+         | +

       move.l #0x03,%a0@+         | ETX

 

 

       | ------- DEFINE GET_PASS_MESSAGE --------

       move.l #GET_PASS_MESSAGE,%a0      | pointer to message

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0x45,%a0@+         | E

       move.l #0x4E,%a0@+         | N

       move.l #0x54,%a0@+         | T

       move.l #0x45,%a0@+         | E

       move.l #0x52,%a0@+         | R

       move.l #0x20,%a0@+         | SPACE

       move.l #0x41,%a0@+         | A

       move.l #0x43,%a0@+         | C

       move.l #0x43,%a0@+         | C

       move.l #0x45,%a0@+         | E

       move.l #0x53,%a0@+         | S

       move.l #0x53,%a0@+         | S

       move.l #0x20,%a0@+         | SPACE

       move.l #0x50,%a0@+         | P

       move.l #0x41,%a0@+         | A

       move.l #0x53,%a0@+         | S

       move.l #0x53,%a0@+         | S

       move.l #0x57,%a0@+         | W

       move.l #0x4F,%a0@+         | O

       move.l #0x52,%a0@+         | R

       move.l #0x44,%a0@+         | D

       move.l #0x3A,%a0@+         | :

       move.l #0x03,%a0@+         | ETX

 

       | ------- DEFINE SYSTEM_PASS --------

       move.l #SYSTEM_PASS,%a0           | pointer to message

       move.l #0x31,%a0@+         | 1

       move.l #0x32,%a0@+         | 2

       move.l #0x33,%a0@+         | 3

       move.l #0x34,%a0@+         | 4

       move.l #0x35,%a0@+         | 5

       move.l #0x03,%a0@+         | ETX

 

       | ------- DEFINE STATUS_HEADER --------

       move.l #STATUS_HEADER,%a0  | pointer to message

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0x53,%a0@+         | S

       move.l #0x54,%a0@+         | T

       move.l #0x41,%a0@+         | A

       move.l #0x54,%a0@+         | T

       move.l #0x55,%a0@+         | U

       move.l #0x53,%a0@+         | S

       move.l #0x3A,%a0@+         | :

       move.l #0x03,%a0@+         | ETX

      

       | ------- DEFINE ACTION_HEADER --------

       move.l #ACTION_HEADER,%a0  | pointer to message

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0x55,%a0@+         | U

       move.l #0x53,%a0@+         | S

       move.l #0x45,%a0@+         | E

       move.l #0x52,%a0@+         | R

       move.l #0x20,%a0@+         | SPACE

       move.l #0x41,%a0@+         | A

       move.l #0x43,%a0@+         | C

       move.l #0x54,%a0@+         | T

       move.l #0x49,%a0@+         | I

       move.l #0x4F,%a0@+         | O

       move.l #0x4E,%a0@+         | N

       move.l #0x3A,%a0@+         | :

       move.l #0x03,%a0@+         | ETX

 

       | ------- DEFINE MENU_MESSAGE --------

       move.l #MENU_MESSAGE,%a0   | pointer to message

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                  | CARRIAGE RETURN

       move.l #0x0A,%a0@+         | NEWLINE

       move.l #0x0D,%a0@+         | CARRIAGE RETURN

       move.l #0x2D,%a0@+         | -

       move.l #0x2D,%a0@+         | -

       move.l #0x2D,%a0@+         | -

       move.l #0x2D,%a0@+         | -

       move.l #0x4F,%a0@+         | O

       move.l #0x50,%a0@+         | P

       move.l #0x54,%a0@+         | T

       move.l #0x49,%a0@+         | I

       move.l #0x4F,%a0@+         | O

       move.l #0x4E,%a0@+         | N

       move.l #0x53,%a0@+         | S

       move.l #0x2D,%a0@+         | -

       move.l #0x2D,%a0@+         | -

       move.l #0x2D,%a0@+         | -

       move.l #0x2D,%a0@+         | -

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                  | CARRIAGE RETURN

       move.l #0x28,%a0@+         | (

       move.l #0x31,%a0@+         | 1

       move.l #0x29,%a0@+         | )

       move.l #0x20,%a0@+         | SPACE

       move.l #0x2D,%a0@+         | -

       move.l #0x20,%a0@+         | SPACE

       move.l #0x41,%a0@+         | A

       move.l #0x52,%a0@+         | R

       move.l #0x4D,%a0@+         | M

       move.l #0x20,%a0@+         | SPACE

       move.l #0x53,%a0@+         | S

       move.l #0x59,%a0@+         | Y

       move.l #0x53,%a0@+         | S

       move.l #0x54,%a0@+         | T

       move.l #0x45,%a0@+         | E

       move.l #0x4D,%a0@+         | M

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+          | CARRIAGE RETURN

       move.l #0x28,%a0@+         | (

       move.l #0x32,%a0@+         | 2

       move.l #0x29,%a0@+         | )

       move.l #0x20,%a0@+         | SPACE

       move.l #0x2D,%a0@+         | -

       move.l #0x20,%a0@+         | SPACE

       move.l #0x44,%a0@+         | D

       move.l #0x49,%a0@+         | I

       move.l #0x53,%a0@+         | S

       move.l #0x41,%a0@+         | A

       move.l #0x52,%a0@+         | R

       move.l #0x4D,%a0@+         | M

       move.l #0x20,%a0@+         | SPACE

       move.l #0x53,%a0@+         | S

       move.l #0x59,%a0@+         | Y

       move.l #0x53,%a0@+         | S

       move.l #0x54,%a0@+         | T

       move.l #0x45,%a0@+         | E

       move.l #0x4D,%a0@+         | M

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                  | CARRIAGE RETURN

       move.l #0x28,%a0@+         | (

       move.l #0x33,%a0@+         | 3

       move.l #0x29,%a0@+         | )

       move.l #0x20,%a0@+         | SPACE

       move.l #0x2D,%a0@+         | -

       move.l #0x20,%a0@+         | SPACE

       move.l #0x4C,%a0@+         | L

       move.l #0x4F,%a0@+         | O

       move.l #0x43,%a0@+         | C

       move.l #0x4B,%a0@+         | K

       move.l #0x20,%a0@+         | SPACE

       move.l #0x53,%a0@+         | S

       move.l #0x59,%a0@+         | Y

       move.l #0x53,%a0@+         | S

       move.l #0x54,%a0@+         | T

       move.l #0x45,%a0@+         | E

       move.l #0x4D,%a0@+         | M

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                  | CARRIAGE RETURN

       move.l #0x28,%a0@+         | (

       move.l #0x34,%a0@+         | 4

       move.l #0x29,%a0@+         | )

       move.l #0x20,%a0@+         | SPACE

       move.l #0x2D,%a0@+         | -

       move.l #0x20,%a0@+         | SPACE

       move.l #0x55,%a0@+         | U

       move.l #0x50,%a0@+         | P

       move.l #0x44,%a0@+         | D

       move.l #0x41,%a0@+         | A

       move.l #0x54,%a0@+         | T

       move.l #0x45,%a0@+         | E

       move.l #0x20,%a0@+         | SPACE

       move.l #0x53,%a0@+         | S

       move.l #0x54,%a0@+         | T

       move.l #0x41,%a0@+         | A

       move.l #0x54,%a0@+         | T

       move.l #0x55,%a0@+         | U

       move.l #0x53,%a0@+         | S

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                  | CARRIAGE RETURN

       move.l #0x28,%a0@+         | (

       move.l #0x35,%a0@+         | 5

       move.l #0x29,%a0@+         | )

       move.l #0x20,%a0@+         | SPACE

       move.l #0x2D,%a0@+         | -

       move.l #0x20,%a0@+         | SPACE

       move.l #0x51,%a0@+         | Q

       move.l #0x55,%a0@+         | U

       move.l #0x49,%a0@+         | I

       move.l #0x54,%a0@+         | T

       move.l #0x03,%a0@+         | ETX

 

       | ------- DEFINE SOUNDING_ALARM --------

       move.l #SOUNDING_ALARM,%a0 | pointer to message

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                  | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                  | CARRIAGE RETURN

       move.l #0x2A,%a0@+         | *

       move.l #0x2A,%a0@+         | *

       move.l #0x2A,%a0@+         | *

       move.l #0x41,%a0@+         | A

       move.l #0x20,%a0@+         | SPACE

       move.l #0x4C,%a0@+         | L

       move.l #0x20,%a0@+         | SPACE

       move.l #0x41,%a0@+         | A

       move.l #0x20,%a0@+         | SPACE

       move.l #0x52,%a0@+         | R

       move.l #0x20,%a0@+         | SPACE

       move.l #0x4D,%a0@+         | M

       move.l #0x20,%a0@+         | SPACE

       move.l #0x20,%a0@+         | SPACE

       move.l #0x20,%a0@+         | SPACE

       move.l #0x53,%a0@+         | S

       move.l #0x20,%a0@+         | SPACE

       move.l #0x4F,%a0@+         | O

       move.l #0x20,%a0@+         | SPACE

       move.l #0x55,%a0@+         | U

       move.l #0x20,%a0@+         | SPACE

       move.l #0x4E,%a0@+         | N

       move.l #0x20,%a0@+         | SPACE

       move.l #0x44,%a0@+         | D

       move.l #0x20,%a0@+         | SPACE

       move.l #0x49,%a0@+         | I

       move.l #0x20,%a0@+         | SPACE

       move.l #0x4E,%a0@+         | N

       move.l #0x20,%a0@+         | SPACE

       move.l #0x47,%a0@+         | G

       move.l #0x2A,%a0@+         | *

       move.l #0x2A,%a0@+         | *

       move.l #0x2A,%a0@+         | *

       move.l #0x03,%a0@+         | ETX

 

       | ------- DEFINE SYS_DISARMED --------

       move.l #SYS_DISARMED,%a0   | pointer to message

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                  | CARRIAGE RETURN

       move.l #0x53,%a0@+         | S

       move.l #0x59,%a0@+         | Y

       move.l #0x53,%a0@+         | S

       move.l #0x54,%a0@+         | T

       move.l #0x45,%a0@+         | E

       move.l #0x4D,%a0@+         | M

       move.l #0x20,%a0@+         | SPACE

       move.l #0x49,%a0@+         | I

       move.l #0x53,%a0@+         | S

       move.l #0x20,%a0@+         | SPACE

       move.l #0x44,%a0@+         | D

       move.l #0x49,%a0@+         | I

       move.l #0x53,%a0@+         | S

       move.l #0x41,%a0@+         | A

       move.l #0x52,%a0@+         | R

       move.l #0x4D,%a0@+         | M

       move.l #0x45,%a0@+          | E

       move.l #0x44,%a0@+         | D

       move.l #0x03,%a0@+         | ETX

 

       | ------- DEFINE SYS_ARMED --------

       move.l #SYS_ARMED,%a0             | pointer to message

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                  | CARRIAGE RETURN

       move.l #0x53,%a0@+         | S

       move.l #0x59,%a0@+         | Y

       move.l #0x53,%a0@+         | S

       move.l #0x54,%a0@+         | T

       move.l #0x45,%a0@+         | E

       move.l #0x4D,%a0@+         | M

       move.l #0x20,%a0@+         | SPACE

       move.l #0x49,%a0@+         | I

       move.l #0x53,%a0@+         | S

       move.l #0x20,%a0@+         | SPACE

       move.l #0x41,%a0@+         | A

       move.l #0x52,%a0@+         | R

       move.l #0x4D,%a0@+         | M

       move.l #0x45,%a0@+         | E

       move.l #0x44,%a0@+         | D

       move.l #0x03,%a0@+         | ETX

 

       | ------- DEFINE SYS_PENDING --------

       move.l #SYS_PENDING,%a0           | pointer to message

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                  | CARRIAGE RETURN

       move.l #0x53,%a0@+         | S

       move.l #0x59,%a0@+         | Y

       move.l #0x53,%a0@+         | S

       move.l #0x54,%a0@+         | T

       move.l #0x45,%a0@+         | E

       move.l #0x4D,%a0@+         | M

       move.l #0x20,%a0@+         | SPACE

       move.l #0x49,%a0@+         | I

       move.l #0x53,%a0@+         | S

       move.l #0x20,%a0@+         | SPACE

       move.l #0x50,%a0@+         | P

       move.l #0x45,%a0@+         | E

       move.l #0x4E,%a0@+         | N

       move.l #0x44,%a0@+         | D

       move.l #0x49,%a0@+         | I

       move.l #0x4E,%a0@+         | N

       move.l #0x47,%a0@+         | G

       move.l #0x03,%a0@+         | ETX

 

       | ------- DEFINE SYS_SECURE --------

       move.l #SYS_SECURE,%a0            | pointer to message

       move.l #0x2C,%a0@+         | ,

       move.l #0x20,%a0@+         | SPACE

       move.l #0x41,%a0@+         | A

       move.l #0x4E,%a0@+         | N

       move.l #0x44,%a0@+         | D

       move.l #0x20,%a0@+         | SPACE

       move.l #0x53,%a0@+         | S

       move.l #0x45,%a0@+         | E

       move.l #0x43,%a0@+         | C

       move.l #0x55,%a0@+         | U

       move.l #0x52,%a0@+         | R

       move.l #0x45,%a0@+         | E

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                  | CARRIAGE RETURN

       move.l #0x03,%a0@+         | ETX

 

       | ------- DEFINE SYS_NOT_SECURE --------

       move.l #SYS_NOT_SECURE,%a0 | pointer to message

       move.l #0x2C,%a0@+         | ,

       move.l #0x20,%a0@+         | SPACE

       move.l #0x41,%a0@+         | A

       move.l #0x4E,%a0@+         | N

       move.l #0x44,%a0@+         | D

       move.l #0x20,%a0@+         | SPACE

       move.l #0x4E,%a0@+         | N

       move.l #0x4F,%a0@+         | O

       move.l #0x54,%a0@+         | T

       move.l #0x20,%a0@+         | SPACE

       move.l #0x53,%a0@+         | S

       move.l #0x45,%a0@+         | E

       move.l #0x43,%a0@+         | C

       move.l #0x55,%a0@+         | U

       move.l #0x52,%a0@+         | R

       move.l #0x45,%a0@+         | E

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                  | CARRIAGE RETURN

       move.l #0x03,%a0@+         | ETX

 

       | ------- DEFINE ERROR_RETURN --------

       move.l #ERROR_RETURN,%a0   | pointer to message

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                  | CARRIAGE RETURN

       move.l #0x45,%a0@+         | E

       move.l #0x52,%a0@+         | R

       move.l #0x52,%a0@+         | R

       move.l #0x4F,%a0@+         | O

       move.l #0x52,%a0@+         | R

       move.l #0x03,%a0@+         | ETX

 

       | ------- DEFINE WARNING_HEADER --------

       move.l #WARNING_HEADER,%a0 | pointer to message

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                  | CARRIAGE RETURN

       move.l #0x57,%a0@+          | W

       move.l #0x41,%a0@+         | A

       move.l #0x52,%a0@+          | R

       move.l #0x4E,%a0@+         | N

       move.l #0x49,%a0@+          | I

       move.l #0x4E,%a0@+         | N

       move.l #0x47,%a0@+          | G

       move.l #0x28,%a0@+         | (

       move.l #0x53,%a0@+          | S

       move.l #0x29,%a0@+         | )

       move.l #0x3A,%a0@+          | :

       move.l #0x03,%a0@+         | ETX

 

 

       | ------- DEFINE CHAR_BS --------

       move.l #CHAR_BS,%a0        | pointer to message

       move.l #0x08,%a0@+         | BS

       move.l #0x03,%a0@+          | ETX

 

       | ------- DEFINE CHAR_AS --------

       move.l #CHAR_AS,%a0        | pointer to message

       move.l #0x2A,%a0@+         | *

       move.l #0x03,%a0@+          | ETX

 

       | ------- DEFINE CHAR_SP --------

       move.l #CHAR_SP,%a0        | pointer to message

       move.l #0x20,%a0@+         | SP

       move.l #0x03,%a0@+          | ETX

 

       | ------- DEFINE USER_ARMED --------

       move.l #USER_ARMED,%a0            | pointer to message

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0x28,%a0@+         | (

       move.l #0x4D,%a0@+         | M

       move.l #0x41,%a0@+         | A

       move.l #0x53,%a0@+         | S

       move.l #0x54,%a0@+         | T

       move.l #0x45,%a0@+         | E

       move.l #0x52,%a0@+         | R

       move.l #0x20,%a0@+         | SPACE

       move.l #0x41,%a0@+         | A

       move.l #0x54,%a0@+         | T

       move.l #0x54,%a0@+         | T

       move.l #0x45,%a0@+         | E

       move.l #0x4D,%a0@+         | M

       move.l #0x50,%a0@+         | P

       move.l #0x54,%a0@+         | T

       move.l #0x53,%a0@+         | S

       move.l #0x20,%a0@+         | SPACE

       move.l #0x54,%a0@+         | T

       move.l #0x4F,%a0@+         | O

       move.l #0x20,%a0@+         | SPACE

       move.l #0x41,%a0@+         | A

       move.l #0x52,%a0@+         | R

       move.l #0x4D,%a0@+         | M

       move.l #0x20,%a0@+         | SPACE

       move.l #0x53,%a0@+         | S

       move.l #0x59,%a0@+         | Y

       move.l #0x53,%a0@+         | S

       move.l #0x54,%a0@+         | T

       move.l #0x45,%a0@+         | E

       move.l #0x4D,%a0@+         | M

       move.l #0x29,%a0@+         | )

       move.l #0x03,%a0@+         | ETX

 

       | ------- DEFINE USER_DISARMED --------

       move.l #USER_DISARMED,%a0  | pointer to message

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0x28,%a0@+         | (

       move.l #0x4D,%a0@+         | M

       move.l #0x41,%a0@+         | A

       move.l #0x53,%a0@+         | S

       move.l #0x54,%a0@+         | T

       move.l #0x45,%a0@+         | E

       move.l #0x52,%a0@+         | R

       move.l #0x20,%a0@+         | SPACE

       move.l #0x48,%a0@+         | H

       move.l #0x41,%a0@+         | A

       move.l #0x53,%a0@+         | S

       move.l #0x20,%a0@+         | SPACE

       move.l #0x44,%a0@+         | D

       move.l #0x49,%a0@+         | I

       move.l #0x53,%a0@+         | S

       move.l #0x41,%a0@+         | A

       move.l #0x52,%a0@+         | R

       move.l #0x4D,%a0@+         | M

       move.l #0x45,%a0@+         | E

       move.l #0x44,%a0@+         | D

       move.l #0x20,%a0@+         | SPACE

       move.l #0x53,%a0@+         | S

       move.l #0x59,%a0@+         | Y

       move.l #0x53,%a0@+         | S

       move.l #0x54,%a0@+         | T

       move.l #0x45,%a0@+         | E

       move.l #0x4D,%a0@+         | M

       move.l #0x29,%a0@+         | )

       move.l #0x03,%a0@+         | ETX

 

       | ------- DEFINE USER_NONE --------

       move.l #USER_NONE,%a0      | pointer to message

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                 | CARRIAGE RETURN

       move.l #0x28,%a0@+         | (

       move.l #0x4E,%a0@+         | N

       move.l #0x4F,%a0@+         | O

       move.l #0x4E,%a0@+         | N

       move.l #0x45,%a0@+         | E

       move.l #0x29,%a0@+         | )

       move.l #0x03,%a0@+         | ETX

 

       | ------- DEFINE F_DOOR_ERR --------

       move.l #F_DOOR_ERR,%a0            | pointer to message

       move.l #0x0A,%a0@+         | NEWLINE

       move.l #0x0D,%a0@+          | CARRIAGE RETURN

       move.l #0x46,%a0@+         | F

       move.l #0x52,%a0@+         | R

       move.l #0x4F,%a0@+         | O

       move.l #0x4E,%a0@+         | N

       move.l #0x54,%a0@+         | T

       move.l #0x20,%a0@+         | SPACE

       move.l #0x44,%a0@+         | D

       move.l #0x4F,%a0@+         | O

       move.l #0x4F,%a0@+         | O

       move.l #0x52,%a0@+         | R

       move.l #0x20,%a0@+         | SPACE

       move.l #0x49,%a0@+         | I

       move.l #0x53,%a0@+         | S

       move.l #0x20,%a0@+         | SPACE

       move.l #0x4F,%a0@+         | O

       move.l #0x50,%a0@+         | P

       move.l #0x45,%a0@+         | E

       move.l #0x4E,%a0@+         | N

       move.l #0x20,%a0@+         | SPACE

       move.l #0x21,%a0@+         | !

       move.l #0x21,%a0@+         | !

       move.l #0x21,%a0@+         | !

       move.l #0x03,%a0@+         | ETX

 

       | ------- DEFINE B_DOOR_ERR --------

       move.l #B_DOOR_ERR,%a0            | pointer to message

       move.l #0x0A,%a0@+         | NEWLINE

       move.l #0x0D,%a0@+          | CARRIAGE RETURN

       move.l #0x42,%a0@+          | B

       move.l #0x41,%a0@+         | A

       move.l #0x43,%a0@+         | C

       move.l #0x4B,%a0@+         | K

       move.l #0x20,%a0@+         | SPACE

       move.l #0x44,%a0@+         | D

       move.l #0x4F,%a0@+         | O

       move.l #0x4F,%a0@+         | O

       move.l #0x52,%a0@+         | R

       move.l #0x20,%a0@+         | SPACE

       move.l #0x49,%a0@+         | I

       move.l #0x53,%a0@+         | S

       move.l #0x20,%a0@+         | SPACE

       move.l #0x4F,%a0@+         | O

       move.l #0x50,%a0@+         | P

       move.l #0x45,%a0@+         | E

       move.l #0x4E,%a0@+         | N

       move.l #0x20,%a0@+         | SPACE

       move.l #0x21,%a0@+         | !

       move.l #0x21,%a0@+         | !

       move.l #0x21,%a0@+         | !

       move.l #0x03,%a0@+         | ETX

 

       | ------- DEFINE WIN_ERR --------

       move.l #WIN_ERR,%a0        | pointer to message

       move.l #0xA,%a0@+          | NEWLINE

       move.l #0xD,%a0@+           | CARRIAGE RETURN

       move.l #0x57,%a0@+         | W

       move.l #0x49,%a0@+         | I

       move.l #0x4E,%a0@+         | N

       move.l #0x44,%a0@+         | D

       move.l #0x4F,%a0@+         | O

       move.l #0x57,%a0@+         | W

       move.l #0x20,%a0@+         | SPACE

       move.l #0x49,%a0@+         | I

       move.l #0x53,%a0@+         | S

       move.l #0x20,%a0@+         | SPACE

       move.l #0x4F,%a0@+         | O

       move.l #0x50,%a0@+         | P

       move.l #0x45,%a0@+         | E

       move.l #0x4E,%a0@+         | N

       move.l #0x20,%a0@+         | SPACE

       move.l #0x21,%a0@+         | !

       move.l #0x21,%a0@+         | !

       move.l #0x21,%a0@+         | !

       move.l #0x03,%a0@+         | ETX

 

       | ------- DEFINE G_DOOR_ERR --------

       move.l #G_DOOR_ERR,%a0            | pointer to message

       move.l #0xA,%a0@+          | NEWLINE

       move.l #0xD,%a0@+           | CARRIAGE RETURN

       move.l #0x47,%a0@+         | G

       move.l #0x41,%a0@+         | A

       move.l #0x52,%a0@+         | R

       move.l #0x41,%a0@+         | A

       move.l #0x47,%a0@+         | G

       move.l #0x45,%a0@+         | E

       move.l #0x20,%a0@+         | SPACE

       move.l #0x49,%a0@+         | I

       move.l #0x53,%a0@+         | S

       move.l #0x20,%a0@+         | SPACE

       move.l #0x4F,%a0@+         | O

       move.l #0x50,%a0@+         | P

       move.l #0x45,%a0@+         | E

       move.l #0x4E,%a0@+         | N

       move.l #0x20,%a0@+         | SPACE

       move.l #0x21,%a0@+         | !

       move.l #0x21,%a0@+         | !

       move.l #0x21,%a0@+         | !

       move.l #0x03,%a0@+         | ETX

      

       | ------- DEFINE CAN_NOT_ARM --------

       move.l #CAN_NOT_ARM,%a0           | pointer to message

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                  | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                  | CARRIAGE RETURN

       move.l #0x53,%a0@+         | S

       move.l #0x59,%a0@+         | Y

       move.l #0x53,%a0@+         | S

       move.l #0x54,%a0@+         | T

       move.l #0x45,%a0@+         | E

       move.l #0x4D,%a0@+         | M

       move.l #0x20,%a0@+         | SPACE

       move.l #0x43,%a0@+         | C

       move.l #0x41,%a0@+         | A

       move.l #0x4E,%a0@+         | N

       move.l #0x20,%a0@+         | SPACE

       move.l #0x4E,%a0@+         | N

       move.l #0x4F,%a0@+         | O

       move.l #0x54,%a0@+         | T

       move.l #0x20,%a0@+         | SPACE

       move.l #0x42,%a0@+         | B

       move.l #0x45,%a0@+         | E

       move.l #0x20,%a0@+         | SPACE

       move.l #0x41,%a0@+         | A

       move.l #0x52,%a0@+         | R

       move.l #0x4D,%a0@+         | M

       move.l #0x45,%a0@+         | E

       move.l #0x44,%a0@+         | D

       move.l #0x20,%a0@+         | SPACE

       move.l #0x21,%a0@+         | !

       move.l #0x21,%a0@+         | !

       move.l #0x21,%a0@+         | !

       move.l #0x03,%a0@+         | ETX

 

       | ------- DEFINE INVALID_PASSWORD --------

       move.l #INVALID_PASSWORD,%a0             | pointer to message

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                  | CARRIAGE RETURN

       move.l #0xA,%a0@+                 | NEWLINE

       move.l #0xD,%a0@+                  | CARRIAGE RETURN

       move.l #0x49,%a0@+         | I

       move.l #0x4E,%a0@+         | N

       move.l #0x56,%a0@+         | V

       move.l #0x41,%a0@+         | A

       move.l #0x4C,%a0@+         | L

       move.l #0x49,%a0@+         | I

       move.l #0x44,%a0@+         | D

       move.l #0x20,%a0@+         | SPACE

       move.l #0x50,%a0@+         | P

       move.l #0x41,%a0@+         | A

       move.l #0x53,%a0@+         | S

       move.l #0x53,%a0@+         | S

       move.l #0x57,%a0@+         | W

       move.l #0x4F,%a0@+         | O

       move.l #0x52,%a0@+         | R

       move.l #0x44,%a0@+         | D

       move.l #0x21,%a0@+         | !

       move.l #0x21,%a0@+         | !

       move.l #0x21,%a0@+         | !

       move.l #0x03,%a0@+         | ETX

 

       | **** Initialize ALARM Status flag to disabled

       move.l #ALARM_STATUS,%a0   | initialize alarm to disabled

       move.l #0x01,%a0@                

 

       | **** Initialize ALARM Sounding flag to off

       move.l #INTR_STATUS,%a0           | initialize alarm sounding to disabled

       move.l #0x00,%a0@

 

       | **** Invalid password was not just entered (1 time initialization)

       move.l #INVALID_PASS_STATUS,%a0  

       move.l #0x00,%a0@

 

       rts

|-------------------------------------------------------------------------------

 

 

 

|-------------------------------------------------------------------------------

WELCOME:

 

       | **** Set flag to indicate that system is "locked" in the case that the ALARM is triggered (INT_1)

       move.l        #ALARM_LOCK,%A0           

       move.l        #0x01,%A0@

 

       | **** Display OJ SECURITY initialization message to DEBUG

       move.l #MAIN_HEADER_MESSAGE,%a6   | pointer to message

       bsr           DISPLAY                    | output to DBUG

 

       | **** Display invalid password message to DEBUG if appropriate

       move.l #INVALID_PASS_STATUS,%a0   | pointer to message

       move.l %a0@,%d0

       cmp.l         #0x01,%d0

       bne           SKIP_INVALID_MESSAGE

 

       move.l #INVALID_PASSWORD,%a6      | pointer to message

       bsr           DISPLAY                    | output to DBUG

       move.l #INVALID_PASS_STATUS,%a0   | pointer to message

       move.l #0x00,%a0@

 

       SKIP_INVALID_MESSAGE:

 

       | **** Display ALARM Sounding message to DEBUG if appropriate

       move.l #INTR_STATUS,%a0

       move.l %a0@,%d0

       and.l         #0x01,%d0     | (set Z if INTR_STATUS = 0)

       beq           SKIP_SOUNDING_ALARM1

      

       move.l        #SOUNDING_ALARM,%a6 

       bsr           DISPLAY

 

       SKIP_SOUNDING_ALARM1:

 

 

       | **** Display password entry prompt ro DEBUG

       move.l #GET_PASS_MESSAGE,%a6      | pointer to message

       bsr           DISPLAY                    | output to DBUG

 

       | **** Get User's Password

       move.l        #USER_PASS,%a5             | pointer to user pword

       bsr           GET_PASSWORD         | get user input

 

       | **** Compare User's Password with correct password

       move.l #USER_PASS,%a0             | pointer to user pword

       move.l #SYSTEM_PASS,%a1           | pointer to system pword

       TEST_PASS:

              move.l %a0@+,%d4            | get letter from user pass

              move.l %a1@+,%d5            | get letter from system pass

              cmp.l         #0x03,%d5            | check if the sys pword is @ ETX

              beq           WELCOME_DONE  | if we reach ETX, pword must be good

              cmp.l %d4,%d5              | compare user pword to sys pword

              beq           TEST_PASS            | go back and test next char

 

      

       | **** Set FLAG to indicate that password entry was incorrect

       move.l #INVALID_PASS_STATUS,%a0   | pointer to message

       move.l #0x01,%a0@

      

       | **** Repeat password entry prompt

       bra           WELCOME                    | go back and try again

 

       | **** Entered password was correct

       WELCOME_DONE:

      

 rts  

|-------------------------------------------------------------------------------

 

 

|-------------------------------------------------------------------------------

MENU:                            

       | 1) Set ALARM_LOCK = 0 (allow user access to MENU in case of ALARM trigger)

       move.l        #ALARM_LOCK,%A0           

       move.l        #0x00,%A0@

 

       move.l #MENU_MESSAGE,%a6    | pointer to message

       bsr           DISPLAY                    | output to DBUG

 

       move.l #USER_SELECTION,%a5  | pointer to user input

       bra           GET_SELECTION        | get user input

       GET_SELECTION_RET:

      

       bra    MENU  

 

|-------------------------------------------------------------------------------

 

 

 

|-------------------------------------------------------------------------------

DISPLAY:                   | This sub routine assumes that A6 contains

                           | the address of a string to be displayed

                           | the string must be terminated by ASCII #3

                           | END OF TEXT

 

       NEXT_CHAR:

       move.l        %a6@+,%d1     | load letter from mem

       cmp.l #0x3,%d1      | loop back until

       beq           DISPLAY_DONE| ETX is found

       move.l        #0x0013,%d0 | display to user

       trap          #15           | using DBUG

       bra           NEXT_CHAR

 

 

       DISPLAY_DONE: rts   

|-------------------------------------------------------------------------------

 

 

 

|-------------------------------------------------------------------------------

GET_PASSWORD:                            | Gets input from user using debug module

                                         | until carriage return is pressed.

                                         | Assumes that A5 contains the addr of where

                                         | the data is to be stored. It will also

                                         | append ETX to the end of the string

 

       move.l #0x00,%d3                  | current char count

       GI_TOP:

 

       move.l #0x0010,%d0   | Wait for input char

       trap #15

       move.l %d1,%d4             | copy input char into d4

       cmp.l #0x08,%d1            | compare input char w/ BS

       bne    GI_SKIP              | if input char was not BS than jmp GI_SKIP1

      

              | ------- FOLLOWING CODE IS EXECUTED IF INPUT CHAR WAS BS ------

              cmp.l  #0x00,%d3     | compare char count w/ min char count "1"

              beq GI_TOP           | jmp to GI_TOP if no input chars to delete

      

              move.l #CHAR_BS,%a6

              bsr DISPLAY

              move.l #CHAR_SP,%a6

              bsr DISPLAY

              move.l #CHAR_BS,%a6

              bsr DISPLAY

              sub.l #0x01,%d3      | decrement char count

              sub.l #0x04,%a5      | decrement mem pointer of user's entered string             

              bra GI_TOP

      

       GI_SKIP:

              | ------- FOLLOWING CODE IS EXECUTED IF INPUT CHAR WAS NOT BS ------

              cmp.l #0x08,%d3      | compare char count w/ max char count "8"

              beq GI_TOP

 

              move.l %d4,%a5@+           | store input char into mem

              add.l #0x01,%d3            | increment char count

              cmp.l #0x0d,%d1            | cmp input char with CR

              beq DONE_ENTRY             | jmp to DONE_ENTRY if CR was entered

              move.l #CHAR_AS,%a6  | display * in place of entered char

              bsr DISPLAY

              bra GI_TOP   

      

       DONE_ENTRY:

       move.l #0x03,%a5@+         | add ETX to end of string

       rts   

 

|-------------------------------------------------------------------------------

 

 

|-------------------------------------------------------------------------------

GET_SELECTION:                    

      

       move.l        #0x0010,%d0   | Wait for input char

       trap #15

      

       cmp.l  #0x31,%d1     | compare input char "1"

       beq    ARM_SYSTEM

 

       cmp.l  #0x32,%d1     | compare input char "2"

       beq    DISARM_SYSTEM

      

       cmp.l  #0x33,%d1     | compare input char "3"

       beq    LOCK_OUT

 

       cmp.l  #0x35,%d1     | compare input char "5"

       beq    GET_OUT

 

       cmp.l  #0x34,%d1     | compare input char "4"

       bne    SKIP_UPDATE

 

       move.l #CFI,%a0     

       move.l        #0x03,%a0@

       bra           GET_STATUS

 

GET_OUT:

       trap   #15

 

SKIP_UPDATE:

 

       bra    GET_SELECTION

|-------------------------------------------------------------------------------

 

 

 

|-------------------------------------------------------------------------------

ARM_SYSTEM:  

 

 

       | 1) **** Set ALARM_STATUS = 0 (Pending)

       move.l #ALARM_STATUS,%a0

       move.l #0x00,%a0@

 

       | 2) **** Set Calling Function Indicator CFI = 0x01

       move.l #CFI,%a0     

       move.l        #0x01,%a0@

 

       | 4) **** Call GET_STATUS

       bra    GET_STATUS

       GET_STATUS_RET1:

 

       | 1) **** Get INTR_STATUS  

       move.l #INTR_STATUS,%a0| 0=ALARM ALREADY SOUNDING

       move.l        %a0@,%d0

 

       cmp.l         #0x01,%d0            | set Z if ALARM IS ALREADY SOUNDING

       beq           SKIP_ARM_SYSTEM2

 

       | 1) **** Get SECURE_STATUS  

       move.l #SECURE_STATUS,%a0| 1=secure, 0=not secure

       move.l        %a0@,%d0

 

       cmp.l         #0x00,%d0            | set Z if SECURE_STATUS = 1 (sys is secure)

       beq           SKIP_ARM_SYSTEM1

 

 

       move.w #0xB632,%d0  | 0.201 sec / 65535 = 3.07uS per increment of TMR1

                                          | Set to 0x7F3D to set delay to ~ 0.2sec period based on

                                         | prescalar and CE1-CE0 settings of TMR1

 

       move.w %d0,TRR2             | Initialize Timer Reference Register to reg. d6

 

       move.w #0x893B,%d0  | Set timer (prescalar field=0x0A), OM=1, ORI=1, FRR=1,

                                          | and CLK1-CLK0 = 01 for 0.201 sec. delay until

                                          | count = 0xFFFF

 

       move.w %d0,TMR2     | Start Timer, toggle TOUT when count = value in d6

 

 

 

       | 3) **** Set ALARM_STATUS = 2 (Alarm Set)

       move.l #ALARM_STATUS,%a0

       move.l #0x02,%a0@

 

 

       move.l #0xFFFFFFFC,%d0      | Set Interrupt Mask register to allow

       move.l %d0,IMR              | interupts on IRQ1

       bra           ARM_SYS_DONE 

 

SKIP_ARM_SYSTEM1:

 

       move.l        #CAN_NOT_ARM,%a6

       bsr           DISPLAY

 

       move.l #ALARM_STATUS,%a0

       move.l #0x01,%a0@

       bra           ARM_SYS_DONE

 

SKIP_ARM_SYSTEM2:

 

       move.l #ALARM_STATUS,%a0

       move.l #0x02,%a0@

      

ARM_SYS_DONE:

 

bra    GET_SELECTION_RET

|-------------------------------------------------------------------------------

 

      

 

| Alarm excpetion used to be here

 

 

 

|-------------------------------------------------------------------------------

DISARM_SYSTEM:

 

       bsr    DISABLE_INTERRUPT

 

       | **** Set Flag so that GET_STATUS returns to GET_STATUS_RET2 upon completion

       move.l #CFI,%a0     

       move.l        #0x02,%a0@

 

       | 3) **** Set ALARM_STATUS = 1

       move.l #ALARM_STATUS,%a0

       move.l #0x01,%a0@

 

       | 4) **** Set INTR_STATUS = 0

       move.l #INTR_STATUS,%a1

       move.l #0x00,%a1@

 

       | 5) **** Call GET_STATUS

       bra GET_STATUS

       GET_STATUS_RET2:

 

       | 6) **** Shut off TOUT0 & TOUT1

       move.w #0x0000,%d6         | CLK1-CLK0 = 00

       move.w %d6,TMR1             |

 

       move.w #0x0000,%d6         | CLK1-CLK0 = 00

       move.w %d6,TMR2             |

 

bra    GET_SELECTION_RET

|-------------------------------------------------------------------------------

 

 

 

|-------------------------------------------------------------------------------

GET_STATUS:

      

       | 1) **** Display  System Main Header to Debug

       move.l #MAIN_HEADER_MESSAGE,%a6

       bsr           DISPLAY      

 

       | 2) **** Display Action Header to Debug 

       move.l #ACTION_HEADER,%a6

       bsr           DISPLAY      

 

       | 3) **** Get CFI (Display User Armed/Disarmed/no action messages accordingly)

       move.l #CFI,%a1

       move.l %a1@,%d0

      

       sub.l         #0x01,%d0  | (Z is set if CFI = 1 => called from SYS ARMED Function)

       bne           SKIP_ACTION1

      

       | **** Message to DEBUG indicating that user has "Armed system"

       move.l        #USER_ARMED,%a6

       bsr           DISPLAY

       bra           SKIP_ACTION3

 

SKIP_ACTION1:

 

       sub.l         #0x01,%d0  | (Z is set if CFI = 2 => called from SYS DISARMED Function)

       bne           SKIP_ACTION2

 

       | **** Message to DEBUG indicating that user has "Disarmed system"

       move.l #USER_DISARMED,%a6

       bsr           DISPLAY

       bra           SKIP_ACTION3

 

SKIP_ACTION2:

 

       | **** Message to DEBUG indicating that user has made no action

       move.l #USER_NONE,%a6

       bsr           DISPLAY

 

SKIP_ACTION3:

 

      

       | 4) Display Sounding Alarm Message to Debug Module if INTR_STATUS = 1

       move.l #INTR_STATUS,%a0

       move.l %a0@,%d0

       and.l         #0x01,%d0     | (set Z if INTR_STATUS = 0)

       beq           SKIP_SOUNDING_ALARM2

      

       move.l        #SOUNDING_ALARM,%a6 

       bsr           DISPLAY

 

SKIP_SOUNDING_ALARM2:

 

       | 5) **** Display System Status Header to Debug 

       move.l #STATUS_HEADER,%a6

       bsr           DISPLAY      

 

       | 6) **** Get ALARM_STATUS  

       move.l #ALARM_STATUS,%a0    | get current ARMED/DISARMED status

       move.l        %a0@,%d1

 

       | 7) **** Display either SYS_DISARMED or SYS_ARMED message to Debug Module

       cmp.l  #0x02,%d1

 

       bne    CHECK_SYS_NOT_ARM

              move.l #SYS_ARMED,%a6            

              bra    DONE_DISP_MESSAGE         

 

       CHECK_SYS_NOT_ARM:

       cmp.l  #0x01,%d1

       bne    DISP_PENDING

              move.l #SYS_DISARMED,%a6         

              bra           DONE_DISP_MESSAGE         

 

       DISP_PENDING:

              move.l #SYS_PENDING,%a6          

 

       DONE_DISP_MESSAGE:

       bsr    DISPLAY      

 

 

       | 8) **** Read Parallel Port (ALARM SENSORS)

       move.w #0xFF00,%a1   | Use PP ports for parallel I/O

       move.w %a1,PAR

       move.w #0x000F,%a1   | PP[0:3] output - PP[4:7] input

       move.w %a1,PADDR

       move.w PADAT,%d0     | read data in from parallel I/O

       lsr.l  #0x04,%d0     | move read data to bits 0-3     

       and.l  #0x0F,%d0     | mask only desired bits (0-3)

       mov.l  %d0,%d4

 

       | 10) **** Convert read input from Parallel Port PP[4]-PP[7] to necessary output for Parallel Port PP[0]-PP[3]

 

       move.w #0xFF00,%a1   | Use PP ports for parallel I/O

       move.w %a1,PAR

       move.w #0x000F,%a1   | PP[0:3]& PP[8]as output - PP[4:7] input

       move.w %a1,PADDR

       move.l #0x0F,%d5

       sub.l         %d4,%d5

       move.w %d5,PADAT     | enable appropriate alarm indicators   

      

       cmp.l  #0x0F,%d4    

       bne    NOT_SECURE

 

       |  **** STEPS 8 WILL EXECUTE IF SYSTEM IS SECURE

      

       | 9) **** Set SECURE_STATUS = 1  

       move.l #SECURE_STATUS,%a0  | get current ARMED/DISARMED status

       move.l        #0x01,%a0@

 

       | 10) Display System Secure Message to Debug Module

       move.l        #SYS_SECURE,%a6     

       bsr           DISPLAY

 

       bra    FIN_GET_STATUS

 

NOT_SECURE: 

      

       | 9) **** Set SECURE_STATUS = 0  

       move.l #SECURE_STATUS,%a0  | get current ARMED/DISARMED status

       move.l        #0x00,%a0@

 

       move.l #INTR_STATUS,%a0

       move.l %a0@,%d0

 

       | 10) Display System Not Secure Message to Debug Module

       move.l        #SYS_NOT_SECURE,%a6 

       bsr           DISPLAY

 

       move.l        #WARNING_HEADER,%a6 

       bsr           DISPLAY

 

       | 11) **** Display Triggered Alarm(s) to Debug Module

 

       move.l #F_DOOR_ERR,%a6     

       move.l %d4,%d5

       and.l  #0x01,%d5

       bne    SKIP_FD

       bsr    DISPLAY

 

SKIP_FD:

      

       move.l #WIN_ERR,%a6 

       move.l %d4,%d5

       and.l  #0x02,%d5

       bne    SKIP_WIN

       bsr    DISPLAY

 

SKIP_WIN:

 

       move.l #G_DOOR_ERR,%a6     

       move.l %d4,%d5

       and.l  #0x04,%d5

       bne    SKIP_GAR

       bsr    DISPLAY

 

SKIP_GAR:

 

       move.l #B_DOOR_ERR,%a6     

       move.l %d4,%d5

       and.l  #0x08,%d5

       bne    SKIP_BD

       bsr    DISPLAY

 

SKIP_BD:

 

 

FIN_GET_STATUS:

 

       | **** Return to specified Calling Function per CFI

       move.l #CFI,%a0      | get current CFI

       move.l        %a0@,%d0

 

       cmp.l  #0x00,%d0            | If CFI = 0 then return to MAIN function

       beq    GET_STATUS_RET0

 

       cmp.l  #0x01,%d0            | If CFI = 1 then return to ARM_SYSTEM function

       beq    GET_STATUS_RET1

 

       cmp.l  #0x02,%d0            | If CFI = 2 then return to DISARM_SYSTEM function

       beq    GET_STATUS_RET2

 

       cmp.l  #0x03,%d0            | If CFI = 3 then return to USER_SELECTION function

       beq    GET_SELECTION_RET

 

       move.l #ERROR_RETURN,%a6   

       bsr           DISPLAY

|-------------------------------------------------------------------------------

 

 

IEEE Constitution

IEEE Bylaws

IEEE Policies

IEEE Policy: IEEE Code of Ethics

IEEE Ethics Committee

IEEE Member Conduct Committee

IEEE Code of Ethics

We, the members of the IEEE, in recognition of the importance of our technologies in affecting the quality of life throughout the world, and in accepting a personal obligation to our profession, its members and the communities we serve, do hereby commit ourselves to the highest ethical and professional conduct and agree:

1. to accept responsibility in making engineering decisions consistent with the safety, health and welfare of the public, and to disclose promptly factors that might endanger the public or the environment;

2. to avoid real or perceived conflicts of interest whenever possible, and to disclose them to affected parties when they do exist;

3. to be honest and realistic in stating claims or estimates based on available data;

4. to reject bribery in all its forms;

5. to improve the understanding of technology, its appropriate application, and potential consequences;

6. to maintain and improve our technical competence and to undertake technological tasks for others only if qualified by training or experience, or after full disclosure of pertinent limitations;

7. to seek, accept, and offer honest criticism of technical work, to acknowledge and correct errors, and to credit properly the contributions of others;

8. to treat fairly all persons regardless of such factors as race, religion, gender, disability, age, or national origin;

9. to avoid injuring others, their property, reputation, or employment by false or malicious action;

10. to assist colleagues and co-workers in their professional development and to support them in following this code of ethics.

Approved by the IEEE Board of Directors
August 1990
If you would like to contact the IEEE Webmaster, email to webmaster@ieee.org
© Copyright 2000, The Institute of Electrical and Electronics Engineers, Inc.
Small IEEE Logo