home *** CD-ROM | disk | FTP | other *** search
- 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
-