A86: Problem with variables


[Prev][Next][Index][Thread]

A86: Problem with variables




This bit of code dosen't work and I can't figure out why.  Can anybody
help?  The calc freezes in place when the variable exists, and turns off
then freezes when it dosent.

#include "asm86.h"
#include "ti86asm.inc"
#include "ti86math.inc"
#include "ti86ops.inc"
#include "ti86abs.inc"

.org _asm_exec_ram

_delvar 		equ	475Fh
_FINDSYM	equ	46CBh

main:
	call	_OP1SET0	; OP1 = 0
	ld	hl,progname	; Source = progname
	ld	de,_OP1+1	; Dest = OP1+1
	ld	b,6		; copy 6 bytes
	ldir			; copy
	call	_FINDSYM	; carry flag set if var dosen't
exist, registers
				; set correctly for _delvar
	jr	c,dosentexist	; if so, quit without doing
anything
	call	_delvar		; if not, delete it

dosentexist:
	ret			; return to system

progname:
	.db		05h,"ABCDE"

.end


Follow-Ups: