我使用了第一个扇区中的所有内存,现在我想在第二个扇区(第二个阶段)中存储一个新的变量字符串并打印它.例如:
hello db 'Hello World'
Run Code Online (Sandbox Code Playgroud)
新字符串应该在另一个扇区中(因为第一个扇区中没有更多的内存).我用INT 13h做了这个,啊= 2读取第二个磁盘扇区到地址900h:0000.我将变量存储hello在该扇区以及要打印的代码中.当我在这样的代码中使用INT 10h/ah = 13h时,它无法打印我的字符串:
mov ax, 7c0h
mov es, ax
mov bp, hello
mov ah,13h ; function 13 - write string
mov al,01h ; attrib in bl, move cursor
mov bl,0bh ; attribute - magenta
mov cx,30 ; length of string
mov dh,1 ; row to put string
mov dl,4 ; column to put string
int 10h ; call BIOS service
Run Code Online (Sandbox Code Playgroud)
当变量位于第一个扇区时,它打印得很好,但是当我将它存储在第二个扇区时,它不会打印,即使我这样做:
mov ax, 900h …Run Code Online (Sandbox Code Playgroud)