🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #12349

Re: mystery code

#12349
From: Lehtinen Pertti
Date: Mon, 24 Apr 1989 22:28
45 lines
2160 bytes
>Jim B Howard writes:
> I have been having trouble with the following asm code that is
>driving me NUTS.  The code works perfectly, as long as it is 
>not in CHIP mem.  If its in any form of FAST mem, it functions.
>But if its in CHIP mem, it crashes and burns.  I cant think of any
>reason that this could happen, so maybe some of you could come
>up with some reasons.  I've never had this happen in any of my
>programs before..  When I step through the program with a debugger,
>it crashes when it calls the _LVOClearScreen routine, but
>_only_ when its in CHIP mem.  
> 
 ... code removed ...

	Well I think code actually shouldn't work from FAST ram
	either (but it does I tried).

	Actually problem is in the way how ClearScreen works.

	It is Text function and its works on text line based.
	So its zero point is at text baseline, where it assumes
	us to stay when it is called.

	As manual says, it first calls ClearEOL to clear current line.

	Fine, if our current position in rasterport is atleast
	baseline rasters below zero. In normal screen that means
	line 6.

	In current example we were at line 0, which means that
	we clear also 6 rasterlines above our bitplane.

	This is always wrong, but in this case only when we were
	at CHIP ram this was fatal. As fatal as clearing our stack
	could ever be. 

	Obvious fix is to use some raster based function to clear
	rasterport, or use move function to position 'cursor' on
	legal area.

					Pertti Lehtinen
					pl@tut.fi
pl@tut.fi				! -------------------------------- !
Pertti Lehtinen				!  Alone at the edge of the world  !
Tampere University of Technology	! -------------------------------- !
Software Systems Laboratory
Technical Details
Message-ID: <6844@etana.tut.fi>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!kth!draken!tut!kaarne.tut.fi!pl

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!kth!draken!tut!kaarne.tut.fi!pl
From: pl@kaarne.tut.fi (Lehtinen Pertti)
Newsgroups: comp.sys.amiga.tech
Subject: Re: mystery code
Message-ID: <6844@etana.tut.fi>
Date: 24 Apr 89 22:28:43 GMT
Sender: News@tut.fi
Reply-To: pl@kaarne.tut.fi (Lehtinen Pertti)
Organization: Tampere University of Technology, Finland
Lines: 45