home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
progjour
/
1991
/
06
/
alib
/
put_hex.asm
< prev
next >
Wrap
Assembly Source File
|
1991-06-25
|
534b
|
47 lines
include asm.inc
public put_hex_word
public put_hex_byte
.code
extn putchar
;; put hex byte
;
; entry AL byte
; uses AX
; note calls putchar to write chrs
;
put_hex_byte proc
push ax
sar al,1
sar al,1
sar al,1
sar al,1
call ohb1
pop ax
ohb1: and al,0Fh
add al,90h
daa
adc al,40h
daa
jmp putchar
put_hex_byte endp
;; put hex word
;
; entry AX word
; uses AX
;
put_hex_word proc
push ax
mov al,ah
call put_hex_byte
pop ax
jmp put_hex_byte
put_hex_word endp
end