CS代码段寄存器
DS数据段寄存器
ES附加段寄存器
SS堆栈段寄存器
当我们要向一个内存里面读数据或者写数据的时候。
mov ax,0x07c0
jmp near mycode
mydata:
db
'H',0x7,'e',0x7,'l',0x7,'l',0x7,'o',0x7
mycode:
mov ax,0xb800
mov
es,ax
mov al, byte [0x07c00+mydata+0x00]
mov byte
[es:0x0000],al
mov al, byte [0x07c00+mydata+0x01]
mov byte
[es:0x0001],al
mov al, byte [0x07c00+mydata+0x02]
mov byte
[es:0x0002],al
mov al, byte [0x07c00+mydata+0x03]
mov byte
[es:0x0003],al
mov al,byte [0x07c00+mydata+0x04]
mov byte
[es:0x0004],al
mov al, byte [0x07c00+mydata+0x05]
mov byte
[es:0x0005],al
mov al, byte [0x07c00+mydata+0x06]
mov byte
[es:0x0006],al
mov al, byte [0x07c00+mydata+0x07]
mov byte
[es:0x0007],al
mov al, byte [0x07c00+mydata+0x08]
mov byte
[es:0x0008],al
mov al, byte [0x07c00+mydata+0x09]
mov byte
[es:0x0009],al
stop: jmp near stop
times 510-($-$$) db
0
dw 0xAA55
![]()