|
请大家看看,最简单的bootsec,结果不对。快疯了。
废话就不多说了。
————————————————————————————————————
期望结果:在屏幕在打出
It is a string:
这个字串
+++++++++++++++++++++++++++++++++++++++++++++++++
错误的表现:
乱码!!
_____________________________________________________________
程序:
.text
entry start
start:
.org 0x00
mov ax,#0x07c0
mov ds,ax
mov es,ax
;kill_floppy_monitor:
mov dx,#0x3f2
mov al,#0
outb
;print a test string:
mov ah,#0x03
xor bh,bh
int 0x10
mov ax,#0x07c0
mov es,ax
mov cx,#17
mov bx,#0x0007
mov bp,#msg
mov ax,#0x1301
int 0x10
G_here: jmp G_here
.org 255
msg:
.ascii "it is a string:"
.byte 13,10
.org 508
.word 0x3031
.org 510
.word 0xaa55
____________________________________________________________
将mov ax,#0x07c0
改为mov ax,cs
乱码。为什么??
开机时,不是CS为07c0吗? |
|