*/ // [11/1/2014 JmingS] /* 汇编里,如何用子程序。。。(小例子) // 例子:小写字母 -> 大写字母 // 子程序:实现换行 */
stack segment stack
db 1024 dup(?)
stack ends
data segment
data ends
code segment 'code'
assume ss:stack, ds:data, cs:code
start:
mov ax, data
mov ds, ax
mov ah, 1h
int 21h
call dpcrlf
sub al, 20h
mov ah, 02h
mov dl, al
int 21h
mov ah, 4ch
int 21h
dpcrlf proc
push ax
push dx
mov ah, 2
mov dl, 0dh
int 21h
mov ah, 2
mov dl, 0ah
int 21h
pop dx
pop ax
ret
dpcrlf endp
code ends
end start