summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhpa <hpa>2004-02-02 04:26:26 +0000
committerhpa <hpa>2004-02-02 04:26:26 +0000
commitca5d31af26694aaf4db112c2eb6c3f82a65ec672 (patch)
treec41522e8eafe8e271ef727a07be79e0efaa85a9a
parent5714b25131eaab8a1358c8153e654e6312509327 (diff)
downloadsyslinux-ca5d31af26694aaf4db112c2eb6c3f82a65ec672.tar.gz
Write to current video page; "xor al,al" is not a valid test!
-rw-r--r--mbr.asm12
1 files changed, 8 insertions, 4 deletions
diff --git a/mbr.asm b/mbr.asm
index b863224d..7db0b6c8 100644
--- a/mbr.asm
+++ b/mbr.asm
@@ -1,6 +1,6 @@
; -----------------------------------------------------------------------
;
-; Copyright 2003 H. Peter Anvin - All Rights Reserved
+; Copyright 2003-2004 H. Peter Anvin - All Rights Reserved
;
; Permission is hereby granted, free of charge, to any person
; obtaining a copy of this software and associated documentation
@@ -41,13 +41,16 @@
; This MBR should be "8086-clean", i.e. not require a 386.
;
+%include "bios.inc"
+
;
; Note: The MBR is actually loaded at 0:7C00h, but we quickly move it down to
; 0600h.
;
+ section .text
cpu 8086
-
org 0600h
+
_start: cli
xor ax,ax
mov ds,ax
@@ -180,10 +183,11 @@ disk_error:
die:
.msgloop:
lodsb
- xor al,al
+ and al,al
jz .now
mov ah,0Eh ; TTY output
- mov bx,0007h
+ mov bh,[BIOS_page] ; Current page
+ mov bl,07h
int 10h
jmp short .msgloop
.now: