home *** CD-ROM | disk | FTP | other *** search
/ ticalc.org / ticalc_org_rev_b.iso / archives / 86 / asm / source / patch.asm < prev    next >
Encoding:
Assembly Source File  |  2001-07-01  |  1.2 KB  |  51 lines

  1. ;this fixes the DOWN+LEFT (and other key) bug as well as fixing the bug where
  2. ;if you hold down ENTER, etc. while turn it on up pops the battery message.
  3. ;(that's a terrible sentence that isn't one :) DRAWBACKS:
  4. ; * if a game uses IM 2, you will have to reinstall it
  5. ; * it uses the _ALT_SLINK and _ALT_ON areas of the RAM. this mean DO NOT
  6. ;   install a SLINK or ON hook while you have my bug fixer installed
  7. ; * if you go to the memory reset screen it will be disabled, just reinstall
  8. ;   it. this is so that the 86 doesn't lock if you reset the calc. in a
  9. ;   future version i'll fix it so it uninstalls if you push YES.
  10. ;
  11. ; version 1.0 by Kirk Meyer             _@ibm.net
  12. ; if you find any bugs, e-mail me. this version allows the calc to turn off.
  13. ; it should work on 1.1, 1.2, 1.3, ... but if it doesn't say so.
  14.  
  15. .org $D748      ;_asm_exec_ram
  16.  
  17.  im 1
  18.  ld hl,$D400
  19.  ld de,$D401
  20.  ld bc,$0100
  21.  ld (hl),$D3
  22.  ldir
  23.  ld hl,int_handler
  24.  ld de,$D3D3
  25.  ld bc,int_end-int_handler
  26.  ldir
  27.  ld a,$D4
  28.  ld i,a
  29.  im 2
  30.  ret
  31.  
  32. int_handler:
  33.  ex af,af'
  34.  ld a,($C1B4)   ;_CXCURAPP
  35.  cp $1D
  36.  jr c,int_ok
  37.  cp $20
  38.  jr nc,int_ok
  39.  im 1
  40.  jp $0039
  41. int_ok:
  42.  in a,($03)
  43.  bit 3,a
  44.  jp z,$0039
  45.  res 0,a
  46.  out ($03),a
  47.  jp $0039
  48. int_end:
  49.  
  50. .end
  51.