home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / misc / motfreeware.lha / MotorolaFreeware / Examples / D_Output.asm < prev    next >
Encoding:
Assembly Source File  |  1989-07-29  |  553 b   |  36 lines

  1. ;***********************************
  2. ;    Subroutine Dummy Output
  3. ;
  4. ;    Send data where it belongs
  5. ;***********************************
  6.  
  7.     IFND GLOBAL_DAT
  8.     include <Global_Dat.i>
  9.     ENDIF
  10.  
  11.     CODE        ;get code PC back
  12.  
  13. Output:    ldx Reg_Table    ;get pointer to table
  14.     psha        ;save data
  15.     ldaa #SizeOfHware ;find offset
  16.     mul
  17.     abx        ;add offset to pointer
  18.     pula        ;recover data
  19.     jmp Handler,x    ;goto Handler
  20.  
  21. Handler1:
  22.     ;do handling
  23.     rts
  24.  
  25. Handler2:
  26.     ;do handling of second sort
  27.     rts
  28.  
  29.     AUTO    ;goto auto area
  30.     ORG 0    ;same ORG cuz same area
  31.  
  32. Itch1:    RMB BYTE
  33. Itch2:    RMB BYTE
  34.  
  35.     end
  36.