Deleted Added
full compact
sysdep.c (40883) sysdep.c (42634)
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
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
16#include "ficl.h"
17
18/*
19******************* FreeBSD P O R T B E G I N S H E R E ******************** Michael Smith
20*/
21
22UNS64 ficlLongMul(UNS32 x, UNS32 y)
23{

--- 39 unchanged lines hidden (view full) ---

63 return malloc(size);
64}
65
66void ficlFree (void *p)
67{
68 free(p);
69}
70
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{

--- 39 unchanged lines hidden (view full) ---

66 return malloc(size);
67}
68
69void ficlFree (void *p)
70{
71 free(p);
72}
73
74#ifdef __i386__
75/*
76 * pc! ( port# c -- )
77 * Store a byte to I/O port number port#
78 */
79void
80pc_store(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
71/*
90/*
91 * pc@ ( port# -- c )
92 * Fetch a byte from I/O port number port#
93 */
94void
95pc_fetch(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}
104#endif
105
106/*
72** Stub function for dictionary access control - does nothing
73** by default, user can redefine to guarantee exclusive dict
74** access to a single thread for updates. All dict update code
75** is guaranteed to be bracketed as follows:
76** ficlLockDictionary(TRUE);
77** <code that updates dictionary>
78** ficlLockDictionary(FALSE);
79**

--- 12 unchanged lines hidden ---
107** Stub function for dictionary access control - does nothing
108** by default, user can redefine to guarantee exclusive dict
109** access to a single thread for updates. All dict update code
110** is guaranteed to be bracketed as follows:
111** ficlLockDictionary(TRUE);
112** <code that updates dictionary>
113** ficlLockDictionary(FALSE);
114**

--- 12 unchanged lines hidden ---