显示一个字符串 Dseg segment String db 'hello,girl$' Dseg ends Cseg segment Assume ds:dseg,cs:cseg Start: Mov ax,dseg Mov ds,ax Lea dx,string Mov ah,09h Int 21h Mov ah,4ch Int 21h Cseg ends End star 变量的定义和应用 dseg segment bvar1 db 100,000101b,64h,'d'; minint =5; bvar2 db -1,minint,minint+5; db ?,2 dup(20h); wvar dw 2013h,4*4; wvar2 dw ?; dvar dd 12347777h,87651111h,?; abc db 'a','b','c',?; maxint equ 0ah; string db 'ABCDEFGHIJ'; crlfs db 13,10,'$'; array1 dw maxint dup(0); array db 2 dup(2,3,2 dup(4)); dseg ends cseg segment assume ds:dseg,cs:cseg start: mov ax,dseg mov ds,ax mov dl,bvar1 dec bvar2+1 mov abc[3],dl mov ax,word ptr dvar[0] mov dx,word ptr dvar[2] mov ax,word ptr dvar[4] mov ax,word ptr dvar[6] mov word ptr dvar[8],ax mov word ptr dvar[10],dx mov cx,maxint mov bx,0 again: add string[bx],3 inc bx loop again lea dx,abc mov ah,09h int 21h mov ah,4ch int 21h cseg ends end star