ztc123 发表于 2012-4-19 16:17:47

编译显示寄存器使用非法,怎么搞?头都大了

assume cs:codesg ds:data es:stack
data segment
db 'My name is huangchendong!'
db 'WELLCOME TO MASM!      '
data ends
stack segment
db 16 dup (0)
stack ends
codesg segment
start:
mov ax,data
mov ds:ax
mov ax,stack
mov ss,ax
mov ax,0bf80h
mov es,ax

mov cx,2
mov si,0
mov di,0
mov ax,0
s:push cx
mov cx,25
b:mov al,ds:
mov es:,al
mov byte ptr es:,1ah
inc si
add di,2
loop b
   
add si,6fh
add di,6fh
pop cx
loop s
mov ax,4c00h
int 21h
codesg ends
end start
能告诉我错在哪里ma ?

ztc123 发表于 2012-4-19 16:35:35

++没人看额,不过我明白了

ztc123 发表于 2012-4-19 16:48:35

纠正后的答案:assume cs:codesg ds:data es:stack
data segment
db 'My name is huangchendong!'
db 'WELLCOME TO MASM!      '
data ends
stack segment
db 16 dup (0)
stack ends
codesg segment
start:
mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
mov ax,0b8b4h
mov es,ax

mov cx,2
mov si,0
mov di,0
mov ax,0
s:push cx
mov cx,25
b:mov al,ds:
mov es:,al
mov byte ptr es:,1ah
inc si
add di,2
loop b
   
add di,6eh
pop cx
loop s
x:mov ax,0
jmp short x

codesg ends
end start
页: [1]
查看完整版本: 编译显示寄存器使用非法,怎么搞?头都大了