Re: A86: TI-86 VAT
[Prev][Next][Index][Thread]
Re: A86: TI-86 VAT
At 09:37 PM 6/11/98 -0400, you wrote:
>
>What I really want to know now... how do I display the contents
>of hl in decimal form at the current pen location using the tiny
>font (I know there is a call for the 5x7 font, but thats way too
>big) I know there has to be one somewhere... anybody found it yet?
>Alan Bailey (sp?) wrote a routine to display hl in hex... but not
>many people want to see that ase is 0176h bytes or whatever. I
>wish people could have had sixteen fingers, or at least 8. Anybody
>got an Xacto knife? :)
>
Here's the code to _disp_ahl with a call to _vputs at the end (normally it
falls through to _puts). This should work, though I didn't test it. Funny
though, I couldn't find a routine to do this in the ROM. And it should be
pretty easy to find. Oh, well.
-----
_div_ahl_10 EQU 404Ch
_div_hl_10 EQU 4044h
push bc
ld de,_OP1+5 ;store digits in OP1
ld b,5 ;do for 5 digits
call _div_ahl_10 ;get first digit
jr a1
a0: call _div_hl_10 ;get subsequent digits
a1: add a,'0' ;convert to ASCII digit
ld (de),a ;store digit to OP1
dec de
djnz a0 ;next digit
sub a ;terminate string with 0 byte
ld (_OP1+6),a
ex de,hl
ld a,'0'
ld b,4 ;for 4 digits (print 1 digit), even if # is 0
a2: inc hl
cp (hl) ;if digit is 0, change it to a space
jr nz,a3
ld (hl),' '
djnz a2
a3: ld hl,_OP1
pop bc
call _vputs
>Also... The first six VAT entries seem to be system files. For
>a user program should I omit them? For me user programs start at
>around BFC7h if I remember correctly. The stuff before that is
>xStat, yStat, fStat, Ans and two mysterious programs called # and
>!. /me shrugs.
Depends on what you are doing. xStat, yStat, and fStat are just normal list
variables. Ans is, of course, the last answer. I don't remember exactly
what # and ! are. One of them is the last parsed command, I think.
--Joshua
Follow-Ups:
References: