It's short and I would think it's pretty much self-explanatory (at least for some of us)
If you don't get the point of this code, it should make all the arguments into a list (downside is that you can't push on the FPS without corrupting the data)
Code: Select all
.db $83
or a
ret z
cp 1
jr z,{+}
-: cp a
ret
+: push hl
ld hl,$8A8A
sbc hl,bc
pop hl
jr nz,{-}
ld (Appbackupscreen),hl
dec hl
ld de,(FPS)
push de
bcall(_DeallocFPS)
pop hl
push hl
ld de,(FPS)
or a
sbc hl,de
ld b,h
ld c,l
pop hl
ld d,h
ld e,l
inc de
inc de
push de
lddr ;move everthing 2 bytes up
pop de
inc de
ld hl,op1
ld bc,9
ldir ; "push" op1 on the FPstack
ld de,(appBackUpScreen) ;number of arguments
ld hl,(FPS)
ld (hl),e
inc hl
ld (hl),d