Geekboy

Untitled

Jun 3rd, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Cn3_IDSet:
  2.     di
  3.     ld hl,Cn2_Caller_Routine
  4.     ld de,$9999
  5.     ld bc,Cn2_Caller_RoutineDone-Cn2_Caller_Routine
  6.     ldir
  7. #ifdef cn2_installerinflash
  8.     in a,(6)
  9.     ld ($9999+Cn2_caller_HomePage-Cn2_Caller_Routine+1),a               ;SMC if this code is on a Flash page
  10. #endif cn2_installerinflash
  11.     ld a,$9a
  12.     ld i,a
  13.     ld h,a
  14.     ld l,0
  15.     ld (hl),$99
  16.     push hl
  17.     pop de
  18.     inc de
  19.     ld bc,256
  20.     ldir
  21.     ld a,%00001001      ;Acknowledge and disable
  22.     out (3),a
  23.     ld a,%00001011      ;Set 1st timer active
  24.     out (3),a
  25.     ld a,%00000110      ;Slowest frequency, ~110hz
  26.     out (4),a
  27.     im 2
  28.     ld a,sendCLDL
  29.     out (0),a
  30.     ei
  31.     ret
Advertisement
Add Comment
Please, Sign In to add comment