data segment
asc1 db '11'
asc2 db '3734'
asc3 db '00000'
data ends
stack segment stack 'STACK'
db 128 dup(0)
stack ends
code segment
assume cs:code,ds:data,ss:stack
START:
mov ax,data
mov ds,ax
mov si,offset asc1+1
mov di,offset asc2+3
mov bx,offset asc3+4
mov cx,4
clc ;CF清零
pushf
LOP0:
;0判断
cmp si,offset asc1
jge lop2
jle lop3
lop2:mov al,[si]
jmp lop4
lop3:mov al,0
lop4:
mov dl,[di]
mov ah,0
popf
adc al,dl
aaa
pushf
mov [bx],al
dec si
dec di
dec bx
dec cx
cmp cx,0
jg LOP0
mov [bx],ah
;输出
mov di,offset asc3
mov cx,5
lop1:
add [di],30h
mov dl,[di]
mov ah,2
int 21h
inc di
dec cx
cmp cx,0
jg lop1
mov ah,4ch
int 21h
code ends
end START
asc1 db '11'
asc2 db '3734'
asc3 db '00000'
data ends
stack segment stack 'STACK'
db 128 dup(0)
stack ends
code segment
assume cs:code,ds:data,ss:stack
START:
mov ax,data
mov ds,ax
mov si,offset asc1+1
mov di,offset asc2+3
mov bx,offset asc3+4
mov cx,4
clc ;CF清零
pushf
LOP0:
;0判断
cmp si,offset asc1
jge lop2
jle lop3
lop2:mov al,[si]
jmp lop4
lop3:mov al,0
lop4:
mov dl,[di]
mov ah,0
popf
adc al,dl
aaa
pushf
mov [bx],al
dec si
dec di
dec bx
dec cx
cmp cx,0
jg LOP0
mov [bx],ah
;输出
mov di,offset asc3
mov cx,5
lop1:
add [di],30h
mov dl,[di]
mov ah,2
int 21h
inc di
dec cx
cmp cx,0
jg lop1
mov ah,4ch
int 21h
code ends
end START
这个貌似不是很懂啊,不知道写的什么。可能是接触不多吧。
膜拜一下。我写C都有难度。
Java呢?