From df5769907dbe4524f3bca7604d8f11d325101399 Mon Sep 17 00:00:00 2001 From: albert Date: Mon, 10 Feb 2014 12:44:31 +0000 Subject: [PATCH] The xina version compiles again with nasm. --- ci86.gnr | 23 +++++++++++----- constant_osx.m4 | 70 +++++++++++++++++++++++++------------------------ 2 files changed, 53 insertions(+), 40 deletions(-) diff --git a/ci86.gnr b/ci86.gnr index 88895a5..0157b9c 100644 --- a/ci86.gnr +++ b/ci86.gnr @@ -333,7 +333,10 @@ _LINUX_C_({Called from c. Remainder c-routines to be called from here. extern c_rslw, c_block_exit, c_block_init, c_debug GLOBAL ciforth}) })_C{}_END_({ _HOSTED_LINUX_}) -_HOSTED_OSX_({include(constant_osx.m4) }) +_HOSTED_OSX_({ +include(constant_osx.m4) +RAWIO EQU (ECHO _OR_ ICANON) +})_C{}_END_({ _HOSTED_OSX_}) _PC_({ create EQU 0x3C00 open EQU 0x3D00 @@ -2461,9 +2464,7 @@ CODE_HEADER({DSP!},{SPSTO}) MOV SPO,AX _C{RESET PARAM STACK POINTER} _NEXT _C -dnl Note that this is now in the .lab . -dnl If there are more, this documentation should be in the a lab.mi file. -worddoc( {STACKS},{DEPTH},,{--- n1},{ISO,WANT}, +worddoc( {STACKS},{DEPTH},{depth},{--- n1},{ISO}, {Leave into forthvar({n1}) the number of items on the data stack, before forthvar({n1}) was pushed.}, {{DSP@@}}, @@ -2477,6 +2478,16 @@ _HEADER({DEPTH},{DEPTH},{DOCOL}) DC ONEM DC SEMIS _C +worddoc( {STACKS},{CLS},{c_l_s},{ i*x -- },{}, +{Clear the data stack}, +{{DSP@@}}, +{{ 1 2 3 CLS DEPTH .},{0} }, +enddoc) +_HEADER({CLS},{CLS},{DOCOL}) + DC SZERO, FETCH + DC SPSTO + DC SEMIS +_C dnl was the end of a LOADable option. worddocsafe( {STACKS},{RSP@@},{r_s_p_fetch},{--- addr},{}, {Return the address forthvar({addr}) of the current return @@ -7973,7 +7984,7 @@ _HOSTED_OSX_({ _HEADER({REPOSITION-FILE},{PFILE},{DOCOL}) DC ROT, ROT DC LIT, SEEK_SET, X - DC LIT, _osx_lseek, XOS5 + DC LIT, lseek, XOS5 DC ZERO, MIN DC SEMIS })_C{}_END_({_HOSTED_OSX_}) @@ -9324,7 +9335,7 @@ _C{ Get environment vector} DD LIT, SYSARGS DD SHELL, CELLP DD LIT, 3 - DD LIT, _osx_execve, XOSV + DD LIT, execve, XOSV DC LIT, 49, LERROR, BYE _C{ Returned, this is always wrong.} SYSTEM1: DC LDUP diff --git a/constant_osx.m4 b/constant_osx.m4 index 99b6630..46a0bcf 100644 --- a/constant_osx.m4 +++ b/constant_osx.m4 @@ -2,45 +2,47 @@ _C{ ------------------------------------------------------------ } _C{ Start of constants stolen from C. } _C{ ------------------------------------------------------------ } -SEEK_SET EQU 0x0 -TCGETS EQU 0x5401 -TCSETS EQU 0x5402 -ECHO EQU 0x8 -EAGAIN EQU 0xb -EINTR EQU 0x4 -EPIPE EQU 0x20 -VMIN EQU 0x6 -VTIME EQU 0x5 -ICANON EQU 0x2 -O_RDWR EQU 0x2 -O_RDONLY EQU 0x0 -O_WRONLY EQU 0x1 -O_CREAT EQU 0x40 -O_NONBLOCK EQU 0x800 -SIZE_TERMIO EQU 0x3c +SEEK_SET EQU 0x0 +TCGETS EQU 0x5401 +TCSETS EQU 0x5402 +ECHO EQU 0x8 +EAGAIN EQU 0xb +EINTR EQU 0x4 +EPIPE EQU 0x20 +VMIN EQU 0x6 +VTIME EQU 0x5 +ICANON EQU 0x2 +O_RDWR EQU 0x2 +O_RDONLY EQU 0x0 +O_WRONLY EQU 0x1 +O_CREAT EQU 0x40 +O_NONBLOCK EQU 0x800 +SIZE_TERMIO EQU 0x3c _C{ Numbers of system calls. See "Linux kernel Internals" Appendix A. } _C{ By M.Beck, H. Boehme e.a. Addison Wesley. } _C{ The system calls themselves are extensively documented in chapter } _C{ 2 of the man pages, e.g. "man 2 exit"} -exit EQU 0x1 -open EQU 0x5 -close EQU 0x6 -creat EQU 0x8 -unlink EQU 0xa -chdir EQU 0xc -read EQU 0x3 -select EQU 0x52 -_newselect EQU 0x8e -write EQU 0x4 -ioctl EQU 0x36 -ioperm EQU 0x65 -iopl EQU 0x6e -lseek EQU 0x13 -execve EQU 0xb -fork EQU 0x2 -waitpid EQU 0x7 -pipe EQU 0x2a +exit EQU 0x1 +open EQU 0x5 +close EQU 0x6 +creat EQU 0x8 +unlink EQU 0xa +chdir EQU 0xc +read EQU 0x3 +select EQU 0x52 +_newselect EQU 0x8e +write EQU 0x4 +ioctl EQU 0x36 +ioperm EQU 0x65 +iopl EQU 0x6e +lseek EQU 0xc7 +_C{_osx_lseek EQU 0xc7} +execve EQU 0x3B +_C{_osx_execve EQU 59} +fork EQU 0x2 +waitpid EQU 0x7 +pipe EQU 0x2a _C{ ------------------------------------------------------------ } _C{ End of constants stolen from C. } _C{ ------------------------------------------------------------ }