汇编语言实验四,修改名字学号代码详解
DATAS SEGMENT
BUFF1 DB 'zhangsan'
BUFF2 DB '202005795 '
CONAME DB 'SPACE EXPLORERS INC.'
PRLINE DB 20 DUP (' ')
STUDENT_NAME DB 30 DUP(?)
STUDENT_ADDR DB 9 DUP(' ')
PRINT_LINE DB 50 DUP(?)
DATAS ENDS
STACKS SEGMENT
;此处输入堆栈段代码
STACKS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS,SS:STACKS
START:
MOV AX,DATAS
MOV DS,AX
mov es,ax
mov cx,11
lea si,buff1
lea di,STUDENT_NAME
CLD
REP movsb
mov cx,9
lea si,buff2
lea di,STUDENT_ADDR
CLD
REP movsb
mov cx,30
CLD
LEA SI,STUDENT_NAME
LEA DI,PRINT_LINE
REP MOVSB
MOV CX,9
STD
LEA SI,STUDENT_ADDR+8
LEA DI,PRINT_LINE+49
REP MOVSB
MOV AH,4CH
INT 21H
CODES ENDS
END START
直接把数据段的名字学号替换成自己的就ok
本文来自博客园,作者:TCcjx,转载请注明原文链接:https://www.cnblogs.com/tccjx/p/16246087.html