<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Ubixos: btxv86.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.3 -->
<h1>btxv86.h</h1><div class="fragment"><pre>00001 <span class="comment">/*</span>
00002 <span class="comment"> * Copyright (c) 1998 Robert Nordier</span>
00003 <span class="comment"> * All rights reserved.</span>
00004 <span class="comment"> *</span>
00005 <span class="comment"> * Redistribution and use in source and binary forms are freely</span>
00006 <span class="comment"> * permitted provided that the above copyright notice and this</span>
00007 <span class="comment"> * paragraph and the following disclaimer are duplicated in all</span>
00008 <span class="comment"> * such forms.</span>
00009 <span class="comment"> *</span>
00010 <span class="comment"> * This software is provided "AS IS" and without any express or</span>
00011 <span class="comment"> * implied warranties, including, without limitation, the implied</span>
00012 <span class="comment"> * warranties of merchantability and fitness for a particular</span>
00013 <span class="comment"> * purpose.</span>
00014 <span class="comment"> */</span>
00015
00016 <span class="comment">/*</span>
00017 <span class="comment"> * $FreeBSD: src/sys/boot/i386/btx/lib/btxv86.h,v 1.5 1999/08/28 00:40:08 peter Exp $</span>
00018 <span class="comment"> */</span>
00019
00020 <span class="preprocessor">#ifndef _BTXV86_H_</span>
00021 <span class="preprocessor"></span><span class="preprocessor">#define _BTXV86_H_</span>
00022 <span class="preprocessor"></span>
00023 <span class="preprocessor">#include <sys/types.h></span>
00024
00025 <span class="preprocessor">#define V86_ADDR 0x10000 </span><span class="comment">/* Segment:offset address */</span>
00026 <span class="preprocessor">#define V86_CALLF 0x20000 </span><span class="comment">/* Emulate far call */</span>
00027 <span class="preprocessor">#define V86_FLAGS 0x40000 </span><span class="comment">/* Return flags */</span>
00028
00029 <span class="keyword">struct </span>__v86 {
00030 uint32_t ctl; <span class="comment">/* Control flags */</span>
00031 uint32_t addr; <span class="comment">/* Interrupt number or address */</span>
00032 uint32_t es; <span class="comment">/* V86 ES register */</span>
00033 uint32_t ds; <span class="comment">/* V86 DS register */</span>
00034 uint32_t fs; <span class="comment">/* V86 FS register */</span>
00035 uint32_t gs; <span class="comment">/* V86 GS register */</span>
00036 uint32_t eax; <span class="comment">/* V86 EAX register */</span>
00037 uint32_t ecx; <span class="comment">/* V86 ECX register */</span>
00038 uint32_t edx; <span class="comment">/* V86 EDX register */</span>
00039 uint32_t ebx; <span class="comment">/* V86 EBX register */</span>
00040 uint32_t efl; <span class="comment">/* V86 eflags register */</span>
00041 uint32_t ebp; <span class="comment">/* V86 EBP register */</span>
00042 uint32_t esi; <span class="comment">/* V86 ESI register */</span>
00043 uint32_t edi; <span class="comment">/* V86 EDI register */</span>
00044 };
00045
00046 <span class="keyword">extern</span> <span class="keyword">struct </span>__v86 __v86; <span class="comment">/* V86 interface structure */</span>
00047 <span class="keywordtype">void</span> __v86int(<span class="keywordtype">void</span>);
00048
00049 <span class="preprocessor">#define v86 __v86</span>
00050 <span class="preprocessor"></span><span class="preprocessor">#define v86int __v86int</span>
00051 <span class="preprocessor"></span>
00052 <span class="keyword">extern</span> u_int32_t __base;
00053 <span class="keyword">extern</span> u_int32_t __args;
00054
00055 <span class="preprocessor">#define PTOV(pa) ((caddr_t)(pa) - __base)</span>
00056 <span class="preprocessor"></span><span class="preprocessor">#define VTOP(va) ((vm_offset_t)(va) + __base)</span>
00057 <span class="preprocessor"></span><span class="preprocessor">#define VTOPSEG(va) (u_int16_t)(VTOP((caddr_t)va) >> 4)</span>
00058 <span class="preprocessor"></span><span class="preprocessor">#define VTOPOFF(va) (u_int16_t)(VTOP((caddr_t)va) & 0xf)</span>
00059 <span class="preprocessor"></span>
00060 <span class="keywordtype">void</span> __exit(<span class="keywordtype">int</span>) __attribute__((__noreturn__));
00061 <span class="keywordtype">void</span> __exec(caddr_t, ...);
00062
00063 <span class="preprocessor">#endif </span><span class="comment">/* !_BTXV86_H_ */</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed Apr 28 17:49:31 2004 for Ubixos by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
</a>1.3.3 </small></address>
</body>
</html>