summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/pc386/start/start16.S
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-08-14 22:43:10 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-08-14 22:43:10 +0000
commit37bb9bfd027f9ceb5d6293cd4cfa3dce2ac95482 (patch)
tree944d3306d497a572717c161a29f918cefc61d273 /c/src/lib/libbsp/i386/pc386/start/start16.S
parent2002-08-14 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-37bb9bfd027f9ceb5d6293cd4cfa3dce2ac95482.tar.bz2
2002-08-14 Joel Sherrill <joel@OARcorp.com>
* start/start16.S: Per PR259, added code to test for video present before touching the adapter. Eric Norum <eric.norum@usask.ca> tested this patch.
Diffstat (limited to 'c/src/lib/libbsp/i386/pc386/start/start16.S')
-rw-r--r--c/src/lib/libbsp/i386/pc386/start/start16.S6
1 files changed, 6 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/start/start16.S b/c/src/lib/libbsp/i386/pc386/start/start16.S
index a06199ade7..9434c27723 100644
--- a/c/src/lib/libbsp/i386/pc386/start/start16.S
+++ b/c/src/lib/libbsp/i386/pc386/start/start16.S
@@ -54,6 +54,11 @@ _start16:
#if defined(RTEMS_VIDEO_80x50)
+ movl $0x0040,%eax # use 32 bit constant to ensure 16 MSB=0
+ mov %ax,%es
+ movw %es:0x4a, %ax # get 16 bit number of columns
+ cmpw $0, %ax # or 0 if no video adapter
+ je 1f # if no video, skip touching it
/*---------------------------------------------------------------------+
| Switch VGA video to 80 lines x 50 columns mode. Has to be done before
| turning protected mode on since it uses BIOS int 10h (video) services.
@@ -71,6 +76,7 @@ _start16:
movw $0x0007, %cx
int $0x10
++1:
#endif /* RTEMS_VIDEO_80x50 */
/*---------------------------------------------------------------------+