4_9.ASM
资源名称:huibian.rar [点击查看]
上传用户:xinbaokeji
上传日期:2022-07-05
资源大小:295k
文件大小:1k
源码类别:
汇编语言
开发平台:
Visual C++
- DATA SEGMENT
- STRING DB 'abcduvwxyz',0DH
- LL DB ?
- CR EQU 0DH
- DATA ENDS
- STACK SEGMENT PARA STACK 'STACK'
- DB 100 DUP(?)
- STACK ENDS
- CODE SEGMENT
- ASSUME CS:CODE,DS:DATA,ES:DATA,SS:STACK
- START PROC FAR
- BEGIN: PUSH DS
- MOV AX,0
- PUSH AX
- MOV AX,DATA
- MOV DS,AX ;DATA→AX
- MOV ES,AX
- LEA DI,STRING ;SET ADDRESS POINTER
- MOV DL,0
- MOV AL,CR
- AGAIN: SCASB ;
- JE DONE
- INC DL ;
- JMP AGAIN
- DONE: LEA BX,LL;
- MOV [BX],DL
- RET
- START ENDP
- CODE ENDS ;
- END BEGIN