RE: LZ: Need some help


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

RE: LZ: Need some help



I searched and searched for that, and couldn't find one. I wrote a routine to 
do it instead:
;Sub for displaying hl in menu text: (remove unnecessary push/pops as needed)
;You need to have a 5 consecutive byte structure in memory denoted as MNUM.
Dhlmenutxt:
 	push de
	push bc
	push hl
	push af
	ld c, 0
	ld b, 5		;A word fits into 5 characters
ConvLoop:
 	call UNPACK_HL	;Unpack the next number
 	add a, '0'	;Now A is the CHARACTER for this value
	push hl
	ld hl, MNUM
	ld c, b
	ld b, 0
	add hl, bc
	ld b, c
	ld (hl), a
	pop hl
	djnz ConvLoop	;Convert all the 5 characters
	ld b, 0
Disploop:
	inc b
	ld a, b
	cp 6
	jr z, Exitdisploop
	ld hl, MNUM
	ld c, b
	ld b, 0
	add hl, bc
	ld b, c
	ld a, (hl)
	ROM_CALL(M_CHARPUT)
	jr Disploop
Exitdisploop:
	pop af
	pop hl
	pop bc
	pop de
	ret	


--MZB


----------
From: 	owner-list-zshell@defiant.rbk.sollentuna.se on behalf of Steve Peterson
Sent: 	Monday, July 08, 1996 12:14 AM
To: 	list-zshell@defiant.rbk.sollentuna.se
Subject: 	Re: LZ: Need some help


Can anybody give me a good routine for outputing the contents of a memory 
address to a position on the screen 
using the Menu style font?  I know this is a really stupid question, but I 
have had problems trying to do it 
myself.


Thanks in advance for your help!
 
 _
(_
|_)teve
|eterson
 
vestige@ddt.net
http://www.geocities.com/SiliconValley/Park/2636