diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-11-05 02:14:19 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-11-05 02:14:19 +0000 |
commit | 325caac076b7e09a00f748993658c4228570d84d (patch) | |
tree | ea074081658374ec02a96d1d077ca7b7ff6e62db /sys/arch/i386 | |
parent | 07334dbfd1dcd5f684cb9415b763f04c48ad9738 (diff) |
define puts()
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/stand/mbr/mbr.S | 37 |
1 files changed, 14 insertions, 23 deletions
diff --git a/sys/arch/i386/stand/mbr/mbr.S b/sys/arch/i386/stand/mbr/mbr.S index 1c880a41656..173684a720f 100644 --- a/sys/arch/i386/stand/mbr/mbr.S +++ b/sys/arch/i386/stand/mbr/mbr.S @@ -1,4 +1,4 @@ -/* $OpenBSD: mbr.S,v 1.11 1997/08/29 19:47:24 mickey Exp $ */ +/* $OpenBSD: mbr.S,v 1.12 1997/11/05 02:14:18 mickey Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff and Tobias Weingartner @@ -66,6 +66,12 @@ #else /* !DEBUG */ #define DBGMSG(msg) #endif /* !DEBUG */ +#define puts(s) \ + data32; \ + movl $s, %esi; \ + /* call Lmessage */; \ + .byte 0xe8; \ + .word Lmessage - . - 2 .text @@ -161,10 +167,7 @@ reloc: * and then hardcode the boot drive to * 0x80. */ - data32 - movl $fdmbr, %esi - data32 - call message + puts(fdmbr) /* If we are passed bogus data, set it to HD #1. * We should load the value from a hard coded @@ -187,10 +190,7 @@ reloc: .word signature .word DOSMBR_SIGNATURE je sigok - data32 - movl $esig, %esi - data32 - call message + puts(esig) /* find the first active partition * Note: this should be the only active @@ -216,10 +216,7 @@ sigok: /* No bootable partition */ no_part: - data32 - movl $noboot, %esi - data32 - call message + puts(noboot) err_stop: cli hlt @@ -274,18 +271,12 @@ found: xorl %bx, %bx /* put it at %es:0 */ int $0x13 jnc 1f - data32 - movl $eread, %esi - data32 - call message + puts(eread) jmp err_stop 1: DBGMSG(CHAR_G) - data32 - movl $info, %esi - data32 - call message + puts(info) # jump to the new code (%ds:%si is at the right point) data32 @@ -295,7 +286,7 @@ found: /* * Display string */ -message: +Lmessage: pushl %eax cld 1: @@ -307,7 +298,7 @@ message: jmp 1b # -# message: write the error message in %ds:%si to console +# chr: write the error message in %ds:%si to console # chr: pushl %eax |