使用word ptr和byte ptr的寻址方式, 修改data段的数值
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
assume cs:code, ds:data data segment db 60h dup(0) db 'DEC' db 'Ken Oslen' dw 137h dw 40h db 'PDP' data ends code segment start: mov ax,data mov ds,ax mov bx,60h mov word ptr [bx+0ch],38h mov word ptr [bx+0eh],70h mov si,0 mov byte ptr [bx+10h],'V' mov byte ptr [bx+11h],'A' mov byte ptr [bx+12h],'X' mov ax,4c00h int 21h code ends end start end |
执行之后的效果