[comp.sys.apple2] positioning string in upper left corner of window

acmfiu@serss0.fiu.edu (ACMFIU) (05/09/91)

i still have been unable to position my string in the upper left-hand corner
of my window (well, i found a way but i don't understand it). the following
code does what i want.

	ldx	#$ffea
	ldy	#$fff0
	stx	@x_coor
	sty	@y_coor
	PushLong #point
	_LocalToGlobal
	PushWord @x_coor
	PushWord @y_coor
	_MoveTo
	PushLong #str
	_WriteCString

now, you will notice that i don't use coordinates (0, 10) as the upper
left corner for me to position my string. in stead, i use negative coordinates.
this seems to do the job.

i must be missing something. anyone have any ideas?

albert

ps. i might have the order wrong for the above code (i.e. in pushing which
parameter first). i'm doing this from memory.

meekins@medusa.cis.ohio-state.edu (Tim Meekins) (05/09/91)

In article <3525@kluge.fiu.edu> acmfiu@serss0.fiu.edu (ACMFIU) writes:

>	ldx	#$ffea
>	ldy	#$fff0
>	stx	@x_coor
>	sty	@y_coor
>	PushLong #point
>	_LocalToGlobal
>	PushWord @x_coor
>	PushWord @y_coor
>	_MoveTo

Ahhhhhhh, get rid of the _LocalToGlobal. Your negative coordinates 
($FFEA,$FFF0) are making up for the LocalToGlobal transformations, but will
no longer work if your window is moved. MoveTo works in local coordinates, NOT
global coordinates so DON'T convert to global unless you set the port to the
desktop
--
++------------S-U-P-P-O-R-T---S-H-A-R-E-W-A-R-E---O-R---D-I-E-!-----------++
|| Tim Meekins                   ||  Snail Mail:           ||   Apple II  || 
||   meekins@cis.ohio-state.edu  ||    8372 Morris Rd.     ||   Forever!  ||
\\___timm@pro-tcc.cts.com________/\____Hilliard, OH 43026__/\_____________//