
Writing software for embedded systems 305
ERROR MOVE.L #14,D0 Load abort directive no.
TRAP #1 Abort task
SECTION 15
PBL EQU *
DC.L ‘ ‘ Create space for
name
DC.L 0 Semaphore key
DC.B 0 Initial count
DC.B 1 Semaphore type
END
Assembler listing for the atsem call
The name is passed via a pointer on the stack. The
pointer is fetched and then used to point to the packed array
that contains the semaphore name. Normally, each byte is
taken in turn by using the pointer and moving it on to the next
location until it points to a null character, i.e. hexadecimal 00.
Instead of writing a loop to perform this task, a short cut was
taken by assuming that the name is always ...