⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bcd_aaa.asm

📁 介绍用Java解析网络数据的三种特殊方法
💻 ASM
字号:
; This example shows the use
; of AAA instruction (ASCII
; Adjust after Addition).
; It is used to add huge
; BCD numbers.

#make_COM#

ORG     100h

; first number '9':
MOV     AH, 09h

; second number '5':
MOV     AL, 05h

; AL = AL + AH =
;    = 09h + 05h = 0Eh
ADD     AL, AH

; clear tens byte of BCD
; result:
XOR     AH, AH

; adjust result to BCD form,
; AH = 1, AL = 4  ->  '14'
AAA

; print the result:

; store contents of
; AX register:
MOV     DX, AX

; print first digit:
MOV     AH, 0Eh
; convert to ascii:
OR      DH, 30h
MOV     AL, DH
INT     10h

; print second digit:
; convert to ascii:
OR      DL, 30h
MOV     AL, DL
INT     10h


RET

END

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -