home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 2: PC / frozenfish_august_1995.bin / bbs / d01xx / d0165.lha / Parsnag / par.asm < prev    next >
Assembly Source File  |  1988-11-22  |  771b  |  33 lines

  1. ;par.asm - parsnag parallel support routines (c) 1987 John Hodgson
  2.  
  3. ;compile using the Aztec AS assembler with -C and -D options
  4.  
  5.     public    _ParDispatch
  6.     public  _ParExpunge
  7.  
  8. ;entry : a1=IOExtPar, a6=device vector table
  9.  
  10. _ParDispatch:
  11.     move.w    $1c(a1),d0        ;fetch io_Command
  12.     cmp.w    #3,d0            ;CMD_WRITE?
  13.     bne    .1            ;skip if not
  14.     movem.l    d1-d7/a2-a6,-(sp)    ;save regs
  15.     move.l    a1,-(sp)        ;push ioblock ptr for C
  16.     jsr    _NewBeginSub        ;call it!
  17.     move.l    (sp)+,a1        ;restore regs
  18.     movem.l    (sp)+,d1-d7/a2-a6
  19.     rts                ;back w/result in D0
  20. .1
  21.     move.l    _OldBeginIO,a0        ;fetch original BeginIO vector
  22.     jmp    (a0)            ;routine will rts for us
  23.  
  24.  
  25. ;credit to Caroline Scheppner for this one :
  26.  
  27. _ParExpunge:
  28.     moveq.l    #0,d0            ;"no error"
  29.     rts                ;back w/o expunge
  30.  
  31.     public    _OldBeginIO
  32.     public    _NewBeginSub
  33.