home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 5
/
ctrom5b.zip
/
ctrom5b
/
PROGRAM
/
ASM
/
ALIB30B
/
CONV20.ASM
< prev
next >
Wrap
Assembly Source File
|
1994-10-15
|
916b
|
41 lines
page 66,132
;******************************** CONV20.ASM *********************************
LIBSEG segment byte public "LIB"
assume cs:LIBSEG , ds:nothing
;----------------------------------------------------------------------------
.xlist
include mac.inc
include common.inc
.list
comment
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -( CONVERT )
BYTE_TO_DEC_STDOUT - display byte as decimal to stdout
;
; inputs al = byte
;
; output none
;* * * * * * * * * * * * * *
extrn stdout_char:far
;----------------------------------------------------------------------------
; inputs al = binary
;
public byte_to_dec_stdout
byte_to_dec_stdout proc far
push ax
aam ;convert byte to bcd
or ax,3030h ;add in ascii
xchg al,ah
call stdout_char
xchg al,ah
call stdout_char
pop ax
retf
byte_to_dec_stdout endp
LIBSEG ENDS
end