Re: LZ: What is wrong with this routine?


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

Re: LZ: What is wrong with this routine?



I think you just forgot to put the calc into graphics mode. Just add this
little bit at the begginging:
 		ld a,4
            out (5),a                       
					
					Mike Johnson
					mj11749@cedarnet.org
----------
> From: Peter Cordes <pcomp@ntsource.com>
> To: list-zshell@lists.ticalc.org
> Subject: Re: LZ: What is wrong with this routine?
> Date: Friday, September 06, 1996 7:28 PM
> 
> Min Idzelis wrote:
> > 
> > This is a line drawing routine someone gave to me. However, it always
> > ends unexpectently, that is, it gives me a TI-Basic ERROR 14
> > UNDEFINED, and when i press [F5] QUIT it fills the screen with black
> > dots. After you press CLEAR it goes away and everything works again.
> > I'll post the ASM test program here: (I'm self teaching code, BTW)
> > 
> > #include "TI-85.H"
> > 
> > .org 0
> > .db "test",0
> > 
> > BlackScreen:
> >  ld hl, $FC00
> >  ld d, h
> >  ld e, l
> >  inc de
> >  ld (hl), $FF
> >  ld bc, 1023
> >  ldir
> > test:
> >  ld c, 30
> >  ld b, 10
> >  ld d, 20
> > 
> > HorzLine:
> >  ROM_CALL(FIND_PIXEL)
> >  ld b, d
> >  ld c, a
> >  ld de, $FC00
> >  add hl, de
> > HRep:
> >  ld de, 0
> >  ld a, c
> >  or (hl)
> >  ld (hl), a
> >  ld a, c     ; Skip these three lines
> >  xor (hl)   ; if you want to fill
> >  ld (hl), a  ; instead of erase
> >  rrc c
> >  adc hl, de
> >  djnz HRep
> >  ret
> > 
> > Wait2:                          ; wait for any key
> >  call   GET_KEY
> >  cp     0
> >  jr     z, Wait2
> >  ret
> > 
> > .end
> >      Computers are like drugs: Highly addictive,
> > incredibly expensive, and you keep having to buy more
> > and better to remain at the same level of amusement.
> you forgot to put in 
> 	ld a, 4 
> 	out (5),a
> 
> I had that same problem before and that is what caused it. also memory
> was added to the equation memory.
> PCoMP
> Visit Maximus Productions home page at: http://www.ntsource.com/~pcomp
> IRC Name: Rob_Zombie


References: