TweetFollow Us on Twitter

Real-time Driver
Volume Number:5
Issue Number:10
Column Tag:Assembly Lab

Related Info: Serial Drivers File Mgr (PBxxx) Event Manager
Time Manager

Real-Time Driver

By Jeff E. Mandel, MD MS, New Orleans, LA

A Real-Time Device Driver in MPW Asm

When working in the laboratory or in engineering, it is often necessary to use the Mac to control serial devices. Such devices are generally configured to respond to simple commands, and provide a simple response. An example would be the American Edwards AccuPro™ Volumetric Infusion Pump, which is a device for delivering intravenous infusions of drugs. This device contains an RS-232 interface, supports full duplex 2400 baud communication, and has a simple command language for setting and interrogating the device’s infusion rate, the limits for infused volume and infusion time, the volume already infused, and the status of the pump.

Programming the pump involves four steps; the command string is built in memory, a pointer to this string is placed in a parameter block for a _PBWrite, a _PBRead is used to obtain the pump’s response, and the returned string is decoded. While this may seem simple, one must remember that the serial communication takes a significant amount of time, and could take forever if the pump or the serial line fails. Additionally, the serial communications controller is capable of functioning with minimal CPU supervision, which transpires at interrupt level, and thus, it would be nice to use asynchronous device driver calls, to free the Mac to work on keeping the user interface going, while the serial controller handles the IO in the background.

The program I will describe for performing these tasks is a driver. Most Mac programmers are familiar with drivers from writing DAs, however, a device driver is somewhat of a different animal, particularly when one wishes it to be “real-time” without intervention from the foreground program. The device driver has several purposes:

1) To insulate the application from the peculiarities of the device, so that the device can be changed without requiring a change in the application. Additionally, the device could be simulated by a driver, so that debugging of application code can be done without having to have the physical device.

2) To insulate the application programmer from having to understand how serial communications, real-time IO, etc. work.

3) To permit all of the resources associated with the IO task to be grouped together, so that they can be installed and uninstalled easily.

In writing such a driver, it is important to recall several important factors:

1) Drivers cannot utilize application globals for their own storage.

2) Drivers are only notified of events that pertain to them when they own the frontmost window, and then only receive mouse, keyboard, update, and activate events.

3) Activities which occur at interrupt level (i.e. ioCompletion routines, Vertical retrace tasks, Time manager tasks, etc.) are extremely limited in what they can do, due to the uncertainty of the heap.

In order to write such a driver, several decisions were made:

1) The driver utilizes app1Evts to signal that it needed to regain control. Thus, the serial reads and writes utilize an ioCompletion routine which simply posts an app1Evt.

2) Serial driver calls have a time limit. When the serial call is queued (asynchronously), a Time manager task is primed. If the serial IO completed first, it stops the Time manager task from completing by setting the tmCount field to zero, and if the read or write did not complete within the specified time, the time manager task issues a _KillIO call on the relevant serial driver. This results in the ioCompletion routine being called, which notifies the driver. The time manager task is contained in a resource of type ‘TMMR’, which is loaded into the heap, locked, dereferenced, and the pointer placed in the tmAddr field of the time manager queue entry. The resource also contains a longword of private storage, which holds a pointer to a private parameter block (used for the KillIO call).

3) App1evts are posted with the parameter block pointer of the completed serial call as the message. The pump driver places the parameter block pointer of the pending pump driver in the ioMisc field of the serial call parameter block so the downstream routines can keep track of it. Alternatively, the downstream routines could get this pointer from the dCtlQHead field of the DCE.

4) App1Evts are passed to the driver by a GetNextEvent filter. This routine is called at the end of the _GetNextEvent trap, with A1 pointing to the EventRecord, and boolean result in both D0 and at 4(A7) (See Macintosh Technical Note #85). If the what field of the EventRecord equals app1Evt, the routine examines the message, and if it contains a negative word in the ioRefNum field of the parameter block pointed to by the message, it processes the event. If the event is processed, the filter sets the boolean result to False, so the the application knows not to deal with it. In either case, the routine exits by a JMP to the previous contents of the JGNEFilter global. This pointer is stored locally in our GNEFilter proc.

5) The GNEFilter is a separate resource (type = ‘GNEF’), which is loaded in the pump driver Open routine. The resource is patterned after the DRVR resource, in that it contains an offset to the code as its first word, and some local storage is provided between this word and the beginning of the code. The GNEFilter is loaded into the heap during the driver Open routine, using a _GetNamedResource call. This is done so that several drivers can share the GNEFilter, since only the first driver will load the resource into the heap. The GNEFilter keeps track of which resources have opened it by keeping their reference numbers in the local storage. Duplicate entries are avoided. The GNEFilter also keeps a parameter block pointer in its private storage for its private use.

6) When the GNEFilter processes an app1Evt with a negative ioRefNum, it accesses the parameter block pointer in the ioMisc field of the parameter block referenced in the message field of the event, and checks to see that the ioRefNum of this PB is in the list of cooperating drivers in the GNEFilter private storage. If it is, then we place the event pointer in the csParam field of the GNEFilter’s private parameter block, set the csCode to accEvent, and the ioRefNum to reference number of the ioMisc parameter block (this will be the ioRefNum of our driver; the ioRefNum of the parameter block passed in the message field will be one of the serial drivers). We then issue an immediate _Control call.

7) The Control routine supports four csCodes - accEvent, accRun, KillIO, and GoodBye. Goodbye simply JMPs to the Close routine. KillIO issues KillIO calls on the serial drivers and returns. AccRun asynchronously queues a Status call on the driver to inquire the pump status (thus, irrespective of what the application does, it will be notified of the pump status periodically). The accEvent csCode is generated by our GNEFilter, and is used to allow the driver to respond to serial IO completion at event level (that is, when the heap is consistent). The routine examines the low nibble of the ioTrap field of the parameter block pointed to by the event message. If the trap was _Write, the routine sets up the parameter block for single character reads on the serial input channel and queues an asynchronous _Read. If the trap was _Read, the routine examines the character read. If the character is a carriage return (ASCII 13), the accumulated input buffer is sent to be digested, if it is an asterisk (*), it is ignored (the McGaw pump generates these periodically to let us know it is pumping), and if it is any other character, it is appended to the input buffer. In the latter two cases, the routine queues another asynchronous _Read. In the first case, the routine posts an app2Evt with the message the pointer to the original parameter block used to queue the status call, and exits via JIODone.

8) The Status routine uses the three words in the csParam field of the parameter block to figure out what the application wants the driver to send to the pump. The Request field is used to look up a single character in a table (which is loaded from a resource of type ‘PDDF’). This character specifies which of the pump functions is to be interrogated or set, as specified in the Action field. The Info field contains the numeric value to be passed to the pump and/or returned to the application. The pump in general wants decimal integers, but in some cases wants a hex word, and the formatting information is specified in the table. Having constructed the string to be sent to the pump, the routine allocates a parameter block, places the string pointer in the ioBuffer field, the pointer to the driver Status parameter block in the ioMisc field, fills in the ioCompletion address, and queues an asynchronous _Write. Note that if the noQueueBit of the trap is set, the Status routine places the request at the head of the queue. It does this by checking the queue, and if there are zero or one queue entries, issuing the _Status call asynchronously, but if there are two or more queue entries, it slips the request after the current queue head by changing the qLink fields of the qHead PB and the PB in question.

9) The Open routine loads the GNEFilter and time manager task (as detailed above), opens the serial drivers and configures them for the pump, loads the pump request table, allocates the dCtlStorage handle, and sets up the driver globals there.

10) The Close routine removes the time manager task, closes the serial ports, removes the driver’s reference number from the GNEFilter private storage, and restores the previous GNEFilter if it is the last value there. It then deallocates all the pointers and handles it allocated and exits.

The application thus needs only do the following things to utilize the driver:

1) Open the driver

2) Allocate a pointer for the parameter block, setting the three words in the csParam field to pass the desired function, and queue the _Control call. The call should be made asynchronously. Immediate calls can be used to “jump the line”, that is, make sure the call is the next one to be taken from the queue.

3) The event loop should handle app2Evts by first processing the information in the ioResult and csParam fields, then disposing of the pointer.

4) If the pump driver is to function irrespective of what the application is doing, the application must frequently call _GetNextEvent with the event mask app1Evt mask set. In order to guarantee this you will need a FilterProc for ModalDialogs and Alerts which calls _GetNextEvent with the event mask set to app1Mask when the routine receives a null event, and a DragHook and MenuHook which calls _GetNextEvent with the event mask set to app1Mask. Additionally, any compute-intensive routines might include a call to the DragHook routine. The alternative is to keep track of driver calls and repost the ones that time out.

5) Call _SystemTask if you want periodic events.

6) Prior to closing the driver, you should do one of two things:

a) Issue a _KillIO call on the driver to flush the queue.

b) Wait until the queue empties itself. This can be done by waiting until the dCtlQHead field of the driver’s DCE is zero.

This is necessary because the _Close trap sits and waits for the driver to complete the pending request. The driver cannot complete the request, however, without the event loop, so we hang forever.

7) While the driver is set up to handle goodbye kisses to close the structures, it is much safer to close the driver explicitly, due to the serious adverse consequences of exiting without restoring the JGNEFilter pointer. The truly paranoid can load the GNEFilter into the system heap. The same caveat applies to the time manager queue entry (the pointer, not the routine) - if this is deallocated but not removed from the time manager queue, bad stuff will happen. I have not extensively worked on making the driver “safe as milk”, in general, during debugging, if it crashed, I rebooted. But then, I just got my Mac II.

8) The program is written in MPW assembler, and uses the structured programming macros. I have hacked up some of these to make them work properly for writing drivers. The only significant change is in DRVRExit, which checks the noQueueBit of the argument, and if it is clear, exits via the JIODone vector, otherwise, RTS.

The code for the driver, the GNEFilter, and the timer task, as well as the rez files and the shell commands to build the driver are presented below. Note that I actually build the driver as a desk accessory. This is done so that I can install it with the DA Mover. This is easier during development, but once the driver is debugged, it can be changed with the resource editor.

The sources have been hacked for the sake of brevity. All INCLUDES were deleted, many equates omitted, and code specific to the pump deleted as well. If you really want to assemble this, get the source disk.

 TITLE  ‘Pump driver’
ParamBlockSize equ 108
ActionOffsetequ  csParam
RequestOffset  equ csParam+2
InfoOffsetequ  csParam+4

EnabledFlagsequ  (1<<dStatEnable) \
+ (1<<dCtlEnable) + (1<<dNeedTime)

EventMask equ  1<<app1Evt

DStore  Record 0
WriteUnit DS.W   1
TimeCount DS.L   1
KillBlock DS.L   1
IncomingLength DS.B1
IncomingString DS.B9
 Align  2
TableOffset equ  *
Table   DS.W5

IOStringRecord 0
OutgoingString DS.B8
ReadBufferDS.B   1
 Align  2
StringAllocation equ *

 DRVRBeginSave=A2-A4/D1-D2,\ with=(DStore,IOString,GNEGlobals);

 DC.B   EnabledFlags
 DC.B   0
 DC.W 7*60;  7 seconds
 DC.W EventMask
 DC.W 0 ; No menu

 DC.W DRVRControl
 DC.W DRVRStatus

 DC.B ‘PumpDriver’


*  Load the pump request table from the
*  resource fork

 Call _GetNamedResource:L (#’PDDF’:L,  #’Table’:A ),A4:L
 EXG  A0,A4
 If#  D0LT.L#0 Then.S
 MOVE.W #openErr,ioResult(A4)
 EXG  A0,A4
 MOVE.L A0,-(SP)

*  Get a new handle to put the Driver
*  globals and the pump request table into

 MOVE.L A1,-(SP)
 ADD.L  #TableOffset,D0
 _NewHandle ,clear
 MOVE.L A0,dCtlStorage(A2)
 MOVE.L (A0),A1
 ADD.L  #TableOffset,A1
 MOVE.L (ResHandle),A0
 Call _ReleaseResource ( ResHandle:L)
 MOVE.L (SP)+,A1

*  Open the serial drivers and set them up
*  for the pump  (I have ommitted the .AIN code
*  since it is identical
 MOVE.L #ParamBlockSize,D0
 _NewPtr ,clear
 LEA    #’.AOUT’,A2
 MOVE.L A2,ioNamePtr(A0)
 MOVE.B #fsWrPerm,ioPermssn(A0)
 If# D0 NE.W #noErrThen.S
 MOVE.L (SP)+,A0
 MOVE.W #openErr,ioResult(A0)
 MOVE.W ioRefNum(A0),

*  Set the output port for 2400 baud, 1
*  stop, no parity, eight bit communication

 MOVE.W #PortSetting,csParam(A0)
 MOVE.W #8,csCode(A0)

*  Set up a parameter block for the serial
*  IO timeout function. The pointer is
*  stored in the Driver private storage.
*  Insert task into the time manager queue
*  which performs the IO timeout function.

 MOVE.L #ParamBlockSize,D0
 _NewPtr ,clear
 MOVE.L A0,KillBlock(A3)
 MOVE.L #1500,TimeCount(A3)
 MOVE.L #tmQSize,D0
 MOVE.L A0,KillTask(A3)
 Call TimeOutInstall ( A0:L ,
 KillBlock(A3):L )

*  Install the GNEFilter

 Call _GetNamedResource:L ( #’GNEF’:L
 , #’GNEFilter’:A ),A2
 CMPA #0,A2
 If#  NEThen.S
 MOVE.L (A2),A2
 MOVE.W Drvr_num(A2),D1
 If#  D1 EQ.W  #0Then.S
 MOVE.W (A2),D0
 LEA  (A2,D0.W),A3
 MOVE.L JGNEFilter,-4(A3)
 MOVE.L #ParamBlockSize,D0
 _NewPtr ,clear
 MOVE.L A0,Control_Ptr(A2)
 MOVE.W dCtlRefNum(A1),D2
 If# D1 LE #entry_slots Then.S
 For# D1 DownTo #1 Do.S
 If# Drvr_num(A2,D1.W*2) EQ.W
 D2 Then.S
 ADD.W  #1,Drvr_num(A2)
 MOVE.W Drvr_num(A2),D1
*  Get the Resource ID for the driver to
*  calculate the ID of owned Alert
*  (sub ID 0)

 LEA  DRVREntry,A0
 LINK A6,#-12
 Call _GetResInfo ( A0:L , (A6):A ,
 4(A6):A , 8(A6):L )
 MOVE.W (A6),D2
 MULU #32,D2
 ADD.W  #Owned,D2
 Call _CautionAlert:W ( D2:W ,
 0:L ),CC
 MOVE.L (SP)+,A0
 MOVE.W #openErr,ioResult(A0)
 MOVE.L A0,-(SP)
 MOVE.L dCtlStorage(A1),A2
 MOVE.L (A2),A3

 MOVE.L #ParamBlockSize,D0
 _NewPtr ,clear
 MOVE.W ReadUnit(A3),ioRefNum(A0)
 MOVE.W WriteUnit(A3),    ioRefNum(A0)
 MOVE.L KillTask(A3),A0
 MOVE.L KillBlock(A3),A0
 Move.L A2,A0
 MOVE.W dCtlRefNum(A1),D2
 Call _GetNamedResource:L (
 #’GNEF’:L , #’GNEFilter’:A ),A2
 CMPA #0,A2
 If#  NEThen.S
 MOVE.L (A2),A3
 MOVE.W Drvr_num(A3),D1
 If#  D1 GT.W  #1Then.S
 While# D2 NE.W
 Drvr_num(A3,D1.W*2) Do.S
 DBEQ.W D1,DuplicateClose
 If# D1 NE.W Drvr_num(A3) Then.S
 ADD.W  #1,D1
 For# D1To Drvr_num(A3)
 LEA  Drvr_num(A3,D1.W*2),
 MOVE.W (A4),-2(A4)
 SUBQ.W #1,Drvr_num(A3)
 ElseIf#.SD1 EQ.W #1 Then.S
 If# D2 NE.W Drvrentries(A3)
 MOVE.L GNE_Next(A3),
 Call _ReleaseResource ( A2:L )
 MOVE.W #noErr,D0
 MOVE.L (SP)+,A0
 DRVRExit ioTrap(A0)
 MOVE.W noErr,D0


*  First, check to see if this is an
*  immediate call. If so, it “jumps the
*  line”, and will be the next call serviced
*  after the current one (if any) is
*  completed.

 MOVE.W ioTrap(A0),D1
 BTST #noQueueBit,D1
 If#  NEThen.S ;Immediate call
 LEA  dCtlQHead(A1),A2
 CMP.L  #0,(A2)
 If#  EQThen.S ;queue empty
 _Status ,async

 MOVE.L (A2),D1
 CMP.L  4(A2),D1
 If# EQ Then.S ; only one entry
 _Status ,async

* Fool the driver into thinking this is an
* asynchronous queue entry
 MOVE.W ioTrap(A0),D1
 BCLR   #noQueueBit,D1
 BSET   #asyncTrpBit,D1   MOVE.W D1,ioTrap(A0)
 MOVE.W #1,ioResult(A0)

*  Get parameter block of queue head, put
*  qLink of qHead in current parameter
*  block;and replace it with current
*  parameter block pointer

 MOVE.L (A2),A2
 MOVE.L (A2),(A0)
 MOVE.L A0,(A2)
 MOVE.L dCtlStorage(A1),A4
 MOVE.L (A4),A4

 MOVE.W TableLen(A4),D1
 MOVE.W RequestOffset(A2),D0
 If#  D0 GT.W D1 Then.S ;Not a valid
 ;pump call
 MOVE.W #statusErr,ioResult(A2)
 MOVE.W #app2Evt,A0
 MOVE.L #statusErr,D0
 DRVRExit ioTrap(A0)

 MOVE.L #ParamBlockSize,D0
 _NewPtr ,clear

*  The next section of code places a pointer
*  to the needed string, and the number of
*  characters, into the parameter block. It
*  was ommitted from this listing. 

 MOVE.W WriteUnit(A4),
 LEA  SerialComplete,A3
 MOVE.L A3,ioCompletion(A0)
 _Write ,async

*  Set up the time manager task to KillIO
*  on the channel in TimeCount
*  milliseconds. KillBlock is a previously
*  allocated parameter block.

 MOVE.L KillBlock(A4),A0
 MOVE.L WriteUnit(A4),
 MOVE.L KillTask(A4),A0
 MOVE.L TimeCount(A4),D0
 MOVE.L #noErr,D0
DRVRControl DRVREnter

 If#  csCode(A0) EQ.W#accEventThen
 MOVE.L csParam(A0),A2
 MOVE.L message(A2),A2
 MOVE.W ioTrap(A2),D2
 AND.W  #$00FF,D2
 MOVE.W ioResult(A2),D3

*  Check to see the serial call was not
*  aborted by KillIO. If so, inform the
*  application, dequeue the pump driver
*  call, and return

 If# D3 EQ.W #abortErr  Then.S
 MOVE.L ioMisc(A2),A0
 EXG  A0,A2
 MOVE.W #TimeOut,ioResult(A2)
 ADD.W  D2,ioResult(A2)
 MOVE.W #app2Evt,A0
 MOVE.L #TimeOut,D0
 DRVRExit ioTrap(A0)

*  The serial call did not time out, so
*  figure out if it was a READ or a WRITE
*  by examining the low nybble of the trap
*  field of the parameter block.

 If#  D2EQ.W#aRdCmdThen

*  READ - examine the character read. If it
*  is a ‘*’, we ignore it and queue another
*  read. If it is a carriage return, we call
*  RespondToRead to interpret the
*  completed pump response. Any other
*  character is incorporated into the string
*  being built at IncomingString and we
*  increment the IncomingLength byte,
*  then queue another READ. If we exceed
*  8 characters, we have a problem.

 MOVE.L ioBuffer(A2),A3
 MOVE.B (A3),D1
 MOVE.L dCtlStorage(A1),A4
 MOVE.L (A4),A4
 If#  D1EQ.B#13  Then.S
 MOVE.L KillTask(A4),A0
 CLR.L  tmCount(A0)
 MOVE.L ioMisc(A2),A3
 Call RespondToRead
 MOVE.L ioMisc(A2),A0
 EXG  A0,A2
 MOVE.W #app2Evt,A0
 CLR.B  IncomingLength(A4)
 CLR.L  IncomingString(A4)
 CLR.L  IncomingString+4(A4)
 CLR.L  D0
 DRVRExit ioTrap(A0)
 ElseIf#.S D1 EQ.B #’*’ Then.S
 _Read ,async
 MOVE.B IncomingLength(A4),
 EXT.W  D0
 ADD.W  #1,D0
 If#  D0 LE.W  #8 Then.S
 MOVE.L KillBlock,A0
 MOVE.W ReadUnit(A4),
 MOVE.L ioMisc(A2),A0
 EXG  A0,A2
 MOVE.W #app2Evt,A0
 DRVRExit ioTrap(A0)
 _Read ,async
 ElseIf#.S D2  EQ.W #aWrCmd Then.S
 MOVE.L dCtlStorage(A1),A4
 MOVE.L (A4),A4
 MOVE.L KillBlock(A4),A0
 MOVE.W ReadUnit(A4),
 MOVE.W ReadUnit(A4),
 MOVE.L #1,ioReqCount(A0)
 MOVE.L ioBuffer(A0),A2
 LEA  ReadBuffer(A2),A2
 MOVE.L A2,ioBuffer(A0)
 LEA  SerialComplete,A4
 MOVE.L A4,ioCompletion(A0)
 _Read ,async
 ElseIf#.S csCode(A0) EQ.W #accRun
 MOVE.L A0,-(SP)
 MOVE.L #ParamBlockSize,D0
 _NewPtr ,clear
 MOVE.W dCtlRefNum(A1),
 MOVE.W #S_request,
 MOVE.W #Ask,ActionOffset(A0)
 CLR.L  ioCompletion(A0)
 _Status ,async
 MOVE.L (SP)+,A0
 ElseIf#.S csCode(A0) EQ.W #killCode
 MOVE.L #ParamBlockSize,D0
 MOVE.L dCtlStorage(A1),A2
 MOVE.L (A2),A2
 _NewPtr ,clear
 MOVE.W ReadUnit(A2),
 MOVE.W WriteUnit(A2),
 ElseIf#.S csCode(A0) EQ.W #goodBye

 MOVE.L #noErr,D0
 DRVRExit ioTrap(A0)

The following is the GNEFilter Code:

 TITLE  ‘GNE filter’

StackFrameRECORD {A6Link},DECR
Result  DS.W1
RetAddr DS.L1
A6Link  DS.L1
LocalSize equ    *
 WITH EventRecord,StackFrame

Entry   DC.WGNEFilter;Offset to
 ;GNE filter
 DCB.B  GNEGlobalSize,0

*  If the event is not an app1Evt, go to the
*  next event in the GNE filter chain,
*  which we previously stored in GNE_Next

 LEA    Entry,A0
 CMP.W  #app1Evt,what(A1)
 BNE.S  Out

*  We have an app1Evt. Check to see if the
*  ioRefnum is negative.

 LINK A6,#LocalSize
 MOVE.L message(A1),A2
 MOVE.L ioMisc(A2),A2
 MOVE.W ioRefNum(A2),D1
 If#  GEThen.S

*  We have a negative ioRefnum. Check to
*  see if it is in the list of ioRefnums
*  we are cooperating with. If it is, pass
*  the event to the driver by setting
*  up a parameter block for an immediate
*  call to the control routine.

 MOVE.L Control_Ptr(A0),A2
 LEA    Drvr_num(A0),A0
 MOVE.W (A0)+,D2 
 For# D2 DownTo #1 Do.S
 MOVE.W (A0)+,D0
 If#  D0EQ.WD1 Then.S
 MOVE.W D1,ioRefNum(A2)
 MOVE.W #accEvent,csCode(A2)
 MOVE.L A1,csParam(A2)
 _Control ,immed
 CLR.W  D0
 MOVE.W D0,Result(A6)
 Leave#.S Loop
 LEA    Entry,A0
 MOVE.L GNE_Next(A0),A0
 JMP    (A0)

The following is the timeout task:

 TITLE  ‘Timeout for serial IO’

KillStore DC.L 0
 LEA    KillStore,A0
 MOVE.L (A0),A0

The following contains the timeout routine installtation, and the serial ioCompletion routine

 TITLE  ‘Timeout for serial IO’

Export  ProcedureTimeOutInstall
 ( KillTask:L , KillPtr:L )
 Begin  Save=A0-A2 

 Call _GetNamedResource:L
 ( #’TMMR’:L , #’KillRoutine’:A ),A1
 CMPA #0,A1
 If#  NEThen.S
 MOVE.L (A1),A1
 MOVE.L KillTask(FP),A0
 MOVE.L KillPtr(FP),(A1)
 LEA    4(A1),A1
 MOVE.L A1,tmAddr(A0)
*  Serial Complete - This routine is the
*  ioCompletion routine for the
*  asynchronously serial IO calls from the
*  pump driver. On completion, the routine
*  posts an app1Evt with the message the
*  parameter block of the completed serial
*  call.

Export  ProcedureSerialComplete
 Begin  Save=A5  

 MOVE.L CurrentA5,A5
 MOVE.W #app1Evt,A0

The following are the shell commands to build this as a desk accessory and install it with the DA mover.

Asm TimeOut.a
Asm KillRoutine.a
link  KillRoutine.a.o 
 -o PumpDriver -ra KillRoutine=16 
 -sn ‘Main=KillRoutine’ 
 -rt TMMR=-15296
Asm GNEFilter.a
link  GNEFilter.a.o 
 -o PumpDriver -sn ‘Main=GNEFilter’ 
 -ra GNEFilter=16 -rt GNEF=-15296
Asm Pdriver.a
link Pdriver.a.o TimeOut.a.o -t DFIL 
 -c DMOV -o PumpDriver -da 
 -sn ‘Main=PumpDriver’ -rt DRVR=34
“HD 40:System Folder:Font/DA Mover”  
 PumpDriver test_drvr


Community Search:
MacTech Search:

Software Updates via MacUpdate

OmniGraffle Pro 7.19.3 - Create diagrams...
OmniGraffle Pro helps you draw beautiful diagrams, family trees, flow charts, org charts, layouts, and (mathematically speaking) any other directed or non-directed graphs. We've had people use... Read more
OmniGraffle 7.19.3 - Create diagrams, fl...
OmniGraffle helps you draw beautiful diagrams, family trees, flow charts, org charts, layouts, and (mathematically speaking) any other directed or non-directed graphs. We've had people use Graffle to... Read more
Hopper Disassembler 5.3.3- - Binary disa...
Hopper Disassembler is a binary disassembler, decompiler, and debugger for 32- and 64-bit executables. It will let you disassemble any binary you want, and provide you all the information about its... Read more
calibre 5.35.0 - Complete e-book library...
Calibre is a complete e-book library manager. Organize your collection, convert your books to multiple formats, and sync with all of your devices. Let Calibre be your multi-tasking digital librarian... Read more
Sound Studio 4.10.0 - Robust audio recor...
Sound Studio lets you easily record and professionally edit audio on your Mac. Easily rip vinyls and digitize cassette tapes, or record lectures and voice memos. Prepare for live shows with live... Read more
Sparkle Pro 4.0 - Visual website creator...
Sparkle Pro will change your mind if you thought building websites wasn't for you. Sparkle is the intuitive site builder that lets you create sites for your online portfolio, team or band pages, or... Read more
Dropbox 140.4.1951 - Cloud backup and sy...
Dropbox for Mac is a file hosting service that provides cloud storage, file synchronization, personal cloud, and client software. It is a modern workspace that allows you to get to all of your files... Read more
FotoMagico 6.0.5 - Powerful slideshow cr...
FotoMagico lets you create professional slideshows from your photos and music with just a few, simple mouse clicks. It sports a very clean and intuitive yet powerful user interface. High image... Read more
Remotix 6.4.2 - Access all your computer...
Remotix is a fast and powerful application to easily access multiple Macs (and PCs) from your own Mac. Features: Complete Apple Screen Sharing support - including Mac OS X login, clipboard... Read more
Microsoft Office 365, 2019 16.57 - Popul...
Microsoft Office 365. The essentials to get it all done. Unmistakably Office, designed for Mac Get started quickly with new, modern versions of Word, Excel, PowerPoint, Outlook and OneNote-... Read more

Latest Forum Discussions

See All

A House Full of Covid – The TouchArcade...
It’s been a rough week as both of our young children tested positive for Covid, and since recording this early on Friday my wife has tested positive now too. Thankfully the kids seemed to recover fairly quickly and are mostly back to normal, and I... | Read more »
TouchArcade Game of the Week: ‘Krispee S...
Krispee Street is a new hidden object game from Frosty Pop that is based on their popular and almost painfully sweet webcomic Krispee. This is one of the latest titles to be added to the Netflix Games catalog, which means you’ll need to log into... | Read more »
SwitchArcade Round-Up: ‘Escape Lala’, ‘B...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for January 21st, 2022. In today’s article, we’ve got a lot of new releases. A lot. There were eight on the schedule when I went to bed last night. There were twenty-four when I woke up... | Read more »
Beta Testers Needed for Huge Version 2.0...
Ya’ll remember Dungeon Raid, right? The phenomenal matching RPG hybrid that launched on mobile more than a decade ago, but was more or less abandoned by its developer only to die a slow death on the App Store before the 32-bit Appocalypse finally... | Read more »
‘Ark Legends’ Gives Players a Chance to...
It’s Airpods and Amazon gift cards galore as Melting Games opens pre-registration for Ark Legends. The upcoming mobile RPG is giving away tons of in-game goodies such as gold, energy, iron core, hero summon chest and rare iron core to players who... | Read more »
‘Nickelodeon Extreme Tennis’ Out Now on...
Nickelodeon Extreme Tennis () from Old Skull Games and Nickelodeon is this week’s new Apple Arcade release. Nickelodeon Extreme Tennis features characters from old and new Nickelodeon shows including SpongeBob, TMNT, and many more. The tennis game... | Read more »
SwitchArcade Round-Up: ‘RPGolf Legends’,...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for January 20th, 2022. In today’s article, we’ve got a massive amount of new releases to check out. We’ve got summaries of all of them, from heaven to hell. We also have the lists of... | Read more »
‘Zed Blade ACA NEOGEO’ Review – Well, It...
SNK’s NEOGEO platform played host to a great many classics, both famous and under-the-radar. The Metal Slug games. The King of Fighters series. Magician Lord. Shock Troopers. Sengoku 3. NEO Turf Masters. Fatal Fury. Samurai Shodown. Twinkle Star... | Read more »
‘Inua – A Story in Ice and Time’ is a Un...
One thing I know about ARTE from their output on mobile over the years is that they love collaborating with really interesting and unique studios to put out really interesting and unique gaming experiences. This is true yet again with the latest... | Read more »
Out Now: ‘Angry Birds Journey’, ‘RPG Dic...
Each and every day new mobile games are hitting the App Store, and so each week we put together a big old list of all the best new releases of the past seven days. Back in the day the App Store would showcase the same games for a week, and then... | Read more »

Price Scanner via

Amazon lowers prices on select 13″ M1 MacBook...
Amazon has select Apple 13″ M1 MacBook Airs on sale for $150 off MSRP this weekend, starting at only $849. Their prices are the lowest available for new MacBook Airs today. Stock may come and go, so... Read more
Apple has 13″ M1 MacBook Airs back in stock s...
Apple has restocked a full line of 13″ M1 MacBook Airs, Certified Refurbished, starting at only $849 and up to $190 off original MSRP. These are the cheapest M1-powered MacBooks for sale today at... Read more
In stock and on sale! 16″ 10-Core M1 Pro MacB...
Amazon has new 16″ 10-Core/512GB M1 Pro MacBook Pros in stock today and on sale for $50 off MSRP including free shipping. Their prices are the lowest available for new M1 Pro 16″ MacBook Pro from any... Read more
Deal Alert!: 14″ M1 Pro with 10-Core CPU in s...
Amazon has the new 14″ M1 Pro MacBook Pro with a 10-Core CPU and 16-Core GPU in stock today and on sale for $2299.99 including free shipping. Their price is $200 off Apple’s standard MSRP, and it’s... Read more
Apple has 24-inch M1 iMacs (8-Core CPU/8-Core...
Apple has restocked a wide array of 24-inch M1 iMacs with 8-Core CPUs and 8-Core GPUs in their Certified Refurbished store. Models are available starting at only $1269 and range up to $260 off... Read more
Select 24″ M1 iMacs are on sale for $100 off...
Sales of Apple’s new 24″ M1 iMacs have been rare since its introduction, perhaps due to global supply issues. However, B&H is offering a $100 discount on select 24″ iMacs, and they’re in stock... Read more
M1 Mac minis are back in stock today at Apple...
Apple has M1-powered Mac minis available in their Certified Refurbished section starting at only $589 and up to $140 off MSRP. Each mini comes with Apple’s one-year warranty, and shipping is free: –... Read more
B&H has M1-powered Mac minis on sale for...
B&H Photo has Apple’s Mac minis with M1 Apple Silicon CPUs in stock today and on sale for $50-$100 off MSRP, starting at $649. Free 1-2 shipping is free to many US addresses. Their prices are... Read more
New Amazon sale: Apple’s 13″ M1 MacBook Airs...
Amazon has Apple 13″ M1 MacBook Airs on sale for $100 off MSRP, starting at only $899. Their prices are the lowest available for new MacBook Airs today. Stock may come and go, so check their site... Read more
Get an Apple Watch Series 7 for $50 off MSRP,...
Amazon has Apple Watch Series 7 models on sale for $50 off MSRP including free shipping. Their prices are the lowest available for Apple Watch Series 7 models today: – 41mm Apple Watch Series 7 GPS... Read more

Jobs Board

Registered Nurse (RN) Employee Health PSJH -...
…is calling for a Registered Nurse (RN) Employee Health PSJH to our location in Apple Valley, CA.** We are seeking a Registered Nurse (RN) Employee Health PSJH to be Read more
Systems Administrator - Pearson (United State...
…and troubleshoot Windows operating systems (workstation and server), laptop computers, Apple iPads, Chromebooks and printers** + **Administer and troubleshoot all Read more
IT Assistant Level 1- IT Desktop Support Anal...
…providing tier-1 or better IT help desk support in a large Windows and Apple environment * Experience using IT Service Desk Management Software * Knowledge of IT Read more
Human Resources Business Partner PSJH - Provi...
…**is calling a** **Human Resources Business Partner, PSJH** **to our location in Apple Valley, CA.** **Applicants that meet qualifications will receive a text with Read more
Manager Community Health Investment Programs...
…is calling a Manager Community Health Investment Programs PSJH to our location in Apple Valley, CA.** **Qualified candidates will be invited to do a self-paced video Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.