0 Members and 3 Guests are viewing this topic.
bcall(_RclAns) or a ;tests if A is 0. this is the type and we want 0 (o is a number) jr nz,PicNotFound bcall(_ConvOP1) ;we find the number ld d,e ld e,60h ;so DE is xx60. in RAM, it is stored in reverse as 60xx ld (OP1+1),de ;we load the name to OP1 xor a ;optimised way to do ld a,0 (3 cycles faster, 1 byte smaller) ld (OP1+3),a ;we add a zero after the name rst rFindSym ;we locate the var jr c,PicNotFound inc de inc de ;de now points tot he picture data :)
Fire: ld hl,934Ch ld de,9340h ld bc,2F4hRandom: ;feel free to give me a smaller rand routine that is pretty random x.x push hl push de ld hl,0 ld a,r ld h,a add a,(hl) inc hl rrca add a,(hl) inc hl rrca xor (hl) inc hl rrca rrca ld l,a ld (Random+3),hl and 7 ld d,8Bh ld e,a ld a,(de) pop de pop hlMethod: or (hl) ;change to AND for t'other method ld (de),a inc de cpi jp pe,Random ret
Heh...It'd be cool to be able to have your screen burning with grayscale fire while using the calc normally.