File:  [RetroPC.NET] / np2 / bios / Attic / bios02.c
Revision 1.1: download - view: text, annotated - select for diffs
Fri Oct 17 02:58:19 2003 JST (22 years ago) by yui
Branches: MAIN
CVS tags: HEAD
Initial revision

#include	"compiler.h"
#include	"i286.h"
#include	"memory.h"
#include	"pccore.h"
#include	"iocore.h"
#include	"bios.h"


// NP2上では MEMORYエラーにならないから不要

static const char msg1[] = "PARITY ERROR - ";
static const char msg2[] = "BASE";
static const char msg3[] = "EXTENDED";
static const char msg4[] = " MEMORY";


static UINT16 textout(UINT16 ptr, const char *str) {

	while(*str) {
		i286_membyte_write(0xa000, ptr, *str);
		i286_membyte_write(0xa200, ptr, 0x43);
		str++;
		ptr += 2;
	}
	return(ptr);
}

void bios0x02(void) {

	BYTE	r;
	UINT16	ptr;

	r = iocore_inp8(0x33);
	if (r & 0x06) {
		ptr = textout(0, msg1);
		if (r & 0x04) {
			ptr = textout(ptr, msg2);
		}
		else {
			ptr = textout(ptr, msg3);
		}
		textout(ptr, msg4);
		mem[0x004f8] = 0xfa;		// cli
		mem[0x004f9] = 0xf4;		// hlt
		I286_CS = 0;
		I286_IP = 0x4f8;
	}
}


RetroPC.NET-CVS <cvs@retropc.net>