Re: A86: Writing integers


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

Re: A86: Writing integers




Robert Niedziela wrote:
> 
>                                                     HELLO !
> I have one question.
> Is there function writing integers to screen using variable width font
> in TI-86 ROM ?
> (something like function at location $4A33 using 5x7 font)


First, put the number in AHL. Next, put $ffff in (_curRow), then point
(_penCol) and (_penRow) to where you want to display the integer. Next
call _dispAHL ($4a33), then call _vputs.

Here is the routine you can call to display HL in a variable-width font
(assuming you have already set _penCol and _penRow):

_dispAHL 	equ		$4a33

display_hl:			;display hl in decimal
	push	de		;save de
	ld	de,-1		;put $ffff in de
	ld 	(_curRow),de	;put $ffff in (_curRow) and (_curCol)
	pop	de		;restore de
	xor	a		;clear high byte of ahl
	call	_dispAHL	;point hl to decimal string
	jp	_vputs		;print string and return

--wil mahan


References: