;指向文本模式的显示缓冲区 mov ax, 0xb800 mov es, ax ;输出"hello" mov byte [es:0x00], ‘h‘ mov byte [es:0x01], 0x07 mov byte [es:0x02], ‘e‘ mov byte [es:0x03], 0x07 mov byte [es:0x04], ‘l‘ mov byte [es:0x05], 0x07 mov byte [es:0x06], ‘l‘ mov byte [es:0x07], 0x07 mov byte [es:0x08], ‘o‘ mov byte [es:0x09], 0x07 ;输出空格 mov byte [es:0x0A], ‘ ‘ mov byte [es:0x0B], 0x07 ;输出"world" mov byte [es:0x0C], ‘w‘ mov byte [es:0x0D], 0x07 mov byte [es:0x0E], ‘o‘ mov byte [es:0x0F], 0x07 mov byte [es:0x10], ‘r‘ mov byte [es:0x11], 0x07 mov byte [es:0x12], ‘l‘ mov byte [es:0x13], 0x07 mov byte [es:0x14], ‘d‘ mov byte [es:0x15], 0x07 ;无限循环 infinite:jmp near infinite ;填充主引导扇区 times 370 db 0 ;填充结束标记 db 0x55, 0xAA
时间: 2024-10-08 10:42:27