我也试图编写但是遇到几个问题
以下是我的答案,请多指教
assmume cs:code
data segment
dw welcome to masm!
dw welcome to masm!
data ends
code segment
start:mov ax,data
mov ds,ax
mov cs,B800h
MOV BX,0
mov cx,16
s:mov ax,ds:[bx]
mov ah,00100010
mov cs:[bx],ax
add bx,2
loop s
以下同上只是改变个别数字
我知道这个程序有问题,空格怎么处理等》
------解决方案--------------------------------------------------------
data segment
dw welcome to masm!
dw welcome to masm!
data ends
=========================
可以把字符串定义成 "dw "吗?
assmume cs:code
=========================
mov cs,B800h
=========================
mov ah,00100010
=========================
这三句能编译通过吗?
仔细在看看原代码吧,把非逻辑问题解决了再考虑逻辑问题.
------解决方案--------------------------------------------------------
这是我前段时间学习王爽的《汇编语言》时做的练习,希望对楼主有所帮助
assume cs:code
data segment
db 'welcome to masm! '
db 7 dup (00000010b)
db 0
db 2 dup (00100100b)
db 0
db 5 dup (01110001b)
db 0
data ends
code segment
start:mov ax,data
mov ds,ax
mov ax,0b800h
mov es,ax
mov si,0
mov cx,16
s:mov dx,[bx]
mov es:7c0h[si],dx
mov dx,16[bx]
mov es:7c1h[si],dx
inc bx
add si,2
loop s
mov ax,4c00h
int 21h
code ends
end start