我需要为我的操作系统创建一个新的行,因为每次输入命令行都需要一个新的行,但我不知道如何。
我想过只做一堆空格,但这会使下一行间距太大。
实际上你并没有把变成的新行。
你可以从你当前所在的行移动到下一行,通过打印这两个字节1310和:
mov bx, 0007h ; BH is DisplayPage, BL is GraphicsColor
mov ax, 0E0Dh ; AH is Teletype, AL is CarriageReturn
int 10h
mov al, 0Ah ; AL is Linefeed
int 10h
你现在可以做的是清除你到达的行:
mov cx, 80 ; Length of the row (assuming screen is 80x25)
mov bx, 0007h ; BH is DisplayPage, BL is ColorAttribute
mov ax, 0920h ; AH is WriteCharacter, AL is SpaceCharacter
int 10h