A83: Re: Hex displaying
[Prev][Next][Index][Thread]
A83: Re: Hex displaying
I made a routine awhile back to display a in hex, it shouldn't be too hard
to make it display hl in hex (if nothing else you could at least call it
twice with h then l).
It probably isn't very well coded, but oh well:
;---------= Display A in Hex =---------
; In: a=number
; Out: a is displayed in hex
; Registers destroyed: af c de hl
dispHex:
ld c,a
and %11110000
rra
rra
rra
rra
ld d,0
ld e,a
ld hl,dispHex_map
push hl
add hl,de
ld a,(hl)
call putc
ld a,c
and %00001111
ld e,a
pop hl
add hl,de
ld a,(hl)
jp putc
dispHex_map:
.db "0123456789ABCDEF"
Joe Wingbermuehle
http://www.usmo.com/~joewing/
-----Original Message-----
From: Alan C Johnson <benjamin99@juno.com>
To: assembly-83@lists.ticalc.org <assembly-83@lists.ticalc.org>
Date: Sunday, September 13, 1998 8:40 PM
Subject: A83: Hex displaying
>
>How can I display a 16-bit hex number in fixed font?
>_____________________________________________________________________
>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
>Or call Juno at (800) 654-JUNO [654-5866]
>
Follow-Ups: