0 Members and 1 Guest are viewing this topic.
#include "ti83plus.inc"appBackUpScreen equ 9872happbackupscreen equ 9872hseed1 equ 9640hOP1 equ 8478hOP3 equ 848Eh.org $9D95;.db $BB,$6D ;this will be uncommented (the .db part, not this text) if you are not using asm8x LD HL, myhook LD DE,appBackUpScreen LD BC, myhookend-myhook ldir LD HL, appbackupscreen in A, (6) bcall 4FABh ;Homescreen hook enable bcall _Random LD HL, seed1+2 LD DE, LFSRSeed LD BC, 8 ldir ret myhook: .db 83h ; Required for all hooks OR A JR NZ, End LD HL, OP1 LD DE, OP3 LD BC, 11 ldir call RandLFSR-myhook+appbackupscreen CP 171 JR C, GreaterThanLessThan: call OP3toOP1r-myhook+appbackupscreen bcall _Plus1 bcall _StoAns CP A retMiddle: call OP3toOP1r-myhook+appbackupscreen CP A retGreaterThan: CP 86 JR C, Middle call OP3toOP1r-myhook+appbackupscreen bcall _Minus1 bcall _StoAns CP A retEnd: cp A ret OP3toOP1r: LD HL, OP3 LD DE, OP1 LD BC, 11 ldir ret ;------LFSR------;James Montelongo;optimized by Spencer Putt;out:; a = 8 bit random numberRandLFSR: ld hl,LFSRSeed+4 ld e,(hl) inc hl ld d,(hl) inc hl ld c,(hl) inc hl ld a,(hl) ld b,a rl e \ rl d rl c \ rla rl e \ rl d rl c \ rla rl e \ rl d rl c \ rla ld h,a rl e \ rl d rl c \ rla xor b rl e \ rl d xor h xor c xor d ld hl,LFSRSeed+6 ld de,LFSRSeed+7 ld bc,7 lddr ld (de),a retLFSRSeed: .DB 0,0,0,0,0,0,0,0 myhookend:
hook: add a, e or a jr nz, quitZ bcall(_Op2Set1) ;op 2 = 1 ld a, r and %00000001 rrca ld (op1), a ;neg or positive bcall(_FPAdd)quitZ: cp a rethookEnd:
I had one laying around too, optimized it a little though.Code: [Select]hook: add a, e or a jr nz, quitZ bcall(_Op2Set1) ;op 2 = 1 ld a, r and %00000001 rrca ld (op1), a ;neg or positive bcall(_FPAdd)quitZ: cp a rethookEnd: And to make it epic, store it at smallEditRam, its a 108 byte area that no one ever uses. That way, it won't get destroyed.
I have no idea. But it's really helpful when people bring me their calcs at school that have "Viruses." Basically some font hook gone crazy, sometimes on purpose.PTT does have one fatal flaw though, it kills all hooks, but not OFFSCRPT. Which means make an OFFSCRPT that disables it, all you have to do is off/on and you're good to go.
Server load over the past 5, 10 and 15 minutes respectively: 0.35, 0.2, 0.23
Page created in 0.765 seconds with 60 queries.