org 0x7c00 ; 告诉编译器程序加载到7c00处 mov ax, cs mov ds, ax mov es, ax call DispStr ; 调用显示字符串例程 jmp $ ; 无限循环 DispStr: mov ax, 0600h mov bx, 0h mov cx, 0h mov dh, 25-1 mov dl, 80-1 ; vga text-mode: 80x25 int 10h ; clear screen mov ax, 0200h mov bx, 0h mov dx, 1326h ; 19=13H, 38=26H int 10h ; set cursor position mov ax, NWPU mov bp, ax ; ES:BP = 串地址, es has been set to the same seg mov cx, 4 ; CX = 串长度 mov ax, 01300h ; AH = 13, AL = 01h mov bx, 00f9h ; 页号为0(BH = 0) 黑底红字(BL = 0Ch,高亮) int 10h ; 10h 号中断 mov ax, 0200h mov bx, 0h mov dx, 0h int 10H ; reset cursor to 0,0 ret NWPU: db "NWPU" times 510-($-$$) db 0 ; 填充剩下的空间,使生成的二进制代码恰好为512字节 dw 0xaa55 ; 结束标志