diff options
author | LAN-TW <lantw44@gmail.com> | 2013-12-04 21:32:57 +0800 |
---|---|---|
committer | LAN-TW <lantw44@gmail.com> | 2013-12-04 21:32:57 +0800 |
commit | 209234c1e607ee307cfa9b776d487df40e1d0290 (patch) | |
tree | aca81746f263d8e1f00a9b01f973795c967d18b8 /basic.s | |
parent | 6b105d56d80b0fbef5f9108f7c0063574febc4a9 (diff) | |
download | yotos-209234c1e607ee307cfa9b776d487df40e1d0290.tar yotos-209234c1e607ee307cfa9b776d487df40e1d0290.tar.gz yotos-209234c1e607ee307cfa9b776d487df40e1d0290.tar.bz2 yotos-209234c1e607ee307cfa9b776d487df40e1d0290.tar.lz yotos-209234c1e607ee307cfa9b776d487df40e1d0290.tar.xz yotos-209234c1e607ee307cfa9b776d487df40e1d0290.tar.zst yotos-209234c1e607ee307cfa9b776d487df40e1d0290.zip |
Diffstat (limited to 'basic.s')
-rw-r--r-- | basic.s | 48 |
1 files changed, 24 insertions, 24 deletions
@@ -1,24 +1,24 @@ -putcharhex: ; bl=argument
- pusha
- mov ah, 0x0e
- mov al, bl
- and al, 0xf0
- shr al, 4
- call fourbit2hex
- int 0x10
- mov al, bl
- and al, 0x0f
- call fourbit2hex
- int 0x10
- popa
- ret
-fourbit2hex: ; al=argument=result
- cmp al, 10
- jae fourbit2hex_alpha
- add al, '0'
- ret
-fourbit2hex_alpha:
- add al, 'A'
- sub al, 10
- ret
-
+putcharhex: ; bl=argument + pusha + mov ah, 0x0e + mov al, bl + and al, 0xf0 + shr al, 4 + call fourbit2hex + int 0x10 + mov al, bl + and al, 0x0f + call fourbit2hex + int 0x10 + popa + ret +fourbit2hex: ; al=argument=result + cmp al, 10 + jae fourbit2hex_alpha + add al, '0' + ret +fourbit2hex_alpha: + add al, 'A' + sub al, 10 + ret + |