Last active
August 19, 2017 17:55
-
-
Save rickyzhang82/213459619364cf7abddca87cda3e0926 to your computer and use it in GitHub Desktop.
test program on page zero mapping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* confdefs.h */ | |
#define PACKAGE_NAME "Basilisk II" | |
#define PACKAGE_TARNAME "BasiliskII" | |
#define PACKAGE_VERSION "1.0" | |
#define PACKAGE_STRING "Basilisk II 1.0" | |
#define PACKAGE_BUGREPORT "Christian.Bauer@uni-mainz.de" | |
#define PACKAGE_URL "" | |
#define STDC_HEADERS 1 | |
#define HAVE_SYS_TYPES_H 1 | |
#define HAVE_SYS_STAT_H 1 | |
#define HAVE_STDLIB_H 1 | |
#define HAVE_STRING_H 1 | |
#define HAVE_MEMORY_H 1 | |
#define HAVE_STRINGS_H 1 | |
#define HAVE_INTTYPES_H 1 | |
#define HAVE_STDINT_H 1 | |
#define HAVE_UNISTD_H 1 | |
#define __EXTENSIONS__ 1 | |
#define _ALL_SOURCE 1 | |
#define _GNU_SOURCE 1 | |
#define _POSIX_PTHREAD_SEMANTICS 1 | |
#define _TANDEM_SOURCE 1 | |
#define PACKAGE "Basilisk II" | |
#define VERSION "1.0" | |
#define HAVE_LIBRT 1 | |
#define HAVE_LIBRT 1 | |
#define HAVE_LIBM 1 | |
#define HAVE_PTHREADS 1 | |
#define HAVE_PTHREAD_COND_INIT 1 | |
#define HAVE_PTHREAD_CANCEL 1 | |
#define HAVE_PTHREAD_TESTCANCEL 1 | |
#define HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL 1 | |
#define HAVE_PTHREAD_MUTEXATTR_SETTYPE 1 | |
#define HAVE_PTHREAD_MUTEXATTR_SETPSHARED 1 | |
#define HAVE_SEM_INIT 1 | |
#define ENABLE_GTK 1 | |
#define STDC_HEADERS 1 | |
#define HAVE_STDLIB_H 1 | |
#define HAVE_STDINT_H 1 | |
#define HAVE_UNISTD_H 1 | |
#define HAVE_FCNTL_H 1 | |
#define HAVE_SYS_TYPES_H 1 | |
#define HAVE_SYS_TIME_H 1 | |
#define HAVE_SYS_MMAN_H 1 | |
#define HAVE_READLINE_READLINE_H 1 | |
#define HAVE_READLINE_HISTORY_H 1 | |
#define HAVE_SYS_SOCKET_H 1 | |
#define HAVE_SYS_IOCTL_H 1 | |
#define HAVE_SYS_BITYPES_H 1 | |
#define HAVE_SYS_WAIT_H 1 | |
#define HAVE_SYS_POLL_H 1 | |
#define HAVE_SYS_SELECT_H 1 | |
#define HAVE_ARPA_INET_H 1 | |
#define HAVE_LINUX_IF_H 1 | |
#define HAVE_LINUX_IF_TUN_H 1 | |
#define HAVE_NET_IF_H 1 | |
#define SIZEOF_SHORT 2 | |
#define SIZEOF_INT 4 | |
#define SIZEOF_LONG 8 | |
#define SIZEOF_LONG_LONG 8 | |
#define SIZEOF_FLOAT 4 | |
#define SIZEOF_DOUBLE 8 | |
#define SIZEOF_LONG_DOUBLE 16 | |
#define SIZEOF_VOID_P 8 | |
#define HAVE_LOFF_T 1 | |
#define HAVE_CADDR_T 1 | |
#define RETSIGTYPE void | |
#define TIME_WITH_SYS_TIME 1 | |
#define HAVE_STRDUP 1 | |
#define HAVE_STRERROR 1 | |
#define HAVE_CFMAKERAW 1 | |
#define HAVE_CLOCK_GETTIME 1 | |
#define HAVE_TIMER_CREATE 1 | |
#define HAVE_SIGACTION 1 | |
#define HAVE_SIGNAL 1 | |
#define HAVE_MMAP 1 | |
#define HAVE_MPROTECT 1 | |
#define HAVE_MUNMAP 1 | |
#define HAVE_POLL 1 | |
#define HAVE_INET_ATON 1 | |
#define HAVE_STRINGS_H 1 | |
#define HAVE_SYS_STAT_H 1 | |
#define HAVE_PTY_H 1 | |
#define HAVE_VHANGUP 1 | |
#define HAVE_SLIRP 1 | |
#define USE_SDL 1 | |
#define USE_SDL_VIDEO 1 | |
#define USE_SDL_AUDIO 1 | |
#define ENABLE_TUNTAP 1 | |
#define HAVE_MMAP_VM 1 | |
#define HAVE_MMAP_ANON 1 | |
#define HAVE_MMAP_ANONYMOUS 1 | |
#define HAVE_MMAP_VM 1 | |
/* end confdefs.h. */ | |
#include "/home/Ricky/repo/github/macemu/BasiliskII/src/CrossPlatform/vm_alloc.cpp" | |
#include <stdio.h> | |
int main(void) { /* returns 0 if we could map the lowmem globals */ | |
volatile char * lm = 0; | |
if (vm_init() < 0) exit(1); | |
if (vm_acquire_fixed(0, 0x2000) < 0) exit(1); | |
lm[0] = 'z'; | |
if (vm_release((char *)lm, 0x2000) < 0) exit(1); | |
vm_exit(); exit(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment