Re: A86: displaying a variable


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

Re: A86: displaying a variable




to add to a one byte var: (one way of many)
	ld a,(varaddr)
	add a,5
	ld (varaddr),a

ok, i don't know how big you're gonna go here

for less than 100:
	ld a,number
	call _unpack_hex
	add $30
	call _putc	;or _vputmap
	ld a,b
	add $30
	call _putc	;or _vputmap

anything else, find the dispa/disphl/dispahl routines.  if you want large
font, there's a rom call to do _dispahl.
if you want really huge, use floating point in op1 and use _formreal:
	;load whatever to op1
	ld a,18
	call _formreal
	ld hl,_OP3
	call _puts	;or _vputs

-josh

On Mon, 25 Jan 1999 20:14:44 EST BlAsTo1414@aol.com writes:
>
>The variable that I want to display is a number that will be higher 
>than 10
>most of the time.  So how would I display it then?  the default 
>setting is 1,
>but it will change as the user progresses in the game.  I still need 
>to know
>how to display that number and add to it.
>
>Thanks again,
> BlAsTo1414
>
>
>> 
>>  if it's always less than 10 you can add $30 and it'll work that 
>way
>>  
>>  -josh
>>  
>>  On Sat, 23 Jan 1999 20:59:13 EST BlAsTo1414@aol.com writes:
>>  >
>>  >hi,
>>  >I have a variable stored like this:
>>  >
>>  >variable1:
>>  >	.db 1,0
>>  >
>>  >does this mean that when i display the variable, ((ld 
>>  >hl,variable1)(call
>>  >_puts)) it will display the number 1?  if not, how would I do 
>that?
>>  >
>>  >Thank you for your help,
>>  > 	  BlAsTo1414
>>  >
>>  >
>>  
>
>

___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]