offset问题
assume cs:codecode segment
start:
mov ax,cs
mov ds,ax
mov si,offset capital
mov ax,0
mov es,ax
mov di,200h
mov cx,offset capitalend - offset capital
cld
rep movsb
mov ax,0
mov es,ax
mov word ptr es:,200h
mov word ptr es:,0
mov ax,4c00h
int 21h
capital:
push cx
push si
change:
mov cl,
mov ch,0
jcxz ok
and byte ptr ,11011111b
inc si
jmp short change
ok:
pop si
pop cx
iret
capitalend:nop
code ends
end start
offset capitalend - offset capital等于多少,这个标号地址怎么算啊?希望详细点谢谢 assume cs:code
code segment
start:
mov ax, cs
mov ds, ax
mov si, offset capital
mov di, offset capital
mov cx, offset capitalend - offset capital
mov ax,4c00h
int 21h
capital:
push cx
push si
pop si
pop cx
iret
capitalend:nop
code ends
end start
我晕,居然忘记改了 ^_^
抱歉,上面的不对,看这个
assume cs:code
code segment
start:
mov ax, cs
mov ds, ax
mov si, offset capital
mov di, offset capitalend
mov cx, offset capitalend - offset capital
mov ax,4c00h
int 21h
capital:
push cx
push si
pop si
pop cx
iret
capitalend:nop
code ends
end start
人造人 发表于 2018-2-7 18:47
我晕,居然忘记改了 ^_^
抱歉,上面的不对,看这个
谢谢{:5_106:}
页:
[1]