28,30d27 < /* Print message string */ < #define MSG(x) movw $x, %si; call LOCAL(message) < 130a128 > movw %ax, %es /* BERO PATCH */ 132d129 < 136a134,171 > > /* BERO PATCH BEGIN */ > pusha > movw $0x03,%ax > int $0x10 > popa > cli > movb $0x79,%al > outb %al,$0x70 > nop > nop > nop > inb $0x71,%al > sti > andb $0x08,%al > jnz normalboot > cld > movw $winstart,%si > movw $0x0600,%di > winlength = winend - winstart + 1 > movw $winlength,%cx > rep movsb > movw $part_start,%si > ljmp $0x0060,$0x0 > winstart: > pushl $0x0 > pushl 0x08(%si) > pushw $0x0 > pushw $0x7c00 > pushw $0x1 > pushw $0x10 > movw %sp,%si > movw $0x4200,%ax > int $0x13 > ljmp $0x0,$0x7c00 > winend: > normalboot: > /* BERO PATCH END */ 149,151d183 < /* print a notification message on the screen */ < MSG(notification_string) < 363,368d394 < MSG(geometry_error_string) < jmp LOCAL(general_error) < < /* < * Disk probe failure. < */ 370,375d395 < MSG(hd_probe_error_string) < jmp LOCAL(general_error) < < /* < * Read error on the disk. < */ 377,378d396 < MSG(read_error_string) < 380,381d397 < MSG(general_error_string) < 388,414d403 < notification_string: .asciz "GRUB " < geometry_error_string: .asciz "Geom" < hd_probe_error_string: .asciz "Hard Disk" < read_error_string: .asciz "Read" < general_error_string: .asciz " Error\r\n" < < /* < * message: write the string pointed to by %si < * < * WARNING: trashes %si, %ax, and %bx < */ < < /* < * Use BIOS "int 10H Function 0Eh" to write character in teletype mode < * %ah = 0xe %al = character < * %bh = page %bl = foreground color (graphics modes) < */ < 1: < movw $0x0001, %bx < movb $0xe, %ah < int $0x10 /* display a byte */ < LOCAL(message): < lodsb < cmpb $0, %al < jne 1b /* if not end of string, jmp to display */ < ret < 459d447 < MSG(fd_probe_error_string) 462,464d449 < /* "Floppy" */ < fd_probe_error_string: .asciz "Floppy" <