I am trying to get a simple z80 asm program to see if a given program is archived. I found a program on TICalc that would toggle between ram and archive and set Ans to what bank it was in. I removed the arc/unarc bcall thingy to get this. However, it only works about half the time. I have no experience at all in z80, so any help will be appreciated.
Code:
Code:
; Program Name: TSTARC
; Author(s): ItsJustSomeDude, Harold Aptroot
; Description: Tests if program is archived
.nolist
#include "ti83plus.inc"
.list
.org userMem-2
.db $BB,$6D
bcall(_AnsName)
bcall(_FindSym)
inc de
inc de
ex de,hl
ld de,OP1+1
ldi \ ldi \ ldi \ ldi
ldi \ ldi \ ldi \ ldi
ld hl,OP1
ld (hl),ProgObj
bcall(_ChkFindSym)
ld a,b
bcall(_SetXXop1)
bcall(_StoAns)
ret