home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / program / books / 68k_book / arp_src / prg_6fp.s < prev    next >
Text File  |  1985-11-20  |  1KB  |  38 lines

  1.  ; Program Name: PRG_6FP.S
  2.  ;      Version: 1.001
  3.  
  4.  ; Assembly Instructions:
  5.  
  6.  ;     Assemble in PC-relative mode and save with a PRG extension.
  7.  
  8.  ; Execution Instructions:
  9.  
  10.  ;     Execute from the desktop.
  11.  
  12.  ; Program Function:
  13.  
  14.  ; Turns on keyclick sound so that the programs that turn it off can be
  15.  ; tested.  See programs PRG_6DP and PRG_6EP for further documentation.
  16.  
  17. mainline:
  18.  lea        stack, a7           ; Point A7 to this program's stack.
  19.  
  20. execute_subroutine_in_supervisor_mode:
  21.  pea        turn_key_click_on   ; Push address of subroutine onto stack.
  22.  move.w     #$26, -(sp)         ; Function = superexec = XBIOS $26 (dec 38).
  23.  trap       #14                 ; XBIOS call.
  24.  addq.l     #6, sp
  25.  
  26. terminate:
  27.  move.w     #0, -(sp)           ; Function = p_term_old = GEMDOS $0.
  28.  trap       #1                  ; GEMDOS call.
  29.  
  30. turn_key_click_on:              ; Subroutine to be executed in supervisor
  31.  move.b     #7, $484            ; mode.
  32.  rts
  33.      
  34.              ds.l    24         ; Stack.
  35. stack:       ds.l     0         ; Address of stack.
  36. program_end: ds.l     0
  37.  end
  38.