汇编illegal indexing mode
data segment
buff db 255,0,255 dup(0)
plus db 255 dup(0),'$'
minus db 255 dup(0),'$'
data ends
stack segment stack'stack'
dw 255 dup(0)
stack ends
code segment
assume ss:stack,ds:data,cs:code
main proc far
start: push ds
sub ax,ax
push ax
mov ax,data
mov ds,ax
mov dx,offset buff
mov ah,0ah
int 21h
mov bx,dx
mov cl,[bx+1]
add dx,2
mov di,offset plus
mov bx,offset minus
goon: mov al,[dx]
test al,80h
jnz min
mov [di],al
inc di
jmp again
min: mov [bx],al
inc bx
again:inc dx
loop goon
mov dx,offset plus
mov ah,9
int 21h
mov dx,offset minus
mov ah,9
int 21h
ret
main endp
code ends
end start
其他:stack segment stack'stack'
dw 255 dup(0)
stack ends
有错误
stack segment
dw 255 dup(0)
stack ends
上一个:汇编中 11:JMP 11是什么意思(11是标号)
下一个:汇编中ds的设置