sysdep.c (42634) | sysdep.c (42679) |
---|---|
1/******************************************************************* 2** s y s d e p . c 3** Forth Inspired Command Language 4** Author: John Sadler (john_sadler@alum.mit.edu) 5** Created: 16 Oct 1997 6** Implementations of FICL external interface functions... 7** 8*******************************************************************/ 9 10#ifdef TESTMAIN 11#include <stdio.h> 12#include <stdlib.h> 13#else 14#include <stand.h> | 1/******************************************************************* 2** s y s d e p . c 3** Forth Inspired Command Language 4** Author: John Sadler (john_sadler@alum.mit.edu) 5** Created: 16 Oct 1997 6** Implementations of FICL external interface functions... 7** 8*******************************************************************/ 9 10#ifdef TESTMAIN 11#include <stdio.h> 12#include <stdlib.h> 13#else 14#include <stand.h> |
15#endif | |
16#ifdef __i386__ 17#include <machine/cpufunc.h> 18#endif | 15#ifdef __i386__ 16#include <machine/cpufunc.h> 17#endif |
18#endif |
|
19#include "ficl.h" 20 21/* 22******************* FreeBSD P O R T B E G I N S H E R E ******************** Michael Smith 23*/ 24 25UNS64 ficlLongMul(UNS32 x, UNS32 y) 26{ --- 41 unchanged lines hidden (view full) --- 68 69void ficlFree (void *p) 70{ 71 free(p); 72} 73 74#ifdef __i386__ 75/* | 19#include "ficl.h" 20 21/* 22******************* FreeBSD P O R T B E G I N S H E R E ******************** Michael Smith 23*/ 24 25UNS64 ficlLongMul(UNS32 x, UNS32 y) 26{ --- 41 unchanged lines hidden (view full) --- 68 69void ficlFree (void *p) 70{ 71 free(p); 72} 73 74#ifdef __i386__ 75/* |
76 * pc! ( port# c -- ) | 76 * outb ( port# c -- ) |
77 * Store a byte to I/O port number port# 78 */ 79void | 77 * Store a byte to I/O port number port# 78 */ 79void |
80pc_store(FICL_VM *pVM) | 80ficlOutb(FICL_VM *pVM) |
81{ 82 u_char c; 83 u_int32_t port; 84 85 port=stackPopUNS32(pVM->pStack); 86 c=(u_char)stackPopINT32(pVM->pStack); 87 outb(port,c); 88} 89 90/* | 81{ 82 u_char c; 83 u_int32_t port; 84 85 port=stackPopUNS32(pVM->pStack); 86 c=(u_char)stackPopINT32(pVM->pStack); 87 outb(port,c); 88} 89 90/* |
91 * pc@ ( port# -- c ) | 91 * inb ( port# -- c ) |
92 * Fetch a byte from I/O port number port# 93 */ 94void | 92 * Fetch a byte from I/O port number port# 93 */ 94void |
95pc_fetch(FICL_VM *pVM) | 95ficlInb(FICL_VM *pVM) |
96{ 97 u_char c; 98 u_int32_t port; 99 100 port=stackPopUNS32(pVM->pStack); 101 c=inb(port); 102 stackPushINT32(pVM->pStack,c); 103} --- 23 unchanged lines hidden --- | 96{ 97 u_char c; 98 u_int32_t port; 99 100 port=stackPopUNS32(pVM->pStack); 101 c=inb(port); 102 stackPushINT32(pVM->pStack,c); 103} --- 23 unchanged lines hidden --- |