[A86] Re: _getky flaw and weird 6-line-bug


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

[A86] Re: _getky flaw and weird 6-line-bug




> Van: Burkart Lingner <Burkart.Lingner@Student.Uni-Magdeburg.DE>

> If I transfer the program to my TI-86 and then run it via "Asm(test", it
> works fine, except that it uses only the upper 6 lines - and even worse,
> after I quit  it, TIOS as well doesn't use the last 2 lines. If I then
> turn off my calc and just on again, both TIOS and my program use all 8
> lines again.
> [..]

Had the same problem with the z88dk. The Ti86 menu-system will tell the
font-routine that it shouldn't write to the last row(s), since there's the
menu. When you start an asm program it isn't deallocated, which kinda
goofy...

An older (pre Tijl Coosemans) ZTetris handled this by using it's own _puts
replacement, as far as I know.

Solution:
	call	_homeup	; Set text cursor at (0,0)
	ld	a,8		; Set _winBtm back to 8, so we
	ld	(_winBtm),a	;  can print on the last line(s)

;	call _flushallmenus	; Doesn't help all the time (?why?)

> The second thing that bothers me is, that if I run the program and press
> "ON" nothing happens. Actually that's correct but if I then press "ENTER"
> to exit the program, it says, that some error (06: BREAK) occured.
> [..]

This also happens on the Ti83(+), it's merely that the getkey-handler is
also used in BASIC programs. There's it should trigger a BREAK error. Since
this error won't be triggered when outside the TIOS it will be shown after
you exited the program. (you should know that the prompt is just some sort
of BASIC program)

Solution:
	res	4,(IY+$09)	; res onInterrupt,(IY+onflags)
				; Could also be onRunnning ( = 3 )

Hope this helps.

	Henk Poley <><