Fix the spelling of "Boston"
[profile/ivi/syslinux.git] / writehex.inc
1 ;; $Id$
2 ;; -----------------------------------------------------------------------
3 ;;   
4 ;;   Copyright 1994-2002 H. Peter Anvin - All Rights Reserved
5 ;;
6 ;;   This program is free software; you can redistribute it and/or modify
7 ;;   it under the terms of the GNU General Public License as published by
8 ;;   the Free Software Foundation, Inc., 53 Temple Place Ste 330,
9 ;;   Boston MA 02111-1307, USA; either version 2 of the License, or
10 ;;   (at your option) any later version; incorporated herein by reference.
11 ;;
12 ;; -----------------------------------------------------------------------
13
14 ;;
15 ;; writehex.inc
16 ;;
17 ;; Write hexadecimal numbers to the console
18 ;;
19
20 ;
21 ; writehex[248]: Write a hex number in (AL, AX, EAX) to the console
22 ;
23 writehex2:
24                 pushfd
25                 pushad
26                 rol eax,24
27                 mov cx,2
28                 jmp short writehex_common
29 writehex4:
30                 pushfd
31                 pushad
32                 rol eax,16
33                 mov cx,4
34                 jmp short writehex_common
35 writehex8:
36                 pushfd
37                 pushad
38                 mov cx,8
39 writehex_common:
40 .loop:          rol eax,4
41                 push eax
42                 and al,0Fh
43                 cmp al,10
44                 jae .high
45 .low:           add al,'0'
46                 jmp short .ischar
47 .high:          add al,'A'-10
48 .ischar:        call writechr
49                 pop eax
50                 loop .loop
51                 popad
52                 popfd
53                 ret
54