Re: A86: Re: Random Integer
[Prev][Next][Index][Thread]
Re: A86: Re: Random Integer
> Now, you can use SCaBBy's display a routine (which I don't have handy =( )
> to display a in var-width font...
Somewhere along the line I picked this up, but I think it is by Joshua
Seagoe. ???
;DispA Display A routine by Joshua Seagoe???
;INPUT-- value in register A
;OUTPUT-- decimal value, vWidth text, current pen position, no leading
0's
;--------------------------------------------------------------------------
DispA:
ld l,a
ld h,0
ld de,$c08d
ld b,3 ;3 digits
DispA1:
call _hldiv10 ;=$4044 a=hl%10 hl=hl/10
add a,$30 ;convert to decimal digit
ld (de),a ;store it
dec de
djnz DispA1
xor a
ld ($c08e),a ;end the string
ex de,hl
ld a,$30 ;trim leading zeros
ld b,2 ;take these 7 lines
DispA2: ;out and put in one
inc hl ;inc hl
cp (hl) ;instruction if
jp nz,DispA3 ;you want to keep them
djnz DispA2 ;
DispA3:
call _vputs ;display it
ret
Cassady Roop
Slightly Immoral Technologies
References: