Files
Digital-Research-Source-Code/CPM OPERATING SYSTEMS/CPM 68K/1.2 SOURCE IMG/68_12_04.img
Sepp J Morris 31738079c4 Upload
Digital Research
2020-11-06 18:50:37 +01:00

4446 lines
250 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹SETJMP H SBRK C ERRNO H PORTAB H 
WRITEL C DOSCAN C H」、・ヲァィゥェォFILBUF C ャュョCLEANUP C PERROR C qrstFREOPEN C uvwxREADL C yCREAT C z{|}he programmer sees a return from the */
/* previous "setjmp" as the result. */
/* */
/* Calling sequenMALLOCDBC <=>NOBINARYC ?NOASCII C @NOLONG C ADigital Research. All rights reserved. */
/* */
/* Long jumps are implemented as follows: */
/* STDIO H 
OSIFERR H SIGNAL H SGTTY H PRTSHORTC ーアFFLUSH C イウエFPUTN C オカFPUTS C キクBLKFILL C
~FILESZ C "€≠ヤFGETC C
<EFBFBD>CLOSE C ㊧炎ce: */
/* */
/* #include <setjmp.h> (definitions) */
/* jmp_buf env; (define a buffer for saved BLKIO C *BCDEFGLSTOUT C HIEXEC C JKLFLSBUF C MNOP */
/* 1). Routine "setjmp" is called to setup a special */
/* buffer for return. The return address, stack OPTION H .CTYPE H OSIF H [ !"#$%&'WRITEBINC 6()*+,-.CALLOC C ケコFDOPEN C サシスFTELL C セソタMAIN C チツテCHKUSER C <>DOPRTFP C :誌髄駐舶STRLEN C <06>EXIT C
stuff) */
/* */
/* setjmp(env); */
/* a: */
/* */
/* longjmp(env,val); FPUTC C QRXMAIN C MSTUVWXYZ[\OSATTR C ]^_`READBIN C 1abcdefg */
/* pointer and frame pointer are saved. This allows */
/* the calling program to do the proper number of */
C SUB/CLINK SUB0NOFILESZC 1NOFLOAT C 2/****************************************************************************/
/* */
/* L o n g j u m p H eCTYPE C <>FCLOSE C FDECLS C
FSEEK C <0F> */
/* */
/* Setjmp returns a WORD of 0 on first call, and "val" on the */
/* subsequent "longjmp" callPRTLD C
hiATOI C jYESSTARTC kFOPEN C "lmnop
/* "pops". */
/* */
/* 2). At some later time, the procedure "longjmp" is */
/* called. TNODISK C 3NOTTYIN C 456REAR SUB789NOSTART C :; a d e r F i l e */
/* --------------------------------------- */
/* */
/* Copyright 1982,83 by . The longjmp call causes execution to */
/* resume at "a:" above. */
/* */
/***********************ude "portab.h"
#include "osif.h"
#include "osiferr.h"
#include "errno.h"
/****************************/
EXTERN BYTE *
*
* addr = sbrk(incr);
*
* Where:
* incr Is the incremental numincr); /* Initialize to 0's */
return(t1); /* And return */
} /****************************/
裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹 the old break */
t2 = _break + inc; /* New break value */
/****************************/
if(brk(t2) == FAI*****************************************************/
typedef long jmp_buf[13];
_break; /* Old break address */
/****************************/
BYTE * sbrk(incr) /* CLEAR FUNCTION ***********/ber of bytes to be added to
* the program heap area.
*
* addr Is the beginning address of the aX<>>シ/<NケX<>>シ/<NケX<>#<23>By.シaレ n2n ムノB*nJg(H€Hタミシ @g
H€ミ| `H€€R港ヤ*n/***************************************************************************
*
* s b r k F u n c t i oLURE) /* Allocate */
RETERR(FAILURE,ENOMEM); /* Can't */
/****************************/
blkfill(t1,NULL****************************************************/
typedef long jmp_buf[13];

WORD incr; /* Incremental storage */
/* */
{ /****************************/
REG BYTE *t1,*t2; /*llocated area.
* -1 is returned if allocation failed
*
* Last modified:
* 1/84 whf refresh incJgJgH€Hタミシ @gR港腴g<01> "g 'fDH€>€/
R湧ケX<>(@ f.シ/
a<> 錐> M2GムノBRG.抗預&`械G M2G n
* -------------------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
,incr); /* Initialize to 0's */
return(t1); /* And return */
} /****************************/
****************************************************/
typedef long jmp_buf[13];
 Temporary */
REG LONG inc; /* Temp size increment */
inc = ((LONG)incr) & 0xffffL; /* Un sign-extend */
ilude files for 68K (sbrk in asm for 8086)
****************************************************************************/
#inclムノJg5pH€Hタミシ @fRG`ワJ5pg
M2GムノBRGH€`8BWNケBW/
R湧ケX繍@g.抗<>/<a\X汁>シNケBW/
R湧ケX床| *
* The "sbrk" function is used to allocate memory dynamically.
*
* Calling Sequence: incr); /* Initialize to 0's */
return(t1); /* And return */
} /****************************/
裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹f(inc & 1) /* Disallow odd incr's */
inc++; /* Round up to next */
/* */
t1 = _break; /* Saveg.抗<>/<a*X汁<00>>シ?/
NケX繍€f>シ*/
NケX繍€gェ(|.<2E><06>4?<NケT<>>シ/
?<Nケ\<5C>シ<<00>f.シ./
aセX盾RL21<00>|L22<00>L18<00>廰23<00>€L24<00>ョL25<00>L26<00>イL10004<00>リL27<00>ftware */
#define EDOM 33
#define ERANGE 34
/* hereafter is available to CP/M specials */
#define ENODSPC 35
#define EREN. All rights reserved.
*
* This is an include file for assisting the user to write portable
* programs for C. All processorne ENXIO 6
#define E2BIG 7
#define ENOEXEC 8
#define EBADF 9
#define ECHILD 10
#define EAGAIN 11
#define ENOMEM 12
#defin<00>豊39<00><04><00>,l,l,l<LD4シ<<00>g^.<2E><06><><EFBFBD><EFBFBD>H€?/ a>\<5C>.<2E><06><><EFBFBD>祚ケ>€RWNケ&@.<2E><06><><EFBFBD><EFBFBD>/ NケX<>.蟻ホ>シ/
?<Nケ\<5C>`彖.溝ー`ー|<g<00>トー|>g<00>€L28<00>L29<00>.L31<00>L30<00>~__toascpL32<00><02>7<00>廰1<00>ハ~~_err<00>AME 36
/****** end of errno.h ******/
 dependencies should be located here.
*
****************************************************************************/
/*
* e EACCES 13
#define EFAULT 14
#define ENOTBLK 15
#define EBUSY 16
#define EEXIST 17
#define EXDEV 18
#define ENODEV 19
#d$$<07>レヌ`<00>魲預惨y.ケ?9NケT<>>€NケJ櫚゚8タN^NuNV<4E><56>.ョNケ>€/.?<Nケ\<5C>.ョ Nケ>€/. ?<Nケ\<5C>>シ/<9ヤ~s1~s2 L35<00>9L34<00>0~~addarg<72>4~ptr
L38<00>^L37<00>f~~_toasc<73>pME 36
/****** end of errno.h ******/
Standard type definitions
*/
#define BYTE char /* Signed byte */
#define UBYTE char /* Unsigned byte */
#defiefine ENOTDIR 20
#define EISDIR 21
#define EINVAL 22
#define ENFILE 23
#define EMFILE 24
#define ENOTTY 25
#define ETXTBSY/****************************************************************************
*
* C P / M C R U N T I M E L I B H ?<Nケ\<5C>>シ<><EFBDBC>NケN^NuNVH<> *n(y.ケX湧ケJ@gNケ(抗yJ櫚゚0N^NuNVH<>*n.
(n&MH€<48>Hタラタラ<EFBE80>4B.シ~f ~buf L40<00>ミL41<00>;L42<00>メL43<00>Ⅲ44<00>鶚46<00><03>45<00>HL4ME 36
/****** end of errno.h ******/
ne BOOLEAN int /* 2 valued (true/false) */
#define WORD int /* Signed word (16 bits) */
#define UWORD unsigned int 26
#define EFBIG 27
#define ENOSPC 28
#define ESPIPE 29
#define EROFS 30
#define EMLINK 31
#define EPIPE 32
/* math soE A D E R F I L E
* -------------------------------------------------------------
* Copyright 1982 by Digital Research Inc
/*
* errno.h - error codes
*/
#define EPERM 1
#define ENOENT 2
#define ESRCH 3
#define EINTR 4
#define EIO 5
#defi8<00>DL10005<00>8L10007<00>BL47<00>DL50<00>NL49<00>哭52<00>豊10008<00>貝10010<00>猫51 /* unsigned word */
#define LONG long /* signed long (32 bits) */
#define ULONG unsigned long /* Unsigned long ************************************************/
#define EOF (-1) /* EOF Value */
#define TRUE (1) /* Function TRUE value */
#define FALSE (0) /* Function FALS*******************************************************
* Stream I/O File Definitions
************************************************************************/
/* Miscellaneous Definitions: */
/**************************************************/*****************************************************************************
*
* C P / M C H E A D E R F I L E
* */
#define REG register /* register variable */
#define LOCAL auto /* Local var on 68000 */
#define EXTERN ex<00>ャL26<00>ヒL27<00><01><,E value */
/****************************************************************************/
/****************************************************************/
#define BUFSIZ 512 /* Standard (ascii) buf size */
#define MAXFILES 16 /* Max # op**************************/
#define FAILURE (-1) /* Function failure return val */
#define SUCCESS (0) /* Function success -----------------------------------
* Copyright 1982,83 by Digital Research Inc. All rights reserved.
*
* This is the tern /* External variable */
#define MLOCAL static /* Local to module */
#define GLOBAL /**/ /* Global variable,<,,$$*************************************************/
en files ( < 32 ) */
struct _iobuf { /* */
WORD _fd; /* file descriptor for low level io */
WORD _flag; /* return val */
#define YES 1 /* "TRUE" */
#define NO 0 /* "FALSE" */
#define FOREVER for(;;) /* Infinite lostandard include file for the CP/M C Run Time Library.
*
********************************************************************* */
#define VOID /**/ /* Void function return */
#define DEFAULT int /* Default size */
#define FLOAT float <,4************************************************/
stream info flags */
BYTE *_base; /* base of buffer */
BYTE *_ptr; /* current r/w pointer */
WORD _cnt;op declaration */
#define NULL 0 /* Null character value */
#define NULLPTR (char *) 0 /* Null pointer value */
********/
/* */
#include <portab.h> /* Portability Definitions */
/* */
/********************* /* Floating Point */
#define DOUBLE double /* Double precision */
/******************************************** /* # chars to be read/have been wrt */
}; /* */
#ifndef FILE /* conditionally include: */
extern struct **********************/
/* */
/* M A C R O S */
/* ----------- */
/* */
/* Defierr(p) ((p)->_flag &= ~_IOERR) /* clear error flag */
#define feof(p) ((p)->_flag & _IOEOF) /* EOF encountered on stream <20>_strlen<00>_petoa<00>_pftoa<00>__doprt~~_doprt<72>L2<00>~longf<00><><EFBFBD>艤nchrs<00><><EFBFBD>閙widthdefine _IOEOF 0x20 /* EOF has occurred */
#define _IOLBUF 0x40 /* handle as line buffer */
#define _IOSTRI 0x80 ****************** end of stdio.h *********************************/
_iobuf _iob[MAXFILES]; /* an array of this info */
#define FILE struct _iobuf /* stream definition */
#endif /**ne some stuff as macros .... */
/* */
/******************************************************************** */
#define ferror(p) ((p)->_flag & _IOERR) /* error encountered on stream */
#define fileno(p) ((p)->_fd) /* get strea<65><61><EFBFBD><EFBFBD>c~n<00><><EFBFBD>黯s<00><><EFBFBD><EFBFBD>padcharタ<00><><EFBFBD><EFBFBD>pb
~fn~sp~pw<00><><EFBFBD><EFBFBD>buf<00><> /* this stream is really a string */
#define _IOASCI 0x100 /* this was opened as an ascii file */
/********************************** end of stdio.h *********************************/
**********************************/
#define NULLFILE ((FILE *)0) /* Null return values */
/* flag byte definition ********/
#define abs(x) ((x) < 0 ? -(x) : (x)) /* Absolute value function */
#define MAX(x,y) (((x) > (y)) ? (x) : m's file descriptor */
#define getchar() getc(stdin) /* get char from stdin */
#define putchar(c) putc(c,stdout) /*
/* OSIF Error handling *************************************/
EXTERN WORD errno; /* error place for assigning */
EX*******************/
#define stdin (&_iob[0]) /* standard input stream */
#define stdout (&_iob[1]) /* " output ***************** end of stdio.h *********************************/
 */
#define _IOREAD 0x01 /* readable file */
#define _IOWRT 0x02 /* writeable file */
#define _IOABUF 0x04 (y)) /* Max function */
#define MIN(x,y) (((x) < (y)) ? (x) : (y)) /* Min function */
#define max(x,y) (((x) > put char to stdout */
#define putc fputc
#define getc fgetc
/******************************************************TERN WORD __cpmrv; /* the last BDOS return value (AX) */
EXTERN WORD _errcpm; /* place to save __cpmrv */
#define RET " */
#define stderr (&_iob[2]) /* " error " */
/************************************/
#define clear<03><03><03><03><03><03>(<03><03><03><03><03><03>|__iob濱fputc<00>___prtld<6C>___prtin<69>___prtsh /* alloc'd buffer */
#define _IONBUF 0x08 /* no buffer */
#define _IOERR 0x10 /* error has occurred */
# (y)) ? (x) : (y)) /* Max function */
#define min(x,y) (((x) < (y)) ? (x) : (y)) /* Min function */
/*********ERR(val,err) {errno=(err);_errcpm=__cpmrv;return(val);}
/************************************/
n PDP-11) */
#define SIGEMT 7 /* EMT instruction (TRAP on 68k) */
#define SIGFPE 8 /* Floating point exception will */
/* not get compile-time errors. Some functions are not implemented. */
/* */
/*********************
/* sgtty.h - tty control information */
/* Note reduced contents for CP/M implementation... */
struct sgttyb{
char sg_ispee*L46<00>*L45<00>LL48<00>PL47<00>xL50<00>|L49<00>朖1<00>*/
#define SIG_DFL (0L) /* Default action on signal call */
#define SIG_IGN (1L) /* Ignore */
/************RR(val,err) {errno=(err);_errcpm=__cpmrv;return(val);}
/************************************/
 */
#define SIGKILL 9 /* Kill (cannot be intercepted) */
#define SIGBUS 10 /* BUSERR (non-ex memory reference) */
#*******************************************************/
#define NSIG 16 /* 16 simulated signals */
#define SIGHUP 1 d; /* ignored */
char sg_ospeed; /* ignored */
char sg_erase; /* ignored */
char sg_kill; /* ignored */
int sg_flags;
/****************************************************************************/
/* */
/* S i g n a l H e a************************/
RR(val,err) {errno=(err);_errcpm=__cpmrv;return(val);}
/************************************/
define SIGSEGV 11 /* Segmentation (MMU) violation */
#define SIGSYS 12 /* Bad argument to system call */
#define S /* Hangup */
#define SIGINT 2 /* Interrupt (^C) */
#define SIGQUIT 3 /* Quit signal */
#define SIGILL
};
#define XTABS 0006000
#define RAW 0000040
#define CRMOD 0000020
#define ECHO 0000010
#define LCASE 0000004
#define CB d e r F i l e */
/* ----------------------------------- */
/* */
/* Copyright 1982 by Digital***********************/
<1A>伸10022<00>ツL10024<00>トL29<00>フL30<00>フL31<00>゙L32<00>゙L33<00>Ⅲ34<00>Ⅲ35<00>IGPIPE 13 /* Write on a broken pipe */
#define SIGALRM 14 /* Alarm clock (what a name!) */
#define SIGTERM 15 /* 4 /* Illegal Instruction trap */
#define SIGTRAP 5 /* Trace Trap */
#define SIGIOT 6 /* IOT instruction (oREAK 0000002
 Research, Inc. All rights reserved. */
/* */
/* Define the "signal" arguments, so anyone using the function ***********************/
L36<00>L37<00>>L38<00>>L39<00><03>40<00>鍬41<00>L42<00>膈43<00>PL44<00> Software termination signal */
/************************************/
#define BADSIG (-1L) /* Error return EAK 0000002
 The programmer can
* choose broad sets of options (i.e. "MINIMAL"), or can choose specific
* options to stub out of the finconversions, the code in the "printf()"
* routine will never be used. The "option.h" module gives the programmer
* a mechanisining
* the tag definitions, and then link this module and the OPTION* library
* along with the rest of the program. For exam-------------------------------
* Copyright 1983 by Digital Research Inc.
*
* Date: 1/5/84
*
* The CLEAR*.L86 libraries prm
* the OPTION* library which contains "nofloat()". This module also contains
* certain stubroutines which satisfy functionalEAK 0000002
al program (i.e. "NOFLOAT").
*
* Each definition contains a "tag declaration". The tag declaration
* will link in a module fm of communicating to the linker that certain low level functions
* are optional (not used by the program), and can be left outple, to reduce the size of
* the "hello.c" program load image, the programmer could prepare a file
* (named "opt.c" in this eovide a large number of functions which
* are not needed by every program, but which must be linked into the program
* because references to the floating
* point conversion routines in "printf()". Thus, the code for these
* conversions will not be linNVH<>*n<.Hニ n0Hタ.JngJ㌫ D€. n P-"n R疏ホシ<00><>J㍑.<2E>/NケX<>. 9タ`<60>
NqJ櫚゚ タN^Nu_uldivrom the OPTION*.L86 (OPTIONS.L86 or OPTIONL.L86)
* library which also contains a "stubroutine" for some internal
* function o to save space
* in the program load image (.CMD file).
*
* "option.h" provides a set of definitions which allow the programmxample) that looks like:
* opt.c:
* #include "option.h"
* MINIMAL
* Then, after compiling hello.c and opt.c, the link com their usage is data driven. One example is the floating point
* conversion routines in the "printf()" function. The programked into the final program load image. If
* the program happens to use the "%f", "%g" or "%e" printf() conversions,
* the st<73>_uldivr<00>___prtsh「~~__prts<74>~b~n~p
~signed~base~digsf the CLEAR* Run Time Library.
*
* For example, the definition of NOFLOAT is "int nofloat();". When
* the programmer specifier
* to specify certain options of the CLEAR* Run Time libraries (CLEARS.L86 or
* CLEARL.L86) which the program does not use. mand should look like:
* LINK86 HELLO,OPT,OPTIONS.L86[SEARCH
* Note that the "[SEARCH]" option is very important, since LImer can specify
* "%f", "%g" or "%e" conversions which the linker can not detect. If the
* program never needs or uses these ubroutines provided will print an error message and exit.
*
* We recommend that the programmer compile a separate module conta/***************************************************************************
*
* O P T I O N H e a d e r F i l e
* ----es "NOFLOAT" in the source file and then links the
* final program with the OPTION* library, the linker links in the module froNK86 will pull
* in all routines in OPTIONS.L86 if you do not use this option.
*
*
* Specific options are documented below.
evel Disk I/O subroutines.
* Watch out when you do binary file i/o: openb(), creatb(),
* fopenb(), freopb().
* Saves: CPM sm***********
* MAXFILES5: reduces the maximum number of open files allowed from 16 to 5.
* Note: this includes console files.
programmers.
**************/
#define NOSTARTUP int nostartup();
 to "read()" from the console.
* Watch out when you use STDIN on reads.
* Saves: CPM small 300, big 350
*************/
#defiESZ MAXFILES5 NOWILDCARDS \
NOASCII NOBINARY
/*************
* NOSTARTUP: links out all of the CLEAR initialization r
*
****************************************************************************/
/*************
* NOFLOAT: link out floatall 2200, big 2900
*************/
#define NOBINARY int nobinary();
/*************
* NOASCII: eliminates ASCII low level Di* Saves: CPM small 1950, big 1950
*************/
#define MAXFILES5 int maxfiles5();
/*************
* NOFILESZ: eliminates programmers.
**************/
#define NOSTARTUP int nostartup();
ne NOTTYIN int nottyin();
/*************
* NOWILDCARDS: eliminates wildcard expansion on command line.
* Saves: CPM smaoutines, including
* command line redirection (">", "<", and ">>" command line ops) and
* wildcard expansion. Also leaves outing point conversion routines in "printf()",
* "fprintf()", and "sprintf()".
**************/
#define NOFLOAT int nofloat();
sk I/O subroutines.
* Watch out when you redirect output to a file, or do any ascii file i/o:
* open(), opena(), creat(), creathe functions to calculate the size of a file.
* Watch out when you append 'fopen(name,"a")' or use 'lseek(fd,xx,2)'.
* Saves:,ll 500, big 650
*************/
#define NOWILDCARDS int nowildcards();
/************************************************ opening STDIN, STDOUT, and STDERR.
* Warning: this could have peculiar side effects, and should be used only
* by experienced
/*************
* NOLONG: link out long integer conversion routines in "printf()",
* "fprintf()", and "sprintf()".
* Saves: tb(), fopen(), fopena(), freopen().
* Saves: CPM small 1100, big 1500
*************/
#define NOASCII int noascii();
/* CPM small 550, big 800
*************/
#define NOFILESZ int nofilesz();
/*************
* NOBINARY: eliminates BINARY low lfdopen.o<02>`*************************
* DISK I/O Options
*************************************************************************/
/** programmers.
**************/
#define NOSTARTUP int nostartup();
CPM small 3200, big 3500
**************/
#define NOLONG int nolong();
/*************
* NOTTYIN: eliminates the functions************
* MINIMAL: tags to make "hello.c" as small as possible.
*************/
#define MINIMAL NOFLOAT NOTTYIN NOFIL/****************************************************************************/
/* */
/* CTYPE */
/* ower(ch) ? (ch)+('A'-'a') : (ch))
#define toascii(ch) ((ch) & 0177)
r(ch) (__atab[ch] & __l)
#define isdigit(ch) (__atab[ch] & __d)
#define isalnum(ch) (__atab[ch] & (__u | __l | __d))
#define ure.
*
* This file contains O.S. specific definitions for the
* DRI CLEAR/C Run Time Library. **********************************************/
/*
* Bit patterns for character class DEFINEs
*/
#define __c 01
#define
* 7-Mar-84 sw Fix for 68K
* 28-Feb-84 whf Add C_STAT for ttyinraw()
* 5-Jan-84 whf Moved MAXCCBS to channel.c ----- */
/* */
/* CTYPE.H - macros to classify ASCII-coded integers by table lookup. */
/* ower(ch) ? (ch)+('A'-'a') : (ch))
#define toascii(ch) ((ch) & 0177)
isspace(ch) (__atab[ch] & __s)
#define ispunct(ch) (__atab[ch] & __p)
#define isprint(ch) (__atab[ch] & (__u | __l | __d | __p
* This file is intended only for inclusion with those functions
* dealing directly with the O.S. interface, as w __p 02
#define __d 04
#define __u 010
#define __l 020
#define __s 040
#define __cs 041
#define __ps 042
#ifndef CTYPE
* 29-Dec-83 whf Added F_TRUNC for tclose()
* 12-Dec-83 whf Change from "CPM.H" to "OSIF.H"
* 9-Dec-83 */
/* */
/* Note: Integer args are undefined for all int values > 127, */
/* except for macro 'isascii())
#define iscntrl(ch) (__atab[ch] & __c)
#define tolower(ch) (isupper(ch) ? (ch)+('a'-'A') : (ch))
#define toupper(ch) (isell as any function
* which has hardware dependent code (byte storage order, for
* instance).
*
extern char ___atab();
extern char __atab[];
#endif
/*
* Character Class Testing and Conversion DEFINEs:
*/
#define i whf Handle PCDOS differences
* 3-Nov-83 whf Add multi-sector i/o
* 19-Oct-83 whf Add QUEUE handling info )'. */
/* Assumes: */
/* User will link with standard library functions. */
/* Compiler can handle de/***************************************************************************
*
* O S I F . H
* lower(ch) ? (ch)+('A'-'a') : (ch))
#define toascii(ch) ((ch) & 0177)

****************************************************************************/
/*
* "machine.h": to determine what sascii(ch) ((ch) < 0200)
#define isalpha(ch) (__atab[ch] & (__u | __l))
#define isupper(ch) (__atab[ch] & __u)
#define islowe
* 6-Oct-83 whf Redefine reserved area in fcb for parsefn() return
* 25-June-83 sw Add user number to file "fd" structclarator initializers and */
/* '#defines' with parameters. */
/* */
/****************************** -----------
* Copyright 1982,1983 by Digital Research Inc. All rights reserved.
*
* Edits: kind of machine you want to run on.
*/
#ifdef pcdos
#define PCDOS 1 /* IBM PC DOS */
#define CPM 0 /* CP/M version 2.2 */resvd[7]; /* More "system reserved" */
LONG record; /* Note -- we overlap [32-36]*/
/* current record field to ***/
#if CPM /****************************/
struct fcbtab /****************************/
{ /* */
BYTE d*******/
/* */
#define SECSIZ 128 /* size of CP/M sector */
/* to obtain nsecs on err */
/*CCPM 0 /* Concurrent (multi-tasking) */
#define CPM3 0 /* CP/M version 3.x (Concurrent & Plus) */
#define CPM4 0 /* CP/M versi3]; /* File type [9-11] */
WORD fcb_curblk; /* Curr 128 byte blk [12-13]*/
WORD fcb_lrecsiz; /* Logical record siz
#else /* assume CP/M: */
#define CPM 1 /* CP/M version 2.2 */
#define PCDOS 0 /* IBM PC DOS */
#endif
#define I8086 0*/
/* make this useful. */
}; /****************************/
#endif /****************************/
/**rive; /* Disk drive field [0] */
BYTE fname[8]; /* File name [1-8] */
BYTE ftype[3]; /* File type [9-11] ***************************/
/***************************************************************************
*
on 4.x (Portable Concurrent) */
#define UNIX 0 /* UNIX */
#define VMS 0 /* DEC VMS */
/*** Compiler ***/
#define ALCYONe[14-15]*/
LONG fcb_filsiz; /* Num bytes in file [16-19]*/
WORD fcb_date; /* Last updated [20-21] */
BYTE fcb_resv /* Intel 8086/8088 */
#define DRC 0 /* Digital Research C Compiler */
/**** Unused DEFINEs: ****/
/* #ifdef UNdefin**************************************************************************
* PC-DOS FCB definition
**************************/
BYTE extent; /* Current extent number[12]*/
BYTE s1,s2; /* "system reserved" [13-14]*/
BYTE reccnt; /* Record * Channel Control Block (CCB)
*
* One CCB is allocated (statically) for each of the 16 possible open 1 /* Alcyon C Compiler */
/* #endif */
/************************/
/************************************************d[10]; /* System reserved [22-31] */
BYTE fcb_currec; /* Rel Rec# within curblk[32]*/
LONG record; /* Rel Rec# from ed */
/*** Processor ***/
#define MC68000 1 /* Motorola 68000 */
#define VAX 0 /* DEC VAX */
#define PDP11 0 /* DEC PD***************************************************/
#if PCDOS /****************************/
struct fcbtab { /********counter [15] */
BYTE fpasswd[8]; /* Parsefn passwd area[16-23]*/
BYTE fuser; /* Parsefn user# area [24] */
BYTE
* files under C (including STDIN, STDOUT, STDERR). Permanent data
* regarding the channel is kept here.
* ****************************
* CP/M FCB definition
*************************************************************************bgn file */
/* [33-36] depends on lrecsiz*/
}; /****************************/
#endif /*********************P-11 */
#define Z8000 0 /* Zilog Z8000 */
/*** Operating System ***/
#define CPM68K 1 /* CP/M 68000 ver 2.2 */
#define ********************/
BYTE drive; /* Disk drive field [0] */
BYTE fname[8]; /* File name [1-8] */
BYTE ftype[
*
****************************************************************************/
struct ccb /*getccb(i) (&_fds[i]) /* Get CCB addr */
/**************************************************************************CII file attached */
#define ATEOF 0x20 /* End of file encountered */
#define DIRTY 0x40 /* Buffer needs writing
#define C_STAT 11 /* Get console status */
#define S_BDOSVER 12 /* Get System BDOS Ver Num */
#define OPEN 15 /* /* */ /* Declare storage */
#define FD struct ccb /* FD Type definition */
#define NULLFD ((FD *)0) /* NULLPTR f */
#define __OSIF(fn,arg) __BDOS((fn),(arg)) /* DRC does it this way */
#endif /* */
#if CPM /****************************************/
{ /* */
WORD flags; /*sw Flags byte */
BYTE user; /*sw User # *
*
* O S I F F u n c t i o n D e f i n i t i o n s
* -------------------------------------------- */
#define ISSPTTY 0x80 /* Special tty info */
#define ISAUX 0x100 /*sw Auxiliary device */
#define ISQUE 0x02 OPEN a disk file */
#define CLOSE 16 /* Close a disk file */
#define SEARCHF 17 /* Search for first */
#deor FD */
/************************************/
/* Flags word bit definitions */
/*******************************************/
#define EXIT 0 /* Exit to BDOS */
#define CONIN 1 /* direct echoing con input */
#defin */
BYTE chan; /* Channel number being used */
LONG offset; /* File offset word (bytes) */
LONG sector; /* Se-----
*
* Following are OSIF function definitions used by the C runtime
* library.
* 00 /*whf Queue device */
/************************************/
#define READ 0 /* Read mode parameter for open fine SEARCHN 18 /* Search for next */
#define DELETE 19 /* Delete a disk file */
#define CREATE 22 /* Create ****************/
#define OPENED 0x01 /* Channel is OPEN */
#define ISTTY 0x02 /* Channel open to TTT */
#definee CONOUT 2 /* Direct console output */
#define LSTOUT 5 /* Direct list device output*/
#define CONIO 6 /* Direcctor currently in buffer */
LONG hiwater; /* High water mark */
struct fcbtab fcb; /* File FCB (may have TTY info)*/
****************************************************************************/
/************************* */
#define WRITE 1 /* Write mode */
/* CCB manipulation macros *************************************/
#define _a disk file */
#define F_RENAME 23 /* Rename a disk file */
#define SETDMA 26 /* Set DMA address */
#define ISLPT 0x04 /* Channel open to LPT */
#define ISREAD 0x08 /* Channel open readonly */
#define ISASCII 0x10 /* ASt console I/O */
#define C_WRITESTR 9 /* Console string output */
#define CONBUF 10 /* Read console buffer */
BYTE buffer[SECSIZ]; /* Read/write buffer */
}; /************************************/
extern struct ccb _fds[];***/
#if CPM68K /* */
#define __OSIF(fn,arg) __BDOS((fn),(LONG)(arg)) /* CPM68K does it this way */
#else /* USER 32 /*sw Get / set user number */
#define B_READ 33 /* Read Random record */
#define B_WRITE 34 /* Write Ran*************************/
/* Other CP/M definitions */
/************************************************************st */
#define SEARCHN 18 /* Search for next */
#define DELETE 19 /* Delete a disk file */
#define CREATE 22/* ordered words in 32 bit*/
WORD lwlo; /* LONG qtys. */
}; /* */
#else /***********************S */
#define CONIN 1 /* direct echoing con input */
#define CONOUT 2 /* Direct console output */
#define LSTOne HILO 1 /* used when bytes stored */
#else /* */
#define HILO 0 /* used when bytes stored */
#endif dom record */
#define FILSIZ 35 /* Compute File Size */
#define F_MULTISEC 44 /* Set Multi-Sector Count */
#de****************/
#define TERM "CON:" /* Console file name */
#define LIST "LST:" /* List device file name */
#d /* Create a disk file */
#define F_RENAME 23 /* Rename a disk file */
#define SETDMA 26 /* Set DMA address *****/
struct long_struct{ /* Lo/Hi storage use on */
BYTE lblolo; /* PDP-11, VAX, 8086,... */
BYTE lblohi; UT 5 /* Direct list device output*/
#define CONIO 6 /* Direct console I/O */
#define C_WRITESTR 9 /* Console str /* */
/* */
#if HILO /* Hi/Lo storage used in */
struct long_struct{ /* 68K */
BYTEfine P_CHAIN 47 /* Program Chain */
#define SETVEC 61 /* Set exception vector */
#define N_NETSTAT 68 /* Get Nefine EOFCHAR 0x1a /* End of file character-^Z */
/****************************/
/******************************** */
#define B_READ 33 /* Read Random record */
#define B_WRITE 34 /* Write Random record */
#define FILSIZ 35 /* */
BYTE lbhilo; /* */
BYTE lbhihi; /* */
}; /* */
struct word_struct{ /* *ing output */
#define CONBUF 10 /* Read console buffer */
#define C_STAT 11 /* Get console status */
#define lbhihi; /* Use this for accessing */
BYTE lbhilo; /* ordered bytes in 32 bit*/
BYTE lblohi; /* LONG qtys. etwork Status */
#define F_TRUNC 99 /* Truncate file function */
#define S_OSVER 163 /* Get OS Version Number *********************************************/
/* Hardware dependencies */
/****************************************** /* Compute File Size */
#endif /****************************/
/***************************************************/
WORD lwlo; /* */
WORD lwhi; /* */
}; /* */
#endif /****************************/
/*** OPEN 15 /* OPEN a disk file */
#define CLOSE 16 /* Close a disk file */
#define SEARCHF 17 /* Search for fir */
BYTE lblolo; /* */
}; /* */
struct word_struct{ /* Use this for accessing */
WORD lwhi; /
#endif /****************************/
#if PCDOS /****************************/
#define EXIT 0 /* Exit to BDO**********************************/
/****************************/
#if MC68000 | Z8000 /* 68K or Z8000 */
#defi************************ end of osif.h **********************************/
ffer address
* bytes Is the number of bytes to write
*
* ret Is the number of bytes actually n
* ------------------------------
* Copyright 1984, Digital Research Inc. All rights reserved.
* * Need to advance? */
fp->hiwater = fp->offset; /* then do so */
return ii; /* Number written */
} close.o€`n<01>NVH<>>ョNケ*@
fp<>`H0タ|g>ョNケ>ョNケ; /* # bytes to write */
{ /****************************/
#if PCDOS /*=======================================*********************** end of osif.h **********************************/
 written
*
****************************************************************************/
#include "por
* Function "wrtbin" is called from "write" to take advantage of a
* potential multi-sector transfer for binary f/****************************/
#endif /*=============================================================*/
#if CPM /B@`&-g:-f2 -ーュ l>シBァ?.Nケ\<5C>>シ/<?.Nケ\<5C>-gB>シ"/</
<06>4/-/
Nケ<>ー|g3<>======================*/
UWORD ii; /* Byte counter */
UWORD _pc_writeblk(); /* OS function Write Rnd Blk*/
*********************** end of osif.h **********************************/
tab.h"
#include "osif.h"
#include "osiferr.h"
#include "errno.h"
#define NDEBUG
#include "assert.h"
#define OFFSECT iles.
*
* Completely re-written 7 Feb 1984 whf.
*
* Calling sequence:
* ret = _wrtbin(fp*=============================================================*/
REG UWORD nbs; /* counter */
UWORD xsector; /* Cur3<>p<>`<00>.シ<00>?< NケT<>>-H€セ@g-H€Hタ.€?< NケT<>.<2E><06>?<NケT<><-H€セ@g0G.<2E>?< NケT松|<00>f3<>/* */
ii = _pc_writeblk(&(fp->fcb),fp->offset,buff,(WORD)bytes,1); /* */
if( ii==0 ) /* Problems? */
RE__iob(fp->offset & ~(SECSIZ-1))
#define HIWSECT (fp->hiwater-1 & ~(SECSIZ-1))
UWORD _wrtbin(fp,buff,bytes) /************,buffer,bytes);
*
* Where:
* fp Points to the affected ccb.
* buffer Is the burent sector */
UWORD nsector; /* Multi-sector count */
UWORD written; /* # bytes to written */
UWORD BufP/***************************************************************************
*
* W r t b i n F u n c t i oTERR(FAILURE,EIO); /* Tell them so */
fp->offset += ii; /* Incr pos in file */
if( fp->offset > fp->hiwater ) /****************/
/* */
REG FD *fp; /* -> CCB */
BYTE *buff; /* -> User's buffer */
UWORD bytesos; /* Position in buffer */
/****************************/
/****************************/
written = 0; */
fp->offset += nbs; /* " " " */
buff += nbs; /* Ground we've covered */
bytes -= ufPos = fp->offset & (SECSIZ-1); /* Where are we in buffer? */
nbs = SECSIZ - BufPos; /* Room left in buffer */
if( nwritten += nbs; /* Indicate we've written */
fp->offset += nbs; /* " " " */
buff += nbs; /out the buffer */
else if(_blkio(fp,(LONG)xsector,fp->buffer,1L,B_READ) != 1)
RETERR(FAILURE,EIO); /* Can't preread *********/
} /****************************/
/* */
/****************************/
if( bytes >= SECSIZ /* Num written so far */
/* Get buffer cleaned and */
/* current: */
xsector = fp->offset >> 7; nbs; /* num bytes left to write */
if( BufPos + nbs != SECSIZ ) { /* Buffer full? */
fp->flags |= DIRTY; /* Nbs > bytes ) /* More room than we need? */
nbs = bytes; /* Adjust to bytes to xfer*/
else if( nbs == SECSIZ ) * Ground we've covered */
bytes -= nbs; /* num bytes left to write */
} /****************************/
buffer */
fp->flags &= ~DIRTY; /* Clear dirty bit */
fp->sector = xsector; /* Buffer labelled */
} ) { /* Can we do multisector io?*/
nsector = bytes >> 7; /* divide by 128 for sectors*/
if(_blkio(fp,(LONG)xsect/* Calculate present sector */
if(xsector != fp->sector) { /* Do sectors match? */
if(fp->flags & DIRTY) /* No, io, mark it */
fp->sector = xsector; /* Label buffer */
} else { /* */
if(_blkio(fp,(LONG)xsector/* Sector aligned multi-sec?*/
nbs = 0; /* Don't buffer now. */
if( nbs > 0 ) { /* Any room/data to buffer? /****************************/
if( bytes > 0 ) { /* Any room/data to buffer? */
ASSERT( fp->flags & DIRTY == 0 ); /* /****************************/
/****************************/
/* Xfer data to buffer until*/
/* 1) end oor,buff,(LONG)nsector,B_WRITE) != nsector)
/* Multi-sector xfer */
RETERR(FAILURE,EIO); /* Just quit on error s buffer dirty? */
if(_blkio(fp,fp->sector,fp->buffer,1L,B_WRITE) != 1) /* */
RETERR(FAILURE,EIO); /* Couldn't,fp->buffer,1L,B_WRITE) != 1)
RETERR(FAILURE,EIO); /* Couldn't */
fp->flags &= ~DIRTY; /* turn off dirty bit */
blkmove(fp->buffer+BufPos,buff,nbs);/* Move into write buffer */
written += nbs; /* Indicate we've written Buffer should be clean */
if( OFFSECT > HIWSECT) /* Within the hiwater area? */
blkfill(fp->buffer,0,SECSIZ); /* f data, */
/* 2) end of buffer, or */
/* 3) sector aligned multi- */
/* sector write. */
B */
xsector += nsector; /* Update current sector */
nbs = nsector << 7; /* number bytes xferred */
write buffer */
if( OFFSECT > HIWSECT) /* Within the hiwater area? */
blkfill(fp->buffer,0,SECSIZ); /* No: Zero */
fp->sector = -1; /* buffer clean */
xsector++; /* Bump sector counter */
} /*******************No: Zero out the buffer */
else if(_blkio(fp,(LONG)xsector,fp->buffer,1L,B_READ) != 1)
RETERR(FAILURE,EIO); /* Can'ra $1.s
=====*/
NケT<>
n<><6E>(gH€Hタ.€?<NケT術`汗シ<00>l ` <<00>*E<><45>.<2E><06><><EFBFBD><EFBFBD>?<
NケT<>.<2E><>H<EFBFBD>ニフシ<00><EFBFBD>0|
.<2E>?<Nケater) /* See if above hiwater mark*/
fp->hiwater = fp->offset; /* Fix if necessary */
return written; /* Return req$ t preread buffer */
ASSERT( bytes < SECSIZ ); /* Should be cut to size */
blkmove(fp->buffer,buff,bytes); /*a $1.s
<00><L21<00><03>L26<00><02>28<00>廰27<00>カL29<00>メL30<00>ハL31<00>L32<00>.L33<00>T秀<54>J㎜J<> fU `ロS⑳<53>腴㎜<18>
R<EFBFBD> "メシ<EFBE92><EFBDBC><EFBFBD>吹NqJ櫚゚8潘^Nu__fds @_errno___cpmrvィ__errcpmィ_exiuested # */
} /****************************/
#endif /*=======================================================$xttyin.o Move into write buffer */
fp->flags |= DIRTY; /* Mark buffer */
fp->sector = xsector; /* and label $BL34<00>NL35<00>哭36<00>豊37<00>ミL38<00>鶚40<00>琪39<00><03>t<00>___BDOS<00>__ttyin~~_ttyin<69>~bytes~p ~ttybuf<00><><EFBFBD><EFBFBD>~xbytes~fp
~nbs======*/
lo68 -r -u_nofloat -o $1.68k 0:s.o $1.o $2.o $3.o $4.o $5.o $6.o $7.o $8.o $9.o 0:clib
 */
written += bytes; /* Indicate we've written */
fp->offset += bytes; /* " " " */
buf $ cp68 -i 0: $1.c $1.i
c068 $1.i $1.1 $1.2 $1.3 -f
era $1.i
c168 $1.1 $1.2 $1.s
era $1.1
era $1.2
as68 -l -u -s 0: $1.s
e~tyb<00><><EFBFBD>兊buff L2<00> L3<00>LL1<00>猫4<00> L5<00><00>6<00>ーL10000=====*/
o68 -r -u_nofloat -o $1.68k 0:s.o $1.o $2.o $3.o $4.o $5.o $6.o $7.o $8.o $9.o 0:clib
f += bytes; /* Ground we've covered */
} /****************************/
/* */
if(fp->offset > fp->hiw$<07>ェL10002<00>ョL7<00>覘8<00>祗9<00>L10003<00>L10005<00>L10<00>\L12<00>`L11<00>; }
_pftoa() { _optoff(__nofloat_msg); }
_pgtoa() { _optoff(__nofloat_msg); }
_atof() { _optoff(__nofloat_mst); }
<01>,g>シ//
aエP汁|,f.<2E>/
/ atP汁d-E<><45>J<>X ,蕫-@<40><><EFBFBD><EFBDAE> ,ーョ<EFBDB0><EFBDAE>N,gF>シ"/</ <06>4/,/ Nケ<>_nodisk_io_msg); }
_wrtbin() { _optoff(__nodisk_io_msg); }

int _filesz() { return 32767; }
/* NODISK: pulls out as much disk i/o as possible. */
nodisk() { ; } /* stubroutine 'tag' */
char * __nodisk_i|L13<00>tL14<00><01>,; }
_pftoa() { _optoff(__nofloat_msg); }
_pgtoa() { _optoff(__nofloat_msg); }
_atof() { _optoff(__nofloat_mst); }
/* NOFLOAT: provides 'stubroutines' to satisfy floating point library */
/* references from 'printf' et al. */
<00>NL15<00>pL14<00>朖16<00>鱈17<00>豊18<00>゙L19<00>ワL20<00>祗21<00><01>22<00>_allocc<00>___open<00>_freec<00>_unlink~~unlink<6E>~ch~filenamタ~retL2<00>o_msg = "disk i/o rtns";
_rdasc() { _optoff(__nodisk_io_msg); }
_rdbin() { _optoff(__nodisk_io_msg); }
_wrtasc() { _optoff(/* NOFILESZ: eliminates routine to calculate filesize (used in lseek()) */
nofilesz() { ; } /* stubroutine 'tag' */
4/.<2E><>/
Nケ<>ー|g3<>3<>p<>`fRョ<52><EFBDAE> 蕫-@<40><><EFBFBD><EFBDAE>b -ーョ<EFBDB0><EFBDAE> .<2E><><EFBFBD><EFBDAE>o U<>ソ+|<7C><><EFBFBD><EFBFBD>>シ"/.<2E><>/ /.<2E><>/
Nケ
nofloat() { ; } /* stubroutine 'tag' */
char * __nofloat_msg = "floating point";
_petoa() { _optoff(__nofloat_msg<00><01>~_wrtbi<62>
~nsectorタ<00><><EFBFBD><EFBFBD>24<00>「L25<00>
L26<00>猫27<00>伸23<00>L28<00><02>29L1<00>@,$4<ilwrite.o`垣_nodisk_io_msg); }
_wrtbin() { _optoff(__nodisk_io_msg); }

int _filesz() { return 32767; }
<>Hタ".<2E><>3<>3<>p<>`<00> .<2E><>€梳 .<2E><>€ルタ .<2E><> -ーュ o+m J㌶ .<2E><>-gB>シ"/</
<06>4/-/
Nケ); }
_pftoa() { _optoff(__nofloat_msg); }
_pgtoa() { _optoff(__nofloat_msg); }
_atof() { _optoff(__nofloat_mst); }
<00><02>30<00>__clear L32<00>L31<00>4L33<00>\L34<00>TL35<00>朖36<00>L37<00>NV<4E><56><EFBFBD>*n
B<EFBFBD>:.>ョNケ(@ fp<>`レJ<EFBE9A>B@`,g3<> 3<>p<>`,g>シ//
aホP汁_nodisk_io_msg); }
_wrtbin() { _optoff(__nodisk_io_msg); }

int _filesz() { return 32767; }
<>ー|g3<>3<>p<>`tU@ -蕫+@ -タシ<EFBE80><EFBDBC><EFBFBD>€"- S<><EFBFBD><EFBDBC><EFBFBD>€&>シ!/</
<06>4/-/
Nケ<>`>シ€/
<06>4/* NOTTYIN: eliminates console input functions from read(). */
nottyin() { ; } /* stubroutine 'tag' */
static chly 1 channel.
*****************************************************************************/
__chinit(i)
{ /*********** Include std definitions */
#include <cpm.h> /* Include CP/M definitions */
#define MAXCCBS 9
FD _fds[MAXCCBS]; /~fp
~bdosfunタ~fcbp _get_tok<6F>6L2<00>垣stuff_d<5F>€L3<00>rL1<00>ワL4---------------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* Routine "_chinit" is called from th>.Jg.JGg*H€Hタミシ @g
H€ミ|<7C>H€タR拘G`ホJ櫚゚0€N^NuNVH<> *n(n >.Jg"H€>€/9NケX繍€f
JGgンSG`レB
Nqar * __nottyin_msg = "tty input";
_ttyin() { _optoff(__nottyin_msg); }
******************/
REG FD *ch; /* -> CCB */
REG BYTE *p; /* Byte pointer temporary */
ch = _getccb(i); * Allocate CCB storage */
_chinit() /****************************/
{ /* */
REG WORD i; /* Index <00>ヲ__strcpy<70>覘5<00>フL6<00> L7<00>L8<00>pL9<00>BL10<00>bL11<00>伸12e run-time initialization to clear
* out all the CCB storage.
* Calling sequence:
* _chinit();
*
* Routine "__chinit(fd)" J櫚゚0€N^NuNVH<>*n(n &nBGH€Hタミシ @g<>
H€゙@゙|<7C>G`リJg*H€Hタミシ @g
H€ミ|<7C>H€ミ|<7C>€R徽f -only 9 files instead of 16
* chkc.c - (to be consistent with chinit()
* doprt.c - stripped down, does not support longs/* convert fd to CCB */
ch -> chan = i; /* Load channel byte */
ch -> flags = 0; /* clear flag word */
*/
for(i=0;i<MAXCCBS;i++) /* For all channels */
__chinit(i); /* Init fds(i); */
} /**********************;;;;;;;
; SUBMIT R1
;;;;;;;
;CREATE NEWLIB., CONTAINING ALL C RTL OBJECTS
;STEP 1: OPTIONS
ERA NEWLIB.
$2AR68 RF $1 NEis called from other low-level routines
* for single channel initialization.
* Calling sequence:
* __chinit(fd)
* where: fdop<>`B@NqJ櫚゚8€N^Nu<>.,=:+-&/\|()[]*__fds @_errno___cpmrvィ__errcpmィ___atab_fill<00>__ & floats
* _ttyin.c - dummy routine
* _filesz - dummy rtn
*
* (last mod 12/21/83 WHF )
*/
/********************** convert fd to CCB */
ch -> chan = i; /* Load channel byte */
ch -> flags = 0; /* clear flag word */
******/
/*****************************************************************************
* The __chinit routine initializes onWLIB channel5.o xmainnw.o MALLOCDB.O NOASCII.O NOBINARY.O NODISK.O NOFILESZ.O NOFLOAT.O NOLONG.O NOTTYIN.O
;;;;;;;
;;;;;;;
= file descriptor #
*
*****************************************************************************/
#include <portab.h> /_BDOS<00>__index<00>___open~~__open<65>~xuser~i~p<00><><EFBFBD><EFBFBD>filnam
~tokbuf<00><><EFBFBD>ワ~ch********************************************************
*
* C C B I N I T I A L I Z A T I O N
* --------------* convert fd to CCB */
ch -> chan = i; /* Load channel byte */
ch -> flags = 0; /* clear flag word */
;;;;;;;
; SUBMIT R2
;;;;;;;
;STEP 2: ARCHIVE ORDINARY C OBJECTS
$2AR68 RF $1 NEWLIB ACCESS.O ATOI.O ATOL.O CALLOC.O EXEREN CLIB=NEWLIB
PIP $2[G0]=CLIB
PIP $1[G0]=S.O
PIP $2[G0]=S.O
REN S.X=S.O
ERA *.O
REN S.O=S.X
USER 7!MAKE $1 $2
AT.O STRNCMP.O STRNCPY.O STRCPY.O
$2AR68 RF $1 NEWLIB STRLEN.O CTYPE.O XSTRCMP.O YESFLOAT.O YESSTART.O XATOF.O
;;;;;;;
;;;;;
/* NOSTART.C - provides a routine to prevent the linkage of the */
/* 'normal' RTL startup routine, '_main()'. */
L.O XMAIN.O CREAT.O EXIT.O CLEANUP.O FCLOSE.O CLOSE.O
$2AR68 RF $1 NEWLIB FDECLS.O FFLUSH.O OPEN.O LSEEK.O FILESZ.O SPRINTF.O D<4,C.O FDOPEN.O
$2AR68 RF $1 NEWLIB FGETS.O FOPEN.O FPUTS.O FREAD.O FREOPEN.O FSEEK.O FTELL.O
$2AR68 RF $1 NEWLIB FWRITE.O GETLREN CLIB=NEWLIB
PIP $2[G0]=CLIB
PIP $1[G0]=S.O
PIP $2[G0]=S.O
REN S.X=S.O
ERA *.O
REN S.O=S.X
USER 7!MAKE $1 $2
;;
;;;;;;;
; SUBMIT R3
;;;;;;;
; STEP 3: ARCHIVE ASSEMBLER STUFF
$2AR68 RF $1 NEWLIB ABORT.O ALDIV.O ALMUL.O ALREM.O /* When this module is linked in, there will be no redirected */
/* i/o, the command line will not be parsed into argc/argvOPRT.O
$2AR68 RF $1 NEWLIB DOPRTFP.O FPUTN.O FPUTC.O FLSBUF.O ISATTY.O MALLOC.O MALLOCND.O
$2AR68 RF $1 NEWLIB PRTINT.O PRTLD.$.O GETPASS.O GETS.O GETW.O MAIN.O
$2AR68 RF $1 NEWLIB MKTEMP.O GETPID.O OPTOFF.O PERROR.O PRINTF.O PUTL.O PUTS.O
$2AR68 RF $1 「~~getpas<61>L2<00>~prompt~ibuf__noecho「>L1<00>:~~_noech<63>>~bf~chLDIV.O LMUL.O LREM.O
$2AR68 RF $1 NEWLIB SALLOC.O SETJMP.O ULDIV.O SIGNAL.O XSIGNAL.O BLIVOT.O
;;;;;;;
;;;;;;;
ERA CLIB
, standard */
/* i/o channels will not be opened, and files will not be closed */
/* automatically on termination. O PRTSHORT.O SBRK.O WRITE.O
$2AR68 RF $1 NEWLIB CHANNELS.O WRITEASC.O WRITEBIN.O BLKIO.O OSATTR.O WRTCHR.O LSTOUT.O
$2AR68 RF ttyname.o `$NV<4E><56>>ョNケJ@g
<``B€NqN^Nu__fds @_errNEWLIB PUTW.O QSORT.O RAND.O READL.O RENAME.O STRRCHR.O SCANF.O
$2AR68 RF $1 NEWLIB SETBUF.O SGTTY.O SSCANF.O DOSCAN.O FGETC.O<><4F><EFBFBD><EFBFBD>ln ~cur<00><><EFBFBD><EFBFBD>L5<00>FL7<00>シL8<00>bL9<00>bL10<00>pL6<00>メL11<00>
REN CLIB=NEWLIB
PIP $2[G0]=CLIB
PIP $1[G0]=S.O
PIP $2[G0]=S.O
REN S.X=S.O
ERA *.O
REN S.O=S.X
USER 7!MAKE $1 $2
 */
/* NOTE: 'argc/argv' is replaced by 'cmd/len', where cmd -> command tail */
/* and len is the length of this string$1 NEWLIB TTYOUT.O XOPEN.O CHKUSER.O ERRNO.O STRCHR.O PARSEFN.O BLKFILL.O blkmove.o
$2AR68 RF $1 NEWLIB STRCAT.O STRCMP.O STRNCno___cpmrvィ__errcpmィ___tnameィ_isatty<00>_ttyname「~~ttynam<61>~fdL2<00>L1 FILBUF.O READ.O
$2AR68 RF $1 NEWLIB READASC.O READBIN.O SWAB.O TTYIN.O TTYINRAW.O UNGETC.O UNLINK.O
$2AR68 RF $1 NEWLIB WRITErL12<00><00>13<00><00>3<00>ヨL14<00>貝15<00>猫16<00>コL17<00>L18<00>ニL4<00>ヨ. */
nostart() { ; } /* stubroutine tag */
_main(cmd,len) /* stubroutine for starup '_main()' */
char malloc()
* To be included in OPTION?.lib
*
* 10/83 whf
*****************************************************************<2A><>.<2E>?< NケT<> 2Hチミ@0Hダ€0Hタ怙0Hタヨ€0<04>Hタルタ`<00>v-H€ーn<EFBDB0><6E>g0n<30><6E>.<2E>?< NケT<> NqJ櫚゚0<EFBE9F>^Nu__fds @_errno'free()' */
/* */
/*** end of "malloc.h" ******/
/*****************************************************3<>B@`
NqJ櫚゚ €N^Nu__fds @_errno___cpmrvィ__errcpmィ__chkc~~_chkc<00>~chB_HDR *_aflistptr; /* ptr into ring of freeblks*/
/* */
#define AOFFS 1L /* alignment offset: 0=br *cmd; /* ptr to CP/M command tail */
int len; /* length of CP/M command tail */
{
_exit(main(cmd,len)); /* c*******/
#include <portab.h>
/************************* #include "malloc.h" *****************************/
#define FB_HD___cpmrvィ__errcpmィ___BDOS<00>__blkio~~_blkio<69>~nsecs~count~xuser<00><><EFBFBD><EFBFBD>~buffer ~s***********************/
_errmalloc(etype)
int etype; /* type of error */
{
switch(etype)
{
case ERR_FI~xcb
L2<00>(L1<00>XL3<00>T  yte, 1=word, 3=quad */
#define AMASK(c) ((char *)((long)(c) & ~AOFFS)) /* mask alignment bits */
#define AFUDGE 4 /* all the main program */
}
R struct hdr /* free block header type */
/* */
FB_HDR { /* mem_block header */
struct hdr *ptr; /eccnt~sector~ccb
~bdosfunミL2<00>VL4<00>VL3<00>祗5<00>トL6<00>哭7NDBLOCK:
printf("malloc() error: corrupt arena\n");
break;
case ERR_GETMEM:
printf("malloc() error: out of memory\nN^blkio.o<03>`PNV<4E><56>H<EFBFBD>? *n.. (n,.:.B<>.シ<00>?< Nケleeway for passing block as is */
#define ACHUNKS 64 /* chunks to alloc from O.S.*/
/* */
#define ERR_FINDBLOll the main program */
}
* ptr next blk (when freed)*/
UWORD size; /* block size (always) */
UWORD chksize; /* 1's complement of size */
/************************************************************************
* _errmalloc / MALLOCDB.C : prints error messages fo");
break;
case ERR_FREE:
printf("free() error: pointer was not from malloc()\n");
break;
}
exit(1);
}
/*T<>=@<40><>-H€ーn<EFBDB0><6E>g-H€Hタ.€?< NケT繍<54><00>.<2E>?<NケT<>+G0x.<2E><06>?NケT繍@g>ク|o89B€p 濺`BD-H€ーn<EFBDB0><6E>g0nCK 1 /* error in 'findblock()' */
#define ERR_GETMEM 2 /* error in 'getmemory()' */
#define ERR_FREE 3 /* error in ll the main program */
}

}; /****************************/
/* */
EXTERN FB_HDR _afreebase; /* initial (empty) block */
EXTERN F***************************************************************************/
/* malloc_debug(): checks the free list to see if  }
<00><>qsort.o<04>`<01>
 /* */
} /* */
cp = cp->ptr; /* move on down the list */
if( cp == _aflistptr ) /* end /* NOASCII: pulls out as much ASCII disk i/o as possible. */
noascii() { ; } /* stubroutine 'tag' */
char * __everything is ok. */
/************************************************* */
WORD malloc_debug() /* */
{  }
/* NOBINARY: pulls out as much BINARY disk i/o as possible. */
nobinary() { ; } /* stubroutine 'tag' */
char *H`R
rNVH<>>.ZGB€0€<>>RGJケf <#タ#タBy(y*Tセmb60X@ーme(描&M0<>of list? */
return SUCCESS; /* */
} /* */
} /****************************/
noascii_io_msg = "ascii disk i/o rtns";
_rdasc() { _optoff(__noascii_io_msg); }
_wrtasc() { _optoff(__noascii_io_msg); }
/****************************/
REG FB_HDR *cp; /* ptr to current block */
/* */
cp = _aflistptr; /* s<00>哭3<00>朖11<00>L12<00>>L1<00>B~~_swap<00>L~a
~b ~wid~tmp __nobinary_io_msg = "binary disk i/o rtns";
_rdbin() { _optoff(__nobinary_io_msg); }
_wrtbin() { _optoff(__nobinary_io_msg)ラタ0-触7@&<26>(<28>;G#フ
\€`<>f>㌢*@
fB€`(M*T`ィJ櫚゚8€N^NuNVH<> >.゙|?<3F>昱0<>>€Nケ*@サ<><EFBDBB><EFBFBD><EFBFBD>fB€`
R€タシ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>f list? */
return SUCCESS; /* */
} /* */
} /****************************/

tart search here */
while(1) /* do forever */
{ /* */
if(~(cp->size^cp->chksize)) /* does cp ptミL14<00>xL16<00>dL15<00>xL17<00>rL13<00>x; }
*@(M9G.圭預 9NqJ櫚゚0€N^NuNVH<> *n]<5D>(yサフcサヤeケヤeサヤeサフbサフf#フ`J(T`ワ
2-<><> T0(ムm T*秦*<2A> 2,f list? */
return SUCCESS; /* */
} /* */
} /****************************/

 to valid blk? */
{ /* no... */
_errmalloc(ERR_FINDBLOCK); /* handle this error */
return FAILURE; /* NOLONG: provides 'stubroutines' to satisfy long int conversion
library references from 'printf' et al.
*/
nolong() { ;* 8-Dec-83 whf handle PC-DOS changes.
*
* Calling Sequence:
* ret = _blkio(ccbp,sector,buf o n
* -----------------------------
* Copyright 1982,1983 by Digital Research Inc. All rights reserved. /*=============================================================*/
REG WORD seccnt; /* number sectors xferred */
WORDタL15<00>ヤL14<00><00>free<00>~~free<00><00>~fmpL18<00>L10000<00>L17<00>6L10001<00>e "portab.h"
#include "osif.h"
#include "osiferr.h"
#include "osattr.h"
#define MIN(x,y) ( ((x) < (y)) ? (x) : (y) )
L } /* stubroutine 'tag' */
char * __nolong_msg = "long int conversion";
__prtld(){ _optoff(__nolong_msg); }fer,count,bdosfunc);
*
* Where:
* ret = sectors actually read/written
* ccbp -> t
*
* The _blkio function is used to read / write a set of contiguous
* sectors in an open file. _pc_readblk(), _pc_writeblk(); /* functions to read/write */
if( bdosfunc == B_READ )
return _pc_readblk(&(ccbp->fc&L20<00>2L16<00>|L19<00>2L21<00>VL22<00>XL23<00>tL24<00>v_realloc「<01>~reallo<6C>ONG
_blkio(ccbp,sector,buffer,count,bdosfunc)
/****************************/
FD *ccbp; /* open file pointer } /* stubroutine 'tag' */
char * __nolong_msg = "long int conversion";
__prtld(){ _optoff(__nolong_msg); }he open file channel control block
* sector = The desired starting sector number
* buffer = The memory addr
* Note: if CPM, it will use CP/M function 44 (Set Multi-Sector Count)
* if os_multisectorio is TRUE (BDOS versions 3.0 andb),sector,buffer,(WORD)count,SECSIZ);
else return _pc_writeblk(&(ccbp->fcb),sector,buffer,(WORD)count,SECSIZ);
}
#endif <01>fp<00><><EFBFBD><EFBFBD>ss<00><><EFBFBD><EFBFBD>np2<00><><EFBFBD><EFBFBD>siz ~ptrL26<00>クL25<00>NL27<00>HL28<00>ワ */
LONG sector; /* Sector number */
BYTE *buffer; /* User's buffer area */
LONG count; /* # } /* stubroutine 'tag' */
char * __nolong_msg = "long int conversion";
__prtld(){ _optoff(__nolong_msg); }ess to begin transfer
* count = the number of sectors to read/write
* bdosfunc= The BDOS function number (B_ above).
* Note 2: if PC-DOS, it will use block read and write functions.
*
* Edits:
/*==============================================================*/
#if CPM /*=======================================/***************************************************************************
*
* _ b l k i o F u n c t iof sectors to do */
int bdosfunc; /* BDOS function to use */
{ /****************************/
#if PCDOS<00>農getmemo<6D>、L12<00>猫7<00>猫5<00>嘸~getmem<65>、~fbp ~mmp
~utg~numuREAD / B_WRITE)
*
****************************************************************************/
#includ=======================*/
WORD nsecs; /* # secs to xfer each time */
LONG seccnt; /* # sectors processed */
WORDg multi-sec?*/
{ /* yes! do error handling */
if( os_oldmultisec ) /* Older msecio? */
nsecs = __cdmultisec )
nsecs = MIN(16,count); /* Older version of msecio */
else nsecs = MIN(128,count);/* Later version of ms============*/
Set new DMA address */
#if HILO /*==========================================================*/
ccbp->fcb.record = sect/* Increment address */
} /****************************/
_uchkuser(ccbp->user,xuser); /* Reset user # if needed * xuser; /* old user number */
WORD retcode; /* return code from BDOS */
WORD Used_Multisec; /* flag for resettpmrv >> 12; /* adjust nsecs read like so*/
else nsecs = __cpmrv >> 8;/* later versions: use AH */
} /*** ecio */
++Used_Multisec; /* Flag: need to reset */
__OSIF(F_MULTISEC,nsecs); /* make the call */
} ============*/
or; /* Set new record number */
#else /*----------------------------------------------------------*/
ccbp->fcb.record = /
if( Used_Multisec ) /* Need to reset msecio? */
__OSIF(F_MULTISEC,1); /* then do so... */
return(seccnt)ing msecio*/
/****************************/
seccnt = 0; /* Zero count initally */
Used_Multisec = 0; /* Have */
else nsecs = 0; /* ow. assume 0 secs read */
seccnt += nsecs; /* Return nfg */
break; /* /******* */
/****************************/
retcode = __OSIF(bdosfunc,&(ccbp->fcb));/* do the read/write*/
lrem.o`bNV<4E><56>/. /.Nケソ<> 9N^Nu_ldivr_ldiv_lremsector << 8; /* Set new record number */
#endif /*==========================================================*/
/*; /* All is OK */
} /****************************/
#endif /*=====================================================n't used it yet */
xuser = _chkuser(ccbp->user); /* Check for changed user # */
nsecs = 1; /* default: xfer singly Return from bottom */
} /****************************/
/* */
sector += nsecs; /* Increment sector num /****************************/
if(retcode != 0)
{ /****************************/
if(nsecs>1) /* were we tryinlrem~~lrem<00>~l2 ~al1 _luldiv.o$`z Multi Sector I/O xfer? */
if( (count > 1 && os_multisectorio ) || nsecs > 1 )
{ /* yes! */
if( os_ol=============*/
 */
/* */
while (count > 0) /* Until all sectors xferred*/
{ /* */
__OSIF(SETDMA,buffer); /* ber */
count -= nsecs; /* Down count */
seccnt += nsecs; /* Bump sector count */
buffer += nsecs*SECSIZ; 
NVH<>..,. J<>#<23> <€`Jシ㌘
#ヌB€`<セ<>zB㌔(x<> 縲シ€b繙繖`猪<><EFA896><>割梟竚竡`<60>#ヌ nal count */
} /***************************/
portab.h"
#include "osif.h"
WORD _lstout(buffer) /***************************/
REG BYTE *buffer; /* -> 1st char output
* The execl function is called from anywhere to pass control to
* another program from the the executing o n
* -------------------------------
*
* Function "_lstout" is called to perform "write" opexstrcmp.o<01>`x<00>NVH<> *n(n JfJg&H€>€a,NqJ櫚゚<00>^Nu_uldivr_uldiv~~uldiv<00>~b~q~l1~l2~al1al count */
} /***************************/
 */
{ /***************************/
REG WORD count; /* = # bytes to xfer */
WORD xcount; /* save area for C program.
* Note that the stream files are closed via '_cleanup()'.
*
* Calling Sequence: rations to the
* list device.
*
* Calling Sequence:
* ret = _lstout(buffer,count,fH€>€a"op`lp<>``メB@NqJ櫚゚0タN^NuNVH<>. セ<am
セ<zn<04>< H€NqJ櫚゚€N^Nu__strcmp「~~_strcm<63>~a~al2 L2<00>&L1<00>pL3<00>4L4<00>>L5<00>fL7<00>@L6<00>RL9<00>TL8al count */
} /***************************/
count */
/* */
xcount = count = (0xFF & *buffer++); /* Copy for later */
/* */
while(count-- >
*
* execl(name,arg0,arg1,...,argn,NULLPTR);
*
* Where:
* name, arg0unc);
*
* Where:
* buffer -> the output buffer (byte 0 is count)
* ret = count /***************************************************************************
*
* E x e c F u n c t i o <00>fL10<00>`p#<23>Tッ`0#<23>`$#<23>`ソ<>#<23>(`
#<23> H<><48> y斟N伸゚<EFBE9F>Nw___signa<6E>@__illins「__ 0) /* Until all written */
__OSIF(LSTOUT,*buffer++); /* Output next character */
return(xcount); /* return origi, arg1...argn are pointers to character strings
*
**********************************************************on return
*
****************************************************************************/
#include "n
* -------------------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
* /***************************************************************************
*
* _ l s t o u t F u n c t i trace__trap__buserr「(__arith6epa<00>process<00>@******************/
#include "portab.h"
#include "osif.h"
#include "osiferr.h"
#include "errno.h"
#include "ctype.h"
UWO*****************/
le differently ifso */
_pc_chain(cmdline); /* special home grown func */
#else /* O.S. handles it? */
cmdline[0] lsbuf( ch, stream )
* Where:
* ch = the 1st char to be buffered
* stream -> where its going (FILE *)
* chr = ch if write; --i >= 0; ) /* uppercase command name */
cmdline[i+1] = toupper(cmdline[i+1]); /* */
#endif /*****************/************************************************************************
*
* _ f l s b u f F u n c t i o n
* ---------RD execl(name,arg0) /* CLEAR FUNCTION ***********/
UBYTE *name,*arg0; /* pointers arguments */
{ /* */
*****************/
= strlen(cmdline+1); /* Compute length */
__OSIF(SETDMA,cmdline); /* DMA -> Command line */
__OSIF(P_CHAIN,0); /* ok, FAILURE (-1 WORD) o.w.
*
* Modifications:
* 19-Oct-83 whf Handle IONBUF differently
********************************************/
args = &arg0; /* Copy args */
args++; /* arg0 is a dup of the */
/* command name */
----------------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* '_flsbuf' handles writes to the stREG UBYTE **args; /* used to index into args */
UBYTE cmdline[128]; /* CP/M command line area */
REG WORD i; /***start<00>Pserial<00>@xclear<00>d_brk暫rkok<00><00>___BDOSェnoovf<00>ヤovf<00>_fillリ chain to program */
#endif /* */
RETERR(FAILURE,ENOENT); /* error: file not found */
} /****************************************************/
#include "stdio.h"
WORD _flsbuf(c,sp) /****************************/
REG while(*args != NULLPTR) /***************************/
{ /* */
strcat(cmdline+1," "); /* Add a blanream when its buffer is full.
* Included is the ability to handle 'non-buffered' (_IONBUF), as
* well as line buffered (_IOLBU************************/
/* */
_cleanup(); /* Close all (stream) files*/
/* now build cmdline */
filldone<6E><00>illit<00>鸚_index<00>index<00><00>otend<00>___pname、___tname、___lname、___xeof#******************/
BYTE c; /* char to be written */
REG FILE *sp; /* stream to write to */
{ /****************************/
k */
strcat(cmdline+1,*args++); /* Add next arg */
} /***************************/
#if PCDOS /* handF) output. It is supposed to be
* called by 'putc'. It will init the buffers, as needed.
*
* Calling sequence:
* chr = _fstrcpy(cmdline+1,name); /* Copy name portion */
#if PCDOS == 0 /* Don't do for PCDOS */
for(i = strlen(cmdline+1) BYTE csave; /* a temp save area */
BYTE *malloc(); /* alloc memory */
REG WORD n, /* number chars written_ptr >= sp->_base+BUFSIZ ) /* buf full or '\n'*/
{ /* */
n=write(sp->_fd,sp->_base, /* output the line */_flag & _IONBUF ) /* insure this pts ok */
sp->_ptr = sp->_base = &csave; /* give buff a temp place */
*sp->_ptr++ = /* everything ok, quit */
} /****************************/

else { /* o.w. we have a buffer! */
sp->_flag |= _IOABUF; /* mark it as alloc'd */
if( isatty(sp->_fd) ) end buf handlers**********/
if( ns != n ) /* error on write? */
{ /* */
sp->_flag |= _IOERR; /* mark */
ns; /* num chars sposed to be w.*/
/* */
ns = n = 0; /* init them */
if( (sp->_flag &
(ns=sp->_ptr-sp->_base)); /* */
sp->_ptr = sp->_base; /* reset the buffer */
} /* */
c; /* put this somewhere */
if( sp->_flag & _IONBUF ) /* if a no buff file */
{ /* */
n=write(DpX<70>.ケF/<F"NケDpX<70>.シF"NケD曰タミシF"S€#タFN^NuNV<4E>魲yH^.ョa y<>mE麈3<>sat`` y<>eE麈 3<>sa\`J y<!/* do we handle newlines? */
sp->_flag |= _IOLBUF; /* yessir, this is a linbuf */
else { /* o.w. **************** stream */
return(FAILURE); /* and die */
} /****************************/
return(((WORD) c) & 0xff ); _IOWRT) == 0 ) /* is this file writeable? */
return(FAILURE); /* no! */
if( sp->_base == NULLPTR && /* if no i sp->_cnt = 0; /* enforce coming right back*/
} /****************************/
else /* o.w. we really have a */sp->_fd,sp->_base,(ns=1)); /* write single char */
sp->_cnt = 0; /* enforce coming back again*/
} /**********/*****************************************************************************
*
* f p u t c F u n c t i o n
* --------*****/
sp->_cnt = BUFSIZ-2; /* lv room for 1st & last ch*/
return(*sp->_ptr++ = c); /* store 1st & quit */
/* everything ok, quit */
} /****************************/
nit yet and */
(sp->_flag & _IONBUF) == 0 ) /* and not a no buff file */
{ /* ifso...*******************/
{ /* full buffer */
n=write(sp->_fd,sp->_base, /* output the whole buff */
(ns=sp->_ptr-sp->_base)); /* ******************/
else if( sp->_flag & _IOLBUF ) /* if a line buff file */
{ /* */
if(c=='\n' || sp->-------------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* "fputc" does the inserting of a char } /*tty chk********************/
} /*malloc*********************/
} /*NULL buff******************/
if( sp-> /* everything ok, quit */
} /****************************/
 if( (sp->_ptr=sp->_base=malloc(BUFSIZ)) == NULLPTR ) /* alloc ok?*/
sp->_flag |= _IONBUF; /* set to a no buff file */
*/
sp->_cnt = BUFSIZ-1; /* lv room for last char */
sp->_ptr = sp->_base; /* init ptr */
} /* into a stream buffer,
* calling _flsbuf when the buffer fills up.
* Returns the character put, or FAILURE (-1) if any errors.
NVH<> yFH€"yFR>シ?<€/<F"NケN\<5C><JFm0`.シF"/<IラNケ!<21><>>シ<><EFBDBC>aメJ櫚゚タN^NuNV<4E><56> 9E<>^<5E> 9E<>an 9/<I扼ケ!<21>蹴yF年^NuNVH<> >シNケD&#タRー9RウgRケRー 9Rーミシ#タRカ#<23>RーZヨ3<EFBE96>,Zヤ*|\<5C>(|]鵤Gセ| l *ヘB<EFBE8D>(フ* excluding the termination character (CR/LF).
*
**************************************************************************) & 0377);/* put it! */
else return(_flsbuf(ch,sp)); /* o.w. flush & put */
/****************************/
(note upper case) is defined in the compile line.
*
* Edits:
* 28-Feb-84 whf "_salloc()" goes to NOWILD region
* 02-Feb-
*
* Calling sequence:
* ret=fputc(ch,s)
* Where:
* ch = the char to put
* s -> the stream (FILE *)
* ret= ch or FAILU/*****************************************************************************
*
* "__main()" Subroutine to "_main()"
* ---B彝G`珵櫚゚0€N^NuNVH<>a
蕁Hタミョ#タ`<60> y`<60>*h
f*yZヨ` y`<60> P!yZヨ.溝 NqJ櫚゚ N^NuNVH<>*n(M&yZヨBGセ|lキLg***/
#include "portab.h" /* Include std definitions */
#include "osif.h" /* Include CP/M Definitions */
#include "ctyp}
84 whf nowild -> NOWILD, removed write()
* 01-Jan-84 whf add in handle for OPTION*.h
* 08-Dec-83 whf handle PC-DOS diffs,RE
*
*****************************************************************************/
#include "stdio.h"
WORD fputc(ch,sp)-------------------------------
* Copyright 1983 by Digital Research Inc. All rights reserved.
*
* Routine "__main()" is ent*m`覲G`<60>
NqJ櫚゚8€N^NuNV<4E><56> y`<60>Zヨ y`鸙ィf y`<60>!yZヨaN^NuNV<4E><56>Zヨ 9ZヨーケRカe<>シNケD&ーシ<EFBDB0><EFBDBC><EFBFBD><EFBFBD>f.シIセNケe.h" /* char type definitions */
#define STDIN 0 /* file descriptors */
#define STDOUT 1 /* */
#defi
 add ">>" redirection
* 11-Oct-83 whf converted to DRC from CPM68K
*
* Calling Sequence:
* return = _main(command,length) /* CLEAR FUNCTION ***********/
REG BYTE ch; /* char to put */
REG FILE *sp; /* stream to put it to */
{ ered from the "_main()" routine to start a
* C program. The command string from CP/M is parsed into
* a UNIX-like "argc/argv!<21>>シ<><EFBDBC>Nケ'礰RカydZヤN^NuNVH<>BG*yZヨBFシ|l
H€゙@RF`<60>0タ|>NqJ櫚゚ タN^NuNVH<> *n(n BGセ|l8ンRG`<60>櫚゚0€N^Nune STDERR 2 /* */
#define ISWHITE(ch) ((ch)==NULL || isspace(ch)) /* */
#ifndef NOWILD
EXTERN BYTE *_sallo
;
*
* Where:
* command Is the address of the command line from CP/M
* length Is the number of characters in the line,
/****************************/
if( --(sp->_cnt) >= 0 ) /* if there's room in buf */
return(((WORD)(*sp->_ptr++ = ch)" setup, including simple I/O redirection.
*
* This module can be compiled without wildcard parsing if the
* symbol "NOWILD"c(); /* Stack allocation routine */
#endif
EXTERN BYTE *sbrk(); /* Incr break location */
EXTERN BYTE *strchr(); /* } /****************************/
else /* */
{ /****************************/
for(i = 0; !ISWHITE(s[i] ++s; /* */
if (!*s) /* End of line? */
break; /* Yes, don't continue */
if(*s == '"' || *s == '\ } /* */
break; /****************************/
/* */
default: /* Just a regulaYTE *p; /* Another "" */
REG BYTE c; /* Character temp */
FD *pfd; /* File Desc temp */
BYTE tmpbuf[3********************/
case '>': /* Redirecting output?? */
close(STDOUT); /* Close output */
i V7 "index" function */
EXTERN BYTE __pname[]; /* Default Program name */
MLOCAL WORD argc; /* Arg count */
); ++i)/* How many characters? */
; /* */
if (s[i]) /* If last is space, etc... */
s[i++] = '\0'; /*'') /* Quoted string */
{ /* */
c = *s; /* c = quote character */
p = strchr(s+1,c); /* Finr arg */
/****************************/
#ifndef NOWILD /*******************************************************0]; /* Filename temp */
BYTE *strchr(); /* V7 index() func */
/****************************/
argv2 = argvf(s[1]=='>') { /* Appending? */
if(opena(s+2,WRITE)!=STDOUT /* Try to open old */
|| -1 == lseek(STDO
MLOCAL BYTE *argv; /* -> array of pointers */
MLOCAL BYTE *argv2; /* Companion ptr to argv */
__main(com, len) Make it a null for C */
switch(*s) /* Now do i/o scan */
{ /****************************/
case '<': d next */
if (p == NULLPTR) /* Any? */
_err(s,": unmatched quote");/* No, bitch. */
i = (WORD)*/
/********************************************************/
if(strchr(s,'?') || /* Wild */
strc = sbrk(0); /* -> first free location */
argc = 0; /* No args yet */
addargv(__pname); /* */
for (s = UT,0L,2) ) /* At EOF */
_err("Cannot append ",s+1); /* Can't */
} else { /*** */
/****************************/
BYTE *com; /* Command address */
WORD len; /* Command length */
{ /* /* Redirecting input?? */
close(STDIN); /* Yes, close TTY */
if (opena(s + 1,READ) != STDIN) /* Open Newp-s; /* Compute length */
s[i++] = '\0'; /* Nullify at end */
addargv(s+1); /* Add to arg list */
hr(s,'*')) /* Cards? */
{ /****************************/
pfd = _getccb(STDERR+1); /* Use unused channelcom; *s; s += i) /* One arg at a time */
{ /* */
while (*s && isspace(*s)) /* Skip leading spaces */
if (creata(s+1,0)!=STDOUT) /* Try to open new */
_err("Cannot create ", s + 1); /* Can't */
***************************/
REG WORD i; /* Define a count var. */
REG BYTE *s; /* Temp byte pointer */
REG B */
_err("Cannot open ", s + 1) ;/* Can't ... */
break; /* Done with this one */
/******** */
__OSIF(SETDMA,pfd->buffer);/* Use buffer for DMA */
c=__open(STDERR+1,s,SEARCHF); /* Do the searchexit(-1); /* And fail hard */
} /****************************/
/*
* Addargv function -- adds a pointer to the argc,argv,NULLPTR)); /* Invoke C program (No Env)*/
}
/* */
MLOCAL _err(s1,s2) /* Error routine */
c /* */
*buf = NULL; /* Nullify at first */
i = FALSE; /*****************************/
f = p->buffer; /
} else /* */
/********************************************************/
#endif /****************************************/
#ifndef NOWILD
/*
* Toasc routine -- combines the FCB name in the DMA and the user number
* / dri */
if(c == 0xff) /* Failed ... */
_err(s,": No match"); /* Complain */
while(c != 0xff) /argv array, getting the
* space from the heap.
*/
MLOCAL addargv(ptr) /****************************/
REG BYTE *ptr; har *s1; /* Message text */
char *s2; /* Filename */
{ /****************************/
char buf[128]; /* Pnt to results of search */
#if CPM /*================================================================*/
f += c*32; ***************************************/
addargv(s); /* save in argv */
} /* */
} /* */
}ve field to produce an ascii file name for SEARCHes.
*
*/
MLOCAL _toasc(p,c,buf) /*****************************/
REG FD* Do search next's */
{ /****************************/
_toasc(pfd,c,tmpbuf); /* Convert file to ascii */
/* -> Argument string to add*/
{ /* */
*((BYTE **)argv2) = ptr; /* Load pointer */
argv2 += sizeof(char * /* place to build message */
/* */
strcpy(buf,s1); /* Output error message */
strcat(buf,s2); /* /* c == directory search code*/
if( p->user ) /* User # not default? */
{ /* Yes */
i = (p->user) -1; /****************************/
addargv(NULLPTR); /* Insure terminator */
argc--; /* Back off by 1 */
if *p; /* -> Data area */
REG BYTE c; /* 0 .. 3 search code */
REG BYTE *buf; /* Output buffer area */
p = _salloc(strlen(tmpbuf)+1);/* Allocate area */
strcpy(p,tmpbuf); /* Move in filename */
addargv(p); /* ); /* More room from heap */
argc++; /* Increment arg count */
} /****************************/
/*******And filename */
strcat(buf,"\r\n$"); /* + Newline */
__OSIF(C_WRITESTR,buf); /* output directly to CON: */
/* Cvt to real user # */
if( i>=10 ) *buf++ = '1'; /* Assume user # <15 */
*buf++ = '0' + (i % 10); /* now for( brk(argv2)==FAILURE) /* Allocate the pointers */
_err("Stack Overflow",""); /* Call "Stack Overflow" rtn*/
exit(main(
{ /*****************************/
REG BYTE *f; /* -> Fcb in DMA buffer */
WORD i; /* Temp. */
Add this file to argv */
c=__open(STDERR+1,s,SEARCHN); /* Search next */
} /**************************************************************************************************/
/****************************************************** digits */
*buf++ = ':'; /* finish off with this */
i = TRUE; /* remember */
}; /***************<2A><><EFBFBD>*n(n ..-G<><47> -蕫-@<40><> -タシg<00> -ーョ<EFBDB0><EFBDAE><00>-gF>シ"/</
<06>4/-/
Nケ@P゚<50>ー|g3<>Mt3<74>NVMvp<76>h package */
{
}
#endif
/*****************************************************************************/
/****************; /* What OS are we running? */
os_version = __cpmrv; /* Use AX, not AL ret by OSIF*/
/* */
switch( os_ver */
*buf++ = tolower((f[i]&0x7f)); /* Yes, move it in */
} /*****************************/
*buf++ = '.'; /* 1/4/83 whf & rsw - add CPMZ8KV11
* 12/29/83 whf - add os_truncates
* 11/4/83 whf - handle CCPM3.1 and networking
************************/
#endif /*================================================================*/
if(p->fcb.drive) /* Drive s`U<>ソ>シ!/</
<06>4/.<2E><>/
Nケ@P゚<50>ー|g3<>Mt3<74>NVMvp<76>`~+n<><6E>&M -タシラタラ<EFBE80>4
ミシエキタdJ㎜
ロS⑲ュ`覊<>*************************************************************/
sion ) /* What kind of OS? */
{ /* */
case CCPM86V10: /* CCP/M-86 PC v1.0 */
case MPM86V21: * Put in delimiter */
for(i=9; i<12; i++) /* Move in extension */
{ /* */
if(f[i] != ' ') /* N*******************************************************************/
#include "portab.h"
#include "osif.h"
#include "osiferpecified? */
{ /* Yes */
if(i) /* User #? */
buf--; /* Yes, back up over ':' */
*bf -ーュ o+m .<2E><>.Rョ<52><EFBFBD> 蕫-@<40><><EFBFBD><EFBDAE> >シ!/.<2E><>/ /.<2E><>/
Nケ@P゚<50>Hタ,ンョ<EFBE9D><EFBDAE> <06>ムュ <06><06>ルタ -ーュ o+m ショ<EFBDBC><EFBDAE>U ************************************************************/
 /* MP/M-86 v2.0, v2.1 */
os_abilities |= _os_multitasking|_os_oldmultisec|_os_f_parse|
_os_filesharing|_os_datetion-blank? */
*buf++ = tolower((f[i]&0x7f)); /* Yes, move it in */
} /*****************************/
*buf++r.h"
#define OSATTR
#include "osattr.h"
unsigned short os_abilities = 0;
unsigned short os_version = 0;
WORD osattruf++ = p->fcb.drive - 1 + 'a'; /* Put in drive code */
*buf++ = ':'; /* And delimiter */
} /* */
/****************************************************************************
* OSATTR.C - sets "os_abilities" word, depending ************************************************************/
me|_os_interrupts;
break; /* */
/****************************/
case CCPM86V20: /* CCP/M-86 v2.0 = NULL; /* Null at end */
} /*****************************/
#else
nowildcards() /* stubroutine for OPTION*.()
{
#if CPM /*================================================================*/
/* */
__OSIF(S_BDOSVER,0) for(i=1;i<9;i++) /* Move the filename */
{ /*****************************/
if(f[i] != ' ') /* Non-blank? on which OS we are running.
*
* Last modified:
* 2/28/84 whf - add os_interrupts
* 1/25/84 whf - handle 68K linker problem
*/
__OSIF(S_OSVER,0); /* Get the truth */
switch(__cpmrv) /* Which OS really? */
{ /* o attributes... */
} /****************************/
#endif /*====================================================uncates|_os_datetime|_os_fastconio|_os_interrupts;
break; /* */
/* case 0x0014: /* CP/M-80 v1.4 */
/***************************************************************************
*
* R d b i n F u n c t i o /
case 0x1420: /* Definitely CCP/M-86 v2.0 */
default: /* Maybe CCP/M-86 v2.0 */
os_abilities |= _os* Yes, there's a net */
return SUCCESS; /* If called by someone else*/
} else return FAILURE; /* */
} / */
case CPM86V31: /* Fooled by the network! */
os_abilities |= _os_fastconio; /* plus all of this: */
=============*/
#if PCDOS /*================================================================*/
#endif /*================/* case 0x0022: /* CP/M-80 v2.2 */
/* case 0x0031: /* CP/M-80 Plus */
/* case 0x0122: /* MP/M-80 v1.1n
* ---------------------------
*
* The "_rdbin" function performs a read operation for bin_multitasking|_os_newmultisec|_os_f_parse|
_os_filesharing|_os_datetime|_os_loadtime|
_os_truncates|_os_fastconio|_os_in****************************/
#endif /*=================================================================*/
 case CPM86V11: /* Fooled by the network! */
/* Network will emulate these*/
os_abilities |= _os_newmultisec|_=================================================*/
}
#if CPM /*=========================================================== */
/* case 0x0130: /* MP/M-80 v2.0, v2.1 */
default: /* */
case CPM86V11: /* CP/M-86 v1.0, ary files.
*
* Calling Sequence:
* ret = _rdbin(fp,buffer,bytes);
*
* terrupts;
} /* */
net_check(); /* is there a network? */
break; /*****************************************************/
#endif /*=================================================================*/
os_f_parse|
_os_filesharing|_os_datetime|_os_loadtime;
break; /* */
/****** */
case 0x143======*/
net_check() /****************************/
{ /* */
__OSIF(N_NETSTAT,0); /* Is net installed? *v1.1 */
case CPM68KV11: /* CP/M-68K v1.1 */
case CPMZ8KV11: /* CP/M-Z8000 v1.1 */
break; /* nWhere:
* fp -> to the open CCB
* buffer -> the user's buffer
* bytes = the number of bytes**/
case CPM86V31: /* CP/M-86 Plus */
os_abilities |= _os_multitasking|_os_newmultisec|_os_f_parse|
_os_tr***************************/
#endif /*=================================================================*/
1: /* Fooled! CCP/M-86 v3.1 */
os_abilities |= _os_swaps8087; /* 8087 support? */
/* plus all the rest: */
if( __cpmrv != 0xFFFF && __cpmrv != 0 ) /* non bogus return? */
{ /* */
os_abilities|=_os_netinstalled; / to be read
* ret = the number of bytes actually read
*
***************************************O); /* Must be EOF */
fp->sector = xsector; /* Mark buffer */
} /****************************/
p =h? */
{ /* */
if((fp->flags & DIRTY) != 0) /* Buffer dirty? */
{ /* */
if(_ >> 7; /* Compute number of sectors*/
if(nsector > 0) /* need to transfer?? */
i=_blkio(fp,xsector,buff,nsector, */
LOCAL LONG xsector; /* Temp sector number */
LOCAL LONG nsector; /* Multi-sector count */
LOCAL LONG xbytes; fp->hiwater=fp->offset; /* necessary */
return(xbytes); /* Yes, just return */
} /* */
xsector+*************************************/
#include "portab.h"
#include "osif.h"
#include "osiferr.h"
#include "errno.h"
WO &fp->buffer[(int)fp->offset&(SECSIZ-1)];/* buffer offset */
/* */
while(p < &(fp->buffer[SECSIZ]) && /* Mblkio(fp,fp->sector, /* */
fp->buffer,1L,B_WRITE) != 1) /* Try to write old buffer */
RETERR(FAILURE,EIO); /* Can /* Do the */
B_READ); /* transfer */
/* */
xsector += i; /* Update sector counter */
f /* byte count temp */
REG LONG i; /* Temp index */
/****************************/
xbytes = bytes; /+; /* Bump sector pointer */
} /****************************/
/*************************************************RD _rdbin(fp,buff,bytes) /****************************/
/* */
REG FD *fp; /* -> ccb for the file */
REG ove the bytes */
bytes > 0) /* */
{ /* */
*buff++ = *p++; /* Copy data byte */
bytes--;'t; just quit. */
fp->flags &= ~DIRTY; /* not dirty anymore */
} /****************************/
p->offset += i*SECSIZ; /* Update offset */
bytes -= i*SECSIZ; /* Update byte count */
buff += i*SECSIZ; /* * Preserve org byte cnt */
xsector = fp->offset >> 7; /* Calculate starting sector*/
/* */
if((fp->offset &**************************
* At this point, a multi-sector transfer may be accomplished. */
/*************************BYTE *buff; /* -> buffer to receive data*/
REG LONG bytes; /* = # bytes to xfer */
{ /************************ /* Decrement byte counter */
fp->offset++; /* Increment offset */
} /****************************/
if( if(_blkio(fp,xsector,fp->buffer, /* Now read the */
1L,B_READ) != 1) /* next sector */
RETERR(FAILURE,EIUpdate buffer address */
/* */
if(fp->offset > fp->hiwater) /* Adjust hiwater */
fp->hiwater = fp->off (SECSIZ-1)) != 0) /* If not on boundary, */
{ /* must buffer */
if(fp->sector != xsector) /* Do sectors matc***************************************************/
/* */
i = 0; /* In case no xfer */
nsector = bytes****/
#if CPM /*===============================================================*/
REG BYTE *p; /* Temp byte pointer bytes == 0) /* Zero byte count now? */
{ /* */
if(fp->offset > fp->hiwater) /* Adjust hiwater if */
set; /* if needed */
if (i != nsector) /* Short read?? */
{ /* */
fp->flags |= ATEOF; /* set EOF Fytes,1); /* */
if( xbytes==0 ) /* EOF or error condition */
fp->flags |= ATEOF; /* Set EOF flag */
fp->offseh 1st byte */
while (bytes > 0) /* Count down */
{ /* bytes */
*buff++ = *p++; /* Move a byte  fp->flags &= ~DIRTY; /* not dirty anymore */
} /****************************/
if(_blkio(fp,xsector,fp->buffer,1Lead fully satisfied */
} /****************************/
lag */
return(xbytes - bytes); /* Return actual read count */
} /****************************/
if(bytes == 0) t += xbytes; /* Calculate new offset */
#endif /*===============================================================*/
*/
bytes--; /* Down count */
} /****************************/
#endif /*=====================================, /* Read into buffer */
B_READ) != 1) /* */
{ /* */
fp->flags |= ATEOF; /* End of file */
 /* Done? */
return(xbytes); /* Yes, return */
/****************************/
if((fp->flags & DIRTY)
if(fp->offset > fp->hiwater) /* Fix up hiwater mark */
fp->hiwater = fp->offset; /* */
return(xbytes); /* ==========================*/
#if PCDOS /*===============================================================*/
UWORD xbytes; 
return(xbytes-bytes); /* return corrected count */
} /****************************/
/* */
fp->sector != 0) /* Buffer dirty? */
{ /* This can be true for */
if(_blkio(fp,fp->sector, /* boundary conditions Read fully satisfied */
} /****************************/
 /* More byte count temps */
/****************************/
xbytes = _pc_readblk(&(fp->fcb),fp->offset,buff,(WORD)b= xsector; /* Update data area */
fp->offset += bytes; /* Increment offset */
p = &fp->buffer[0]; /* Start wit */
fp->buffer,1L,B_WRITE) != 1) /* Try to write old buffer */
RETERR(FAILURE,EIO); /* Can't; just quit. */
ead fully satisfied */
} /****************************/
/*************************************************************************
*
* _ _ p r t l d F u n c t i o n
* ----------se {
if (signed && n < 0) {
*(*pbuf)++ = '-';
n = -n;
}
while (n) {
n = uldiv(n,b); /* n>0 (or unsigned), d;
extern long uldivr;
struct long_struct *p_uldivr;
p_uldivr = &uldivr;
p = digs;
b = base;
n = *pobj;
if (bastr) )
str++;
if( *str == '+' )
str++;
else if( *str == '-' ) {
str++;
isneg++;
}
while( *str >= '0' && *st---------------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* "__prtld" prints LONGs, for use wito unsigned div*/
*p++ = p_uldivr->lblolo;
}
}
return (p);
}
e == 16) { /* special because of negatives */
ii = 8;
while (n && ii) {
*p++ = (int)n & 0xf; /* HY */
n >>= 4; /r <= '9' )
val = 10 * val + ( *str++ - '0' );
if( isneg )
val = -val;
return( val );
}
h "_doprt".
*
**************************************************************************/
#include "portab.h"
#include "osif unsigned div*/
*p++ = p_uldivr->lblolo;
}
}
return (p);
}

/* YESSTART.C: provides 'stubroutine' to satisfy 'nostart' ref, in case */
/* the OPTION?.lib 'nostart()' was not linked i* MGL */
ii--;
}
}
else if (base == 8) {
ii = 11;
while (n && ii) {
*p++ = (int)n & 7; /* HY */
n >>=  <= '9' )
val = 10 * val + ( *str++ - '0' );
if( isneg )
val = -val;
return( val );
}
.h" /* used for hardware dependencies: byte store order */
BYTE *__prtld(pobj, pbuf, base, signed, digs)
LONG *pobj;
BYTE *
/* atoi - convert decimal number in ascii to integer */
#include "portab.h"
#include "ctype.h"
WORD atoi(str) /* CLE unsigned div*/
*p++ = p_uldivr->lblolo;
}
}
return (p);
}
n. */
/* This routine belongs in the main RTL lib. */
nostart() { ; } /* stubroutine tag */
3; /* MGL */
ii--;
}
if (ii==0) {
*(p-1) &= 3; /* only 2 bits in upper octal digit */
/* MGL */
}
}
el <= '9' )
val = 10 * val + ( *str++ - '0' );
if( isneg )
val = -val;
return( val );
}
*pbuf;
WORD base;
WORD signed;
BYTE *digs;
{
REG LONG n;
REG LONG b;
REG BYTE *p;
REG WORD ii;
extern long uldiv()AR FUNCTION ***********/
REG BYTE *str;
{
REG WORD val;
REG WORD isneg;
val = 0;
isneg = FALSE;
while( isspace(*s. */
/* This routine belongs in the main RTL lib. */
nostart() { ; } /* stubroutine tag */
umed.
* mode -> "r" for read only,
* "w" for write only,
* "a" to append (write only) to end of file.
* ascii = for binary files, and the default (presently to
* ascii files).
*
* Calling sequence:
* stream = fopena(name,mode) (ascii off end of table */
break; /* */
if( ii >= MAXFILES ) /* */
return(NULLFILE); /* fail **/
REG BYTE *name, /* file name */
*mode; /* "r","w", or "a" */
BOOLEAN ascii; /* CP/M text file . */
/* This routine belongs in the main RTL lib. */
nostart() { ; } /* stubroutine tag */
 0 if the file is handled as a CP/M text file
* (newline -> CRLF xlation, ^Z EOF convention).
* Otherwise, file is treatedfiles)
* stream = fopenb(name,mode) (binary files)
* stream = fopen(name,mode) (default-ascii files)
* stream = _fopen(nam/
if( *mode == 'w' || *mode == 'W' ) /* 'w'rite mode? */
fd=_creat(name,CREATMODE,ascii);/* create file *********/
el/**************************************************************************
*
* f o p e n F u n c t i o n
* ----------- */
{ /****************************/
REG FILE *sp; /* stream pointer */
REG WORD ii, /* index into _iob */ as a binary file.
*
*****************************************************************************/
#include "stdio.h" /e,mode,ascii)
* Where:
* stream -> file opened (FILE *), NULLPTR if failure
* name -> NULL terminated string containing fse if( *mode == 'a' || *mode == 'A' ) /* 'a'ppend mode? */
{ /* */
if( (fd=_open(name,WRITE,ascii)) < 0 ) /* ----------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* "fopen" opens a buffered stream file, ei
fd; /* file descriptor */
/****************************/
for( ii=0; /* look at _iob table */
****************************/
#define READ 0 /* read mode val */
#define WRITE 1 /* write mode val */
#defineilename,
* name="CON:" means the console,
* name="LST:" goes to the line printer, and
* otherwise a disk file is asstry open */
fd=_creat(name,CREATMODE,ascii);/* ow. do create */
else lseek(fd,0L,2); /* its out there, seef EOF ther on disk, console, or
* line printer.
* Note that "fopen" comes in three (3) flavors, one for ascii CP/M
* files, another (sp=(&_iob[ii]))->_flag&(_IOREAD|_IOWRT); /* not marked rd/wrt */
ii++ ) /* */
if( ii >= MAXFILES ) /* if CREATMODE 1 /* mode to use for 'creat' */
/****************************/
FILE * _fopen(name,mode,ascii) /* */
} /* ************************/
else if( *mode == 'r' || *mode == 'R' ) /* 'r'ead mode? */
fd=_open(name,REA */
{ /* */
return(_fopen(name,mode,1)); } /* binary file open */
NCTION ***********/
BYTE *name,*mode; /* */
{ /* */
return(_fopen(name,mode,0)); } /* ascii file open on stderr describing
* the last error encountered during a call to the system.
* It assumes the variable "errno" contains thite mode */
if( ascii == 0 ) /* ascii mode? */
sp->_flag |= _IOASCI; /* */
/***********************D,ascii); /* try open ************/
else return(NULLFILE); /* bad mode barf... */
/****************************/
 */
/****************************/
FILE * fopenb(name,mode) /* CLEAR FUNCTION ***********/
BYTE *name, *mode; /* s error.
* Note: "errno" is set when errors occur, but is not cleared.
* Note also that some of the UNIX errors are meaningles*****/
return(sp); /* return the stream ptr */
} /****************************/
/************************
if(fd<0) /* did one of those work? */
return(NULLFILE); /* no, oh well */
sp->_cnt = 0; /* init count * */
{ /* */
return(_fopen(name,mode,1)); } /* binary file open */
s under
* CP/M, and will print an undefined message (defined below).
* Finally, note that the defines in """errno.h""" will i****/
FILE * fopen(name,mode) /* CLEAR FUNCTION ***********/
BYTE *name, *mode; /* */
{ /* */
return(/***********************************************************************
*
* p e r r o r F u n c t i o n
* ------------/
sp->_fd = fd; /* and file des */
sp->_base = sp->_ptr = NULLPTR; /* and buffer pointers */
if( *mode == 'r */
{ /* */
return(_fopen(name,mode,1)); } /* binary file open */
ndex
* appropriately into the sys_errlist table, below.
*
* Calling sequence:
* ret = perror(s)
* Where:
* ret = errno
_fopen(name,mode,0)); } /* ascii file open */
/****************************/
FILE * fopena(name,mode) /* CLEAR FU-----------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* "perror" produces a short error message' || *mode == 'R' ) /* 'r'ead mode? */
sp->_flag = _IOREAD; /* say so */
else sp->_flag = _IOWRT; /* else 'w'ri
* s -> a string containing a message printed with
* the explanatory error message.
*
********************************** /* 20 */
_undeferr, /* 21 */
"EINVAL Invalid argument", /* 22 */
"ENFILE File table overflow", /* 23 */
"EMFILE Too 1 */
"ENOENT No such file", /* 2 */
_undeferr, /* 3 */
_undeferr, /* 4 */
"EIO I/O error", /* 5 */
_undeferr, 
write(STDERR,err,strlen(err));
write(STDERR," (",2);
buf = _itoa(errno,lbuf);
if( _errcpm != 0 ) /* assume this had soODSPC No directory space", /* 35 */
"ERENAME Can't rename file" /* 36 */
};
****************************************/
#include "portab.h"
#include "osif.h"
#include "osiferr.h"
#define NUMERRS 37
# many open files", /* 24 */
"ENOTTY Not a typewriter", /* 25 */
_undeferr, /* 26 */
"EFBIG File too big", /* 27 */
"E /* 6 */
"E2BIG Arg list too long", /* 7 */
_undeferr, /* 8 */
"EBADF Bad file number", /* 9 */
_undeferr, /* 10 */
mething to do */
{
*buf++ = '.';
buf = _itoa(_errcpm,buf);
}
*buf++ = ')'; *buf++ = '\n'; *buf = NULL;
write(STDERODSPC No directory space", /* 35 */
"ERENAME Can't rename file" /* 36 */
};
define STDERR 2
MLOCAL BYTE _undeferr[] = "Error undefined" ;
WORD sys_nerr = NUMERRS;
VOID perror(str) /* CLEAR FUNCTIONOSPC No space left on device",/* 28 */
_undeferr, /* 29 */
"EROFS Read-only file system", /* 30 */
_undeferr, /* 31 *
_undeferr, /* 11 */
"ENOMEM Not enough core", /* 12 */
"EACCES Permission denied", /* 13 */
_undeferr, /* 14 */
_uR,lbuf,strlen(lbuf));
return(errno);
}
MLOCAL BYTE *_itoa(nm,bp)
WORD nm;
REG BYTE *bp;
{
/* temporary... */
sprinN ***********/
BYTE *str;
{
REG BYTE *err;
BYTE lbuf[20], *buf, *_itoa();
EXTERN BYTE *sys_errlist[];
if( errno<0 ||/
_undeferr, /* 32 */
_undeferr, /* 33 */
_undeferr, /* 34 */
/* end of UNIX v7, start of CPM specific */
"Endeferr, /* 15 */
_undeferr, /* 16 */
_undeferr, /* 17 */
_undeferr, /* 18 */
_undeferr, /* 19 */
_undeferr,tf(bp,"%d",nm);
while(*bp) bp++;
return(bp);
}
BYTE *sys_errlist[NUMERRS] = {
_undeferr, /* 0 */
_undeferr, /* errno>=sys_nerr )
err = _undeferr;
else err = sys_errlist[errno];
write(STDERR,str,strlen(str));
write(STDERR,": ",2);NODSPC No directory space", /* 35 */
"ERENAME Can't rename file" /* 36 */
};
/*****************************************************************************
*
* f r e o p e n F u n c t i o n
* ---- /****************************/
if( fclose(sp) == FAILURE ) /* try closing the file 1st */
return(NULLFILE); /* oop***************************************/
#include "stdio.h" /****************************/
#define READ 0 /* read modse 'w'rite mode */
if( ascii == 0 ) /* ascii file? */
sp->_flag |= _IOASCI; /* */
/***************ULLPTR if failure
* name -> NULL terminated string containing filename,
* name="CON:" means the console,
* name="LSTname,READ,ascii); /* try open ************/
else return(NULLFILE); /* bad mode barf... */
/**********************---------------------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* "freopen" opens a buffered sts, it failed */
if( *mode == 'w' || *mode == 'W' ) /* 'w'rite mode? */
fd=_creat(name,0,ascii); /* create file ****e val */
#define WRITE 1 /* write mode val */
FILE *_freope(name,mode,sp,ascii) /****************************/
*************/
return(sp); /* return the stream ptr */
} /****************************/
FILE * freopen(name,mod:" goes to the line printer, and
* otherwise a disk file is assumed.
* mode -> "r" for read only,
* "w" for write o******/
if(fd<0) /* did one of those work? */
return(NULLFILE); /* no, oh well */
sp->_cnt = 0; /* init counream file, either on disk, console, or
* line printer. It first closes the given stream, and reuses that slot.
* Comes in 3 f*****/
else if( *mode == 'a' || *mode == 'A' ) /* 'a'ppend mode? */
{ /* */
if( (fd=_open(name,WRITE,asci
REG BYTE *name, /* file name */
*mode; /* "r","w", or "a" */
REG FILE *sp; /* stream pointer */
e,sp) /* CLEAR FUNCTION ***********/
BYTE *name, *mode; FILE *sp;
{ return(_freope(name,mode,sp,0)); } /* reopen ascii filenly,
* "a" to append (write only) to end of file.
* ascii = 0 if the file is handled as a CP/M text file
* (newline -t */
sp->_fd = fd; /* and file des */
sp->_base = sp->_ptr = NULLPTR; /* and buffer pointers */
if( *molavors, like "fopen".
*
* Calling sequence:
* stream = freopen(name,mode,stream)
* stream = freopa(name,mode,stream)
* si)) < 0 ) /* try open */
fd=_creat(name,0,ascii);/* do create if needed */
else lseek(fd,0L,2); /* its out there, se BOOLEAN ascii; /* CP/M text file */
{ /****************************/
REG WORD fd; /* file descriptor */
*/
FILE * freopa(name,mode,sp) /* CLEAR FUNCTION ***********/
BYTE *name, *mode; FILE *sp;
{ return(_freope(name,mo> CRLF xlation, ^Z EOF convention).
* Otherwise, file is treated as a binary file.
*
**************************************de == 'r' || *mode == 'R' ) /* 'r'ead mode? */
sp->_flag = _IOREAD; /* say so */
else sp->_flag = _IOWRT; /* eltream = freopb(name,mode,stream)
* stream = _freopen(name,mode,stream,ascii)
* Where:
* stream -> file reopened (FILE *), Nef EOF */
} /* ************************/
else if( *mode == 'r' || *mode == 'R' ) /* 'r'ead mode? */
fd=_open(de,sp,0)); } /* reopen ascii file */
FILE * freopb(name,mode,sp) /* CLEAR FUNCTION ***********/
BYTE *name, *mode; FIjBWBg/
R湧ケリ\床|g.抗<>/<17aXX汁 N2n<32><6E>ノモノムノ!M<><4D>n<EFBFBD><6E>ヌ`<00><> N2n<32><6E>ノモノムノ!|<00><>.<2E><06><><EFBFBD><EFBFBD>?.<2E><>T<>>€NケィJ櫚゚ €N^NuNV<4E><56>; /* number of bytes read */
}
e[]; /* List device name */
/****************************/
WORD _creat (fname,prot,type) /***********************f\床|g.ケ.P/<.セNケ@X蒐ケィBy,JBWBァ?9,HNケ濬渋
J櫚゚ N^NuNVH<>*|,,BGセ|l.シ,HNケ<05>:タRG`<60> y`,,g, y`t)
* fid = _creat(fname,prot,type);
*
* Where:
*
* fname is the address of a null terminated file name.
* prot is the ULE *sp;
{ return(_freope(name,mode,sp,1)); } /* reopen binary file */
/****************************************************************************
*
* C F I L E C R E A T E R O U T I N  /* number of bytes read */
}
*****/
BYTE *fname; /* -> File name */
WORD prot; /* Open mode */
WORD type; /* ASCII/BINARY flag *#include "portab.h"
LONG readl(fd,buf,lnum) /* CLEAR FUNCTION ***********/
WORD fd; /* file descriptor */
REG BYTE *bufNIX file protection
* type is 0 for ASCII, 1 for BINARY
*
******************************************************************E *sp;
{ return(_freope(name,mode,sp,1)); } /* reopen binary file */
E
* -----------------------------------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* The "c /* number of bytes read */
}
/
{ /****************************/
REG WORD ich; /* Channel number for open */
WORD _allocc(); /* gets a chann; /* addr */
LONG lnum; /* size */
{
LONG R;
REG UWORD tmp;
R = lnum;
while (lnum != 0)
{
tmp = (lnum < 3***********/
#include "portab.h" /* Include std definitions */
#include "osif.h" /* Include CP/M definitions */
#includeE *sp;
{ return(_freope(name,mode,sp,1)); } /* reopen binary file */
reat" routine opens a new "C" file and returns a file id.
* Comes in 3 flavors: ascii (CP/M text files), binary, and default
Hタミシ3( @g 5pH€ミ| `5pH€"M4Gモハ€RG`ャJ5pg
M2GムノBRG <f.BWNケjBWBg/
R湧ケ(\繍@g.抗<>/<1*a森汁J >f0>シNケel */
REG FD *ch; /* -> CCB for channel */
/* */
if((ich = _allocc()) == FAILURE) /* Allocate a cha2768L)? (int)lnum : 32768;
if (read(fd,buf,tmp) != tmp)
break;
buf += tmp;
lnum -= tmp;
}
return(R-lnum) "osiferr.h"
#include "errno.h" /* Error codes */
EXTERN BYTE __tname[]; /* Terminal name */
EXTERN BYTE __lnam.ヲNケ@.シ2.<
H€?NケメT繍櫚゚€N^NuNVH<>*n>シ/<,H/
Nケ<>3タ,Hl.<2E>/<.ォNケ@X蒐ケィ#ヘ.P>シ/<,,?9,HNケ* (currently ascii).
*
* Calling Sequence:
* fid = creat(fname,prot)
* fid = creata(fname,prot)
* fid = creatb(fname,pronnel */
return (FAILURE); /* Can't (EMFILE) */
/* */
__chinit(ich); /* Clear out channel's ccb */*****/
BYTE *fname; WORD prot;
{ return(_creat(fname,prot,1)); } /* binary file open */
n(_creat(fname,prot,0)); } /* default to ascii */
WORD creata(fname,prot) /* CLEAR FUNCTION ***********/
BYTE *fna
* The blkfill function sets a region of memory to a given value.
*
* Calling Sequence: -> flags |= ISLPT|OPENED; /* set flag */
return(ich); /* */
} /* */
/************************+€X繍@fU0`f>シ/.?Nケ"暴繍@g>⑮ケ(3<>3$3<>43&p<>`2U>シBァ-H€?Nケ濬州WBァ-H€?Nケ<>0NqJ櫚゚ €N^
ch = _getccb(ich); /* Get address of ccb */
/* */
if(type==0) /* ASCII file? */
ch -> flags |.<2E><06>?<#NケェT<EFBDAA>-H€シ@g0F.<2E>?< NケェT<EFBDAA> <<00><><EFBFBD>チュ0-g濳ュ0oメ.-0S<30>g<00>-gF>シ"/</
<06>4/-/
Nケ&タ゚<EFBE80>e; WORD prot;
{ return(_creat(fname,prot,0)); } /* ascii file open */
WORD creatb(fname,prot) /* CLEAR FUNCTION *****
*
* blkfill(addr,fc,num);
*
* Where:
* addr Is a pointer to region of mem****/
if(__open(ich,fname,CREATE) != 0) /* Use BDOS interface */
RETERR(FAILURE,ENODSPC); /* Oops, No dir space. *NuNV<4E><56><EFBFBD>*n
B<EFBFBD>:.>ョNケ&^(@ fp<>`<01>,gB@`x,g3<> 3$3<>43&p<>`X,g.<2E>/
/ NケnP汁>,f.<2E>/
/ = ISASCII; /* Yes, mark it. */
/****************************/
if(_strcmp(fname,__tname) == 0) /* Terminal file? ー|g3<>3$3<>43&p<>`<00>U<>ソ>シ!/</
<06>4//
Nケ&タ゚<EFBE80>ー|g3<>3$3<>43&p<>`V+G -<08>+@I<>4G<34>エケヒd
******/
BYTE *fname; WORD prot;
{ return(_creat(fname,prot,1)); } /* binary file open */
ory to blkfill
* fc Is a character to blkfill with
* num Is the number of chars to blkfill with
* /
/* Else: */
ch -> flags |= OPENED; /* Set OPEN bit */
return(ich); /* Return Channel # */
} /***************************************************************************
*
* b l k f i l l F u n c t i o */
{ /* */
ch -> flags |= ISTTY|OPENED; /* Set flag */
return(ich); /* Return file descriptor */
gR形<52> "
メシ4吹ムュ`Bュ`
-0<>+@+m U -NqJ櫚゚8タN^NuNV<4E>魲W?. /.a:\蒐qN^NuNV<4E>魲W?. /.a"\蒐qN^NuNV<4E><56>>シ?. *****/
BYTE *fname; WORD prot;
{ return(_creat(fname,prot,1)); } /* binary file open */

****************************************************************************/
#include <portab.h>
VOID blkfill(addr,f /****************************/
WORD creat(fname,prot) /* CLEAR FUNCTION ***********/
BYTE *fname; WORD prot;
{ return
* -------------------------------
* Copyright 1983 by Digital Research Inc. All rights reserved.
*
} /****************************/
else if(_strcmp(fname,__lname) == 0) /* List device? */
{ /* */
ch /.a\蒐qN^NuNVH<>Nケ'ホ>JGlp<>`メ>⑮ケ%<25>0<>エ*@ロ<>4"Jn fUJnfU.シ,!/.Nケ+€X繍@f U0`<00>.シ,&/.Nケc,num) /* CLEAR FUNCTION ***********/
REG BYTE *addr;
REG BYTE fc;
REG WORD num;
{
while( num-- > 0 )
*adling sequence:
* size = _filesz(fd)
* where:
* size = # bytes in file;
* 0 if not disk file;
* -1 if I/O error
* fd/
<06>4/-/
Nケ&タ゚<EFBE80>ー|g3<>3$3<>43&p<>`tU<>ソ -タシ<EFBE80><EFBDBC><EFBFBD>€"- S<><EFBFBD><EFBDBC><EFBFBD>€D>シ!/</
<06>4/.<2E><>/
Nケ&タ゚<EFBE80>ー|g=============================================*/
if( fp->flags & DIRTY ) { /* File been used? */
fp->offset = fp->g>シ//
aホP汁<01>,g>シ//
aエP汁|,f.<2E>/
/ atP汁d-E<><45>J<>X ,蕫-@<40><><EFBFBD><EFBDAE> ,ーョ<EFBDB0><EFBDAE>N,gF>シ"/</ <06> /* Current user # */
/****************************/
if((fp = _chkc(fd)) == NULLFD) /* Convert to pointer */dr++ = fc;
}
 = file descriptor returned by open.
*
***********************************************************************/
#include /**********************************************************************
*
* _ f i l e s z f u n c t i o n
* -----------hiwater; /* yes: this must be right */
} else { /****************************/
xuser = _chkuser(fp->user); /* Chec4/,/ Nケ&タ゚<EFBE80>ー|g3<>3$3<>43&p<>`<00>T<>ソ ,タシ<EFBE80><EFBDBC><EFBFBD>€", S<><EFBFBD><EFBDBC><EFBFBD>€$>シ!/</ <06>4/.<2E><>/ Nケ&タ゚<EFBE80>)n<><6E> ,
return(FAILURE); /* Can't: EBADF */
if(fp->flags&(ISTTY|ISLPT)) /* Non disk file? */
return(0); /* *r++ = fc;
}
"portab.h"
#include "osif.h"
#include "osiferr.h"
#include "errno.h"
LONG _filesz(fd) /****************************/
--------------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* This routine computes the size of a k user # for change */
__OSIF(FILSIZ,&(fp->fcb)); /* Do BDOS call */
_uchkuser(fp->user,xuser); /* Change back if neタシ-@<40><>&Lラ<4C><EFBE97><EFBFBD>4, ミシエキタd"J<> 
f セ<
g<
`S<>ヌRャ`メ ミシエキタe4>シ"/</ <06>4/.<2E><>/ Nケ&タ゚<EFBE80>ー|g .<2E><>/
#if PCDOS /*================================================================*/
fp->offset = (fp->fcb).fcb_filsiz; /* simpler++ = fc;
}
WORD fd; /* file descriptor */
{
REG FD *fp; /* file's ccb pointer */
REG BYTE *p1, *p2; /* temps for buffer CP/M file, and leaves the fd
* pointing to the end of file.
* Note that the file must have been previously opened.
*
* Caleded */
#if HILO /*--------------------------*/
fp->fcb.record &= 0xFFFFFFL; /* mask off cr byte */
xsector = f炊`$`T@J<> ,ーャ o)l .<2E><>`<00>ヲJ櫚゚8潘^NuNV<4E><56><EFBFBD>*n(n ..-G<><47> -蕫-@<40><> -タシgj -ーョ<EFBDB0><EFBDAE>-gF>シ"/<, eh? */
#endif /*================================================================*/
#if CPM /*===================S⑳<53>腴㎜<18>
R<EFBFBD> "メシ<EFBE92><EFBDBC><EFBFBD>吹NqJ櫚゚8潘^NuNV<4E><56><EFBFBD>*n
B<EFBFBD>:.>ョNケ&^(@ fp<>`レJ<EFBE9A>B@`,g3<> 3$3<>43&p<>`,work */
REG LONG xsector; /* where we are in file */
FD *_chkc(); /* cvt & check fd to fp */
REG WORD xuser;p->fcb.record - 1; /* last sector in file */
#else /*--------------------------*/
xsector = (fp->fcb.record >>8) - *******************/
} /****************************/
#endif /*===================================================er[0]); /* start of buf */
p2 = &(fp->buffer[SECSIZ]); /* end of buf */
while( p1<p2 && *p1 != EOFCHAR3<>.,=:+-&/\|()[]*3!!!!", /* Write out */
1L,B_WRITE) != 1) /* the buffer */
RETERR(FAILURE,EIO); /* */
fp->flags &C RTL -- Program not linked for floating point
$Cannot open Cannot create
B ^ € <0B> <0B>1; /* last sector in file */
#endif /*--------------------------*/
if( fp->flags & ISASCII ) /********************=============*/
fp->hiwater = fp->offset; /* whatever happened, set it*/
fp->flags |= ATEOF; /* make sure they kn) /* look for EOFCHAR */
p1++; /* */
fp->offset += p1-&(fp->buffer[0]); /* update offset to EOF */
CP/M-68K(tm), Version 1.2, Copyright (c) 1983, Digital R= ~DIRTY; /* turn off this bit */
} /* */
if(_blkio(fp,xsector,fp->buffer, /* scan this last sect <0B> <0B> <0B> <0B> <0B>
<EFBFBD> <0B> <0B> <0B> 0 <0B>
4 <0B> <0B>
<0B> <0B> <0B> <0B> <0B> <0B> <0B> <0B> <0B> <0B> B <09> ^ € <0B> <0B>********/
{ /* Ascii file: posit to EOF */
if(xsector >= 0) /* if any size at all */
{ /* **************ow */
return(fp->offset); /* this is it */
} /****************************/
 } /* *********************/
else fp->offset=0; /* o.w. beginning of file */
/****************************/
/**************************************************************************
*
* f g e t c F u n c t i o n
* -----------or */
1L,B_READ) != 1) /* for EOFCHAR */
RETERR(FAILURE,EIO); /* */
} /* got correct <0B> <0B> <0B> <0B> <0B>
<EFBFBD> <0B> <0B> <0B> 0 <0B>
8 <0B> <0B>
<EFBFBD>

*******/
if( xsector != fp->sector ) /* need to change sector? */
{ /* get correct sector********/
ifw */
return(fp->offset); /* this is it */
} /****************************/
 } else { /* Binary file:compute size */
fp->offset = (xsector+1) << 7; /* set to end of last record*/
} /*********----------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* Function "fgetc" does the yanking of a csector********/
fp->sector = xsector; /* */
fp->offset = xsector << 7; /* */
p1 = &(fp->buff
((fp->flags & DIRTY) != 0) /* Something to write 1st? */
{ /* */
if(_blkio(fp,fp->sector,fp->bufferw */
return(fp->offset); /* this is it */
} /****************************/
har out of the stream.
*
* Calling sequence:
* ch = fgetc(s)
* Where:
* ch = a (WORD) character (-1 on EOF)
* s -> a stfd) /* CLEAR FUNCTION ***********/
REG WORD fd; /* File descriptor to close */
{ /****************************/
EXsp) ); /* o.w. whatever happens */
} /****************************/

*
* Modifications:
* 12/83: PC-DOS mods whf
* 10/83: changed user # handling wream file (FILE *)
*
*****************************************************************************/
#include "stdio.h"
#de/***************************************************************************
*
* C l o s e F u n c t i o TERN FD *_chkc(); /* fd -> fp conversion MGL */
REG FD *fp; /* file pointer Temporary */
REG WORD rv; /* return valup) ); /* o.w. whatever happens */
} /****************************/
hf
* 9/83: add steve's user # mods, change _chkc whf
* 8/83: improve error handling whf
**********fine CMASK 0xFF
WORD fgetc(sp) /* CLEAR FUNCTION ***********/
REG FILE *sp; /* stream pointer */
{ /********n
* ---------------------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
* e */
REG WORD xuser; /* User number temporary */
/* */
if((fp=_chkc(fd)) == NULLFD) /* File Open? p) ); /* o.w. whatever happens */
} /****************************/
******************************************************************/
#include "portab.h"
#include "osif.h"
#include "osiferr.h********************/
EXTERN WORD _filbuf(); /* use this when we run shrt*/
if( --sp->_cnt >= 0 ) /* any chars left in b
* The close function is used to terminate access to a file / device.
*
* Calling Sequence:  */
RETERR(FAILURE,EBADF); /* no, quit */
rv = SUCCESS; /* assume it will work */
if ((fp->flags & (ISTT"
#include "errno.h"
/****************************/
EXTERN BYTE __xeof; /* End of file for ASCII */
WORD close(uf? */
return(((WORD) *sp->_ptr++) & CMASK);/* return & advance ptr ifso*/
else /* */
return( _filbuf(
*
* ret = close(fd);
*
* Where "fd" is an open file descriptor to be CLOSEd. Y|ISLPT)) == 0) /* Character device? */
{ /* if not, handle file: *****/
#if CPM /*================================ */
} /****************************/
 /* */
#endif /*================================================================*/
} /* end of file handling *der CPM before
* version 4. The user number is stored in the ccb structure;
* if a zero, the default user # is a= FAILURE; /* can't */
xuser = _chkuser(fp->user); /* Check user # for change */
if((__OSIF(CLOSE,&(fp->fcb))&0================================*/
if((fp->flags & ISASCII) != 0 && (fp->flags & ISREAD) == 0) /* */
{ /* ASCII fil */
} /****************************/
****/
__chinit(fd); /* Release the space */
_freec(fd); /* Release the channel */
if( rv == SUCCESS ) /* Wssumed, else the _chkuser()
* routine sets the user number to the desired user number (one less
* than the stored usxFF) == 0xFF)/* Close the fcb */
rv = FAILURE; /* */
_uchkuser(fp->user,xuser); /* Change user # if needee? not ReadOnly?*/
if( fp->offset < fp->hiwater ) /* Have we been seeking? */
lseek(fd,0L,2); /* Seek to EOas everything ok? */
return(rv); /* Yes, return Success */
else RETERR(FAILURE,EIO); /* else let them know er number, since user 0 is valid - similar to the
* default drive spec for an FCB).
* '_uchkuser()' sets the user d */
#endif /*================================================================*/
#if PCDOS /*=============================/***************************************************************************
*
* _ c h k u s e r F u n c t F ifso */
write(fd,&__xeof,1); /* Write a ^Z character */
} /****************************/
if((fp->fl */
} /****************************/
number back to its previous value.
*
*********************************************************************===================================*/
if((__OSIF(CLOSE,&(fp->fcb))&0xFF) == 0xFF)/* Close the fcb */
rv = FAILURE;i o n
* ---------------------------------
*
* '_chkuser' and '_uchkuser' handle user numbers unags & DIRTY) != 0) /* Buffer dirty? */
if(_blkio(fp,fp->sector,fp->buffer,1L,B_WRITE) != 1)/* write it */
rv *******/
#include "portab.h"
#include "osif.h"
/****************************/
WORD _chkuser(newu) /* */
W==========================*/
} /****************************/
======================================*/
if( newu == 0 ) /* Default user #? */
return; /* assume no change
* Entry Points:
*
* _petoa(^float, ^buff, prec);
* _pftoa(^float, ^buff, pre/
return prevu; /* Return the previous */
#else /*===============================================================/***************************************************************************
*
* d o p r t f p R o u t i n e ORD newu; /* Desired user number */
{ /****************************/
#if CPM /*==========================================================*/
} /****************************/
*/
if( newu != prevu ) /* Are they different? */
__OSIF(USER,prevu-1); /* Yes, set to what it was*/
#else /*c);
* _pgtoa(^float, ^buff, prec);
*
* ^float is a pointer to the floating number to convert */
return 0;
#endif /*===============================================================*/
} /************************
* -----------------------------
*
* This file contains subroutines called from "_doprt()" which ===============================*/
REG WORD prevu; /* Previous user number */
/****************************/
if(===============================================================*/
return 0;
#endif /*====================================
* ^buff is a pointer to the buffer
* prec is the precision specifier
*
* Modifications: ****/
/****************************/
_uchkuser(newu,prevu) /* */
WORD newu; /* Desired user number *are
* specific to floating point. The purpose of having a separate file
* is so that these routines may be declared gl newu == 0 ) /* Default user # desired? */
return 0; /* Yes, return */
prevu = __OSIF(USER,0xFF)+1; /* Get pre===========================*/
} /****************************/

* 1/84 whf - change to include "osif.h"
* 8/83 whf - add in DRC floating point call
* 10/83 whf - get it to wo/
WORD prevu; /* Previous user number */
{ /****************************/
#if CPM /*=========================obal in a special
* version of "s.o", to allow running without the floating point
* library routines.
*v and adjust */
if( newu != prevu ) /* Are they different? */
__OSIF(USER,newu-1); /* Yes, set to desired u# *rk on DRC
*
*****************************************************************************/
/* /* */
BYTE *_pgtoa(addr,buf,prec) /* Print "G" format */
FLOAT *addr; /* -> Number to convert */
BYTE *
/* */
BYTE *_petoa(addr,buf,prec) /* Print "E" format */
FLOAT *addr; /* -> Number to convert */
B (f, e, or g) */
{ /************************************/
REG BYTE *ss; /* Temp pointer for adjustment */
REG Wc) /* Print "F" format */
FLOAT *addr; /* -> Number to convert */
BYTE *buf; /* -> Output buffer */
WOR***********************************************************/
#else /* for DRC */
/******************************************* */
#include "portab.h" /* */
#include "osif.h" /* */
/* */
/********************************buf; /* -> Output buffer */
WORD prec; /* Fraction precision specifier */
{ /******************************YTE *buf; /* -> Output buffer */
WORD prec; /* Fraction precision specifier */
{ /*************************ORD nn; /* Counter */
WORD len; /* */
/* */
ss = buf; /* Save til later */
if( prec <D prec; /* Fraction precision specifier */
{ /************************************/
FLOAT fp; /* Float temp *********************************/
/* */
BYTE *ftoa(); /* General purpose floating point */
/* *********************************************/
#if CPM68K /* I hope to resolve these differences someday. whf 8/83 */
/***********/
BYTE *sp; /* String temp */
/************************************/
sp = _pftoa(addr, buf, prec); /* T***********/
FLOAT fp; /* Floating temp */
prec = (prec < 0) ? 6 : prec; /* If < 0, make it 6 */
fp = *addr; 0) prec = 6; /* If <0, make it 6 */
if( prec > 17 ) prec = 17; /* If >17, make it 17 */
if( kind == 'f' ) nn = */
/************************************/
prec = (prec < 0) ? 6 : prec; /* If < 0, make it 6 */
fp = *addr; //
BYTE *_drcftoa(addr,buf,prec,kind) /* Use DRC ftoa routine */
DOUBLE *addr; /* -> Number to convert */
REG BYT***********************************************************************/
BYTE *ftoa(); /* Converts float to ascii "F" fmt */ry F first */
if(strlen(buf) > (7+prec)) /* Smallest FP string */
sp = _petoa(addr,buf,prec); /* Do E format /* Load temp */
return(etoa(fp,buf,prec)); /* Do conversion */
} /************************************/
17; /* use max. precision */
else if( kind == 'e' || kind == 'E' )
nn = prec + 1;
else if( (nn = prec) == 0 ) /* G f* Load float number */
return(ftoa(fp,buf,prec)); /* Do conversion */
} /************************************/
E *buf; /* -> Output buffer */
REG WORD prec; /* Fraction precision specifier */
BYTE kind; /* Kind of convert
BYTE *etoa(); /* Converts float to ascii "E" fmt */
/************************************/
BYTE *_pftoa(addr,buf,preinstead */
return sp; /* */
} /************************************/
/* */
/*****************ormat */
++nn;
if (nn > 17) nn = 17;
*buf = ' ';
ftoa(addr, &buf[1], 80, nn, kind); /* go convert */
if( k /************************************/
return(_drcftoa(addr,buf,prec,ch));/* Do conversion */
} /****************** Fraction precision specifier */
BYTE ch; /* Char format specifier */
{ /************************************/
*******/
> Number to convert */
BYTE *buf; /* -> Output buffer */
WORD prec; /* Fraction precision specifier */
BYrailing zeros */
p = dot + prec + 1;
lastdig = *p;
*p = '\0';
if (lastdig >= '5') {
while (1) { /* round preceeind == 'f' )
_ffmt(ss,prec);
len = strlen(buf);
if(buf[len-1] == '.') /* Zap trailing decimal point */
buf[len******************/
/****************************************************************************/
MLOCAL _ffmt(s, prec)
return(_drcftoa(addr,buf,prec,ch));/* Do conversion */
} /************************************/
/* */
*******/
TE ch; /* Char format specifier */
{ /************************************/
return(_drcftoa(addr,buf,prec,ch));/* ding digit */
if (*--p == '.') p--;
if ((*p += 1) <= '9') break;
*p = '0';
}
if (*p < '1') {
if (*p == '-1] = NULL; /* */
while( *buf == ' ' ) /* Zap leading blanks */
++buf; /* */
if( ss != buf ) char *s;
register prec;
{
register char *p;
register int i;
char *dot, lastdig;
p = s;
while (*++p) {
if (BYTE *_pgtoa(addr,buf,prec,ch) /* Print "G" format */
FLOAT *addr; /* -> Number to convert */
BYTE *buf; /* -> タN^NuNV<4E><56>n <0B><>n
<EFBFBD><EFBFBD>n <09><>n<08><> .<2E><>qN^NuNV<4E><56>n <09><>n<08><>N^NuNV<4E>鸙ョfaー`>シda8BWaN^NuNVH<>.ョaヤJ@fZ>シカ/.NケDo conversion */
} /************************************/
/* */
BYTE *_petoa(addr,buf,prec,ch) /* Print .') *(p-1) = '-';
*p = '1';
}
}
}
#endif
/********************************************************************/* Did we zap leading blanks? */
strcpy(ss,buf); /* Ifso, shift everything into place*/
return ss; /* */
*p == '.') dot = p; /* found decimal pt. */
else if (*p == 'e') {
s = dot + prec + 1;
if (s < p)
while (*s++ Output buffer */
WORD prec; /* Fraction precision specifier */
BYTE ch; /* Char format specifier */
{ シX<EFBDBC>>JGl.ョ/<<ナaワX渋t>シxa<01>.ョ/97イ?<??97「a^゚<>
>⑮ケJ櫚゚潘^NuNV<4E><56>.ョa`J@f$.シ<ラ/97イ?<?<?9"E" format */
FLOAT *addr; /* -> Number to convert */
BYTE *buf; /* -> Output buffer */
WORD prec; /*********/
} /************************************/
BYTE *_pftoa(addr,buf,prec,ch) /* Print "F" format */
FLOAT *addr; /* - = *p++); /* remove extra zeros */
return;
}
}
i = p - dot - 1;
while (i++ < prec)
*p++ = '0'; /* fill t7「a<>
N^NuNV<4E><56>\N^NuNV<4E><56>J@g
>シ<><EFBDBC>a髙`<60>^NuNV<4E><56>>シ/<7t?97「Nケ \床|fJ97tf
Ry7<>B@`pNqN^NuNVH<>Jyn
* -------------------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
* nce *p until NULL. */
;
return((WORD)p-str);
}
<1A><>0.<2E>銧n<E98AA7><6E> Jn<4A>=n<><6E><EFBFBD>0.<2E><>n<EFBFBD><6E>=@<40>鵯.<2E>詛Z .0<><30>, n<><6E> -f"Sn<53><6E>.ョ n<><6E>H€?Nケ<18>蹴ョ<E8B9B4><EFBDAE>n<EFBFBD><6E>0.<2E>鶸n<E9B6B8>鵯@o.ョ.<2E><>€?Nケ<18>汁゙ in s.
*
* WORD strlen(s)
* BYTE *s;
**********************************************************************/
#include "po(code) /* CLEAR FUNCTION ***********/
WORD code; /* Exit status */
{ /* */
_cleanup(); /* Close all 7<>fj.97<>gR⑪ng0>シca<00>.シ7カ/97イ?<?97、?97「a`゚<>
`&>シ/?97「Nケ能繍€l.シ<秣<00>&J櫚゚タN^NuNVH<>
* The exit function is called from anywhere to pass control back to
* the CCP from the executing C program. B€NBNV<4E><56><EFBFBD>Nケ.ヤBW/<5MNケワX<EFBE9C>>シ/<5MNケワX<EFBE9C>>シ/<5MNケワX<EFBE9C>-|5C<35><43> n2n ムノB=|<01><>*nJgJgH€Hタミシ?f @Rn<52><6E>0.<2E><>n<EFBFBD><6E>@o.ョ n<><6E>H€?Nケ<18>蹴ョ<E8B9B4><EFBDAE>リRn<52><6E>0.<2E>鶸n<E9B6B8>鵯@o.ョ.<2E><>€?Nケ<18>汁゙Rn<52>璉0.<2E>鎭qJ櫚゚ €N^NuNVH<> /<@J?.?.rtab.h"
WORD strlen(str) /* CLEAR FUNCTION ***********/
REG BYTE *str;
{
REG BYTE *p;
for( p = str; *p; p++ ) /* adv(stream) files*/
_exit(code); /* return to O.S. */
} /***************************/
*n(n H€f
Jfp``猪@NqJ櫚゚0N^NuNVH<>*|:ツサ<EFBE82>:訶 >ョ/aX汁<58>櫚゚ N^NuNVH<>*n<. >SGm
0タ]fT港<54>.シ>l?Nケ
* Note that the stream files are closed via '_cleanup()'.
*
* Calling Sequence:
* gR港腴g<00>G M2GムノJgJ5pH€Hタミシ?f @f45pH€Hタミシ?f @g 5pH€ミ| `5pH€"M4Gモハ€RG`ャJ5pg
M2GムノBRG <f.BWNケ/<06> /. nN節<4E>*@サ<>@JfB(n <>@Jg%H<>|
lp0`p7゙@ヌ`磽 NqJ櫚゚0€N^NuNVH<>*n<.Hニ n. nfzJ㍑JEgance *p until NULL. */
;
return((WORD)p-str);
}
stream) files*/
_exit(code); /* return to O.S. */
} /***************************/
<18>繍櫚゚ タN^NuNV<4E>鸙y7喩,.シ>l. H€?Nケ<18><>.シ>l?< Nケ<18>憘N^NuNVH<> *n(n >.JGgンgSG`<60>GoB`<60>櫚゚0€N^NuNV<4E><56>
* exit(code);
*
* Where:
* code Is the exit status (ignored)
* /***************************************************************************
*
* E x i t F u n c t i o タシタ閾SE`鐐j nf&z J㍑JEg タシタ諛SE`鍮Ef-<03><>`<JngJ㌫ n P-"n R<> D€.J㍑.<2E>/Nケ42X<32>. 9?<3F>タ`<60>
Nqnce *p until NULL. */
;
return((WORD)p-str);
}
stream) files*/
_exit(code); /* return to O.S. */
} /***************************/
/**********************************************************************
* STRLEN - finds the number of non-null characters
****************************************************************************/
#include "portab.h"
VOID exitJ櫚゚ 潘^NuNVH<>*n<.Hニ n0Hタ.JngJ㌫ D€. n P-"n R疏ホシ<00><>J㍑.<2E>/Nケ42X<32>. 9?<3F>タ`<60>
NqJ櫚゚ タN^NuNV<4E><56> __u, __u, __u, __u, __u, __u, __u,
/* X Y Z [ \ ] ^ _ */
/*13m*/ __u, __u, __u, __p, __p, __p, __p, __p,
/* ` a b c d _c, __c, __c,
/* sp ! " # $ % & ' */
/*04m*/ __ps, __p, __p, __p, __p, __p, __p, __p,
/* ( ) * + , - . / */
/*05m*/ -G<><47> -蕫-@<40><> -タシg<00> -ーョ<EFBDB0><EFBDAE><00>-gF>シ"/</
<06>4/-/
Nケ/セ゚<EFBDBE>ー|g3<>?b3<62>@D?dp<64>`U<>ソ>シ!/<LOBAL UBYTE __atab[] = { /* table of ascii char types */
/***************************************************************** __l, __p, __p, __p, __p, __c
};
___atab()
{
}
t>ョNケホN^NuNVH<>BGセ|l0<>ミシ>^.€NケヲRG`祀櫚゚€N^NuNVH<>*n0-タ|g*.康ケ-g
.ュNケ2@B@Hタ+@+@Bme f g */
/*14m*/ __p, __l, __l, __l, __l, __l, __l, __l,
/* h i j k l m n o */
/*15m*/ __l, __l, __l, __l, __l, __l, ____p, __p, __p, __p, __p, __p, __p, __p,
/* 0 1 2 3 4 5 6 7 */
/*06m*/ __d, __d, __d, __d, __d, __d, __d, __d,
/* 8 9 : /
<06>4/.<2E><>/
Nケ/セ゚<EFBDBE>ー|g3<>?b3<62>@D?dp<64>`~+n<><6E>&M -タシラタラ<EFBE80>4
ミシエキタdJ㎜
ロS⑲ュ`覊㌶ -ーュ o+m ***/
/* nn0 nn1 nn2 nn3 nn4 nn5 nn6 nn7 */
/* nul soh stx etx eot enq ack bel */
/*00m*/ __c, __c, __c, __c, __c, __c, __c@D?dp<64>`X,g.<2E>/
/ Nケ$"P汁>,f.<2E>/
/ a6P汁&-E<><45><EFBFBD>.,訒セャg<00>,gF>シ"/</ <06>4/,/ Nケ/セ゚<EFBDBE>/**************************************************************************
* CTYPE.C - provides static tables for 'ctype.hl, __l,
/* p q r s t u v w */
/*16m*/ __l, __l, __l, __l, __l, __l, __l, __l,
/* x y z { | } ~ del */
/*17m*/ __l, __l; < = > ? */
/*07m*/ __d, __d, __p, __p, __p, __p, __p, __p,
/* @ A B C D E F G */
/*10m*/ __p, __u, __u, __u, __u, __u .<2E><>.Rョ<52><EFBFBD> 蕫-@<40><><EFBFBD><EFBDAE> >シ!/.<2E><>/ /.<2E><>/
Nケ/セ゚<EFBDBE>Hタ,ンョ<EFBE9D><EFBDAE> <06>ムュ <06><06>ルタ -ーュ o+m ショ<EFBDBC><EFBDAE>U .<2E><>セJ㌶ .<2E><>, __c,
/* bs ht nl vt np cr so si */
/*01m*/ __c, __cs, __cs, __c, __cs, __cs, __c, __c,
/* dle dc1 dc2 dc3 dc4 nak syn ー|g3<>?b3<62>@D?dp<64>`T<>ソ>シ!/</ <06>4// Nケ/セ゚<EFBDBE>ー|gT .<2E><><EFBFBD><00>)G ,タシ-@<40><>&Lラ<4C><EFBE97><EFBFBD>4 ミシエ' extern defs.
* Modified 10/31/82 by MGL to add ___atab() for forced loading
************************************************, __l, __p, __p, __p, __p, __c
};
___atab()
{
}
, __u, __u,
/* H I J K L M N O */
/*11m*/ __u, __u, __u, __u, __u, __u, __u, __u,
/* P Q R S T U V W */
/*12m*/ __u,`-gD>シ"/</
<06>4/-/
Nケ/セ゚<EFBDBE>ー|g3<>?b3<62>@D?dp<64>`hU<>ソ>シ!/</
<06>4/.<2E><>/
Nケ/セ゚<EFBDBE>ー|g U .etb */
/*02m*/ __c, __c, __c, __c, __c, __c, __c, __c,
/* can em sub esc fs gs rs us */
/*03m*/ __c, __c, __c, __c, __c, _キタdDJ<44>@シ<fT ,ーャ o)l .<2E><><EFBFBD>6`シ<
fR騎ャ`
ニS<EFBE86>騎ャ`ー`<00><> ,ーャ o)l .<2E><>qJ櫚゚8潘^NuNV<4E><56><EFBFBD>*n(n ..***************************/
#include "portab.h"
#define CTYPE /* tells ctype.h who's boss */
#include "ctype.h"
G __l, __p, __p, __p, __p, __c
};
___atab()
{
}
/*********************************************************************
*
* f c l o s e F u n c t i o n
* --------------<06>4/-/
Nケ/セ゚<EFBDBE>ー|g3<>?b3<62>@D?dp<64>`tU@ -蕫+@ -タシ<EFBE80><EFBDBC><EFBFBD>€"- S<><EFBFBD><EFBDBC><EFBFBD>€&>シ!/</
<06>4/-/
Nケ/セ゚<EFBDBE>e(sp->_fd)); /* and return */
} /****************************/
LLPTR, NULLPTR, 0},
{ 3, 0, NULLPTR, NULLPTR, 0 },
{ 4, 0, NULLPTR, NULLPTR, 0 },
{ 5, 0, NULLPTR, NULLPTR, 0 },
to close */
{ /* */
/****************************/
if( sp->_flag & (_IOREAD|_IOWRT) ) /* is it closeabHerein lie the data definitions for the stdio.h functions.
* Note: function __fdecls() is here so _main can force this module t---------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* "fclose" flushes a stream (buffered file)`>シ€/
<06>4a X秀<58>4J㎜ワS㌔<53> .<2E><>qJ櫚゚8€N^NuNVH<>*n>. 0SGJ@oB`<60>櫚゚ €N^NuNV<4E><EFBFBD>*n.. <.-G<>鸙㎜, 
f0|
.<2E>(sp->_fd)); /* and return */
} /****************************/

{ 6, 0, NULLPTR, NULLPTR, 0 },
{ 7, 0, NULLPTR, NULLPTR, 0 },
{ 8, 0, NULLPTR, NULLPTR, 0 },
{ 9, 0, NULLPTRle? */
{ /* yup... */
fflush(sp); /* do the flush */
if( sp->_flag & _IOABUF ) /* was buf alloc'd? o
* be loaded.
*
*****************************************************************************/
#define FILE /* avoid d and releases the
* channel and any allocated buffers.
*
* Calling sequence:
* ret = fclose(stream)
* Where:
* stream ->?NケェT<EFBDAA>H€Hタ.€?NケェT輯㌔ミ .<2E><>qJ櫚゚ タN^NuNV<4E>ワH<EFBE9C>*n
0.<>エ(@ル<>@ZG<5A>.シ<00>?< NケェT<EFBDAA><F>シ /<06><><EFBFBD>ワ/
a<>*@ (sp->_fd)); /* and return */
} /****************************/
, NULLPTR, 0 },
{ 10, 0, NULLPTR, NULLPTR, 0 },
{ 11, 0, NULLPTR, NULLPTR, 0 },
{ 12, 0, NULLPTR, NULLPTR, 0 },
*/
free(sp->_base); /* free it ifso */
sp->_base = sp->_ptr = NULL; /* reset these */
sp->_cnt = 0; /* uplicate decls */
#include "stdio.h"
#if MAXFILES != 16
compile snafu: fix following table
#endif
struct _iobuf _i file to be closed (FILE *)
* ret = SUCCESS or FAILURE (if IO error)
*
*****************************************************/****************************************************************************
*
* D a t a D e c l a r a t i o n s M o d u<><75>/ /.<2E><>/
Nケ/セ゚<EFBDBE>Hタ".<2E><>3<>?b3<62>@D?dp<64>`<00> .<2E><>€梳 .<2E><>€ルタ .<2E><> -ーュ o+m J㌶ .<2E><>-gB>シ"/</
{ 13, 0, NULLPTR, NULLPTR, 0 },
{ 14, 0, NULLPTR, NULLPTR, 0 },
{ 15, 0, NULLPTR, NULLPTR, 0 }
};
__fdecls()
*/
} /* reset all flags */
sp->_flag &= ~(_IOREAD|_IOWRT|_IOABUF|_IONBUF|_IOERR|_IOEOF|_IOLBUF);
return(closob[16] ={
{ 0, _IOREAD, NULLPTR, NULLPTR, 0},
{ 1, _IOWRT+_IONBUF, NULLPTR, NULLPTR, 0},
{ 2, _IOWRT+_IONBUF, NU************************/
#include "stdio.h"
WORD fclose(sp) /* CLEAR FUNCTION ***********/
REG FILE *sp; /* stream l e
* -----------------------------------------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* {
}
offs,sense);
sp->_flag &= ~_IOEOF; /* any seek clears EOF flag */
return( p==(LONG) FAILURE ? FAILURE : SUCCESS);
}
to seek on
* offset = signed number of bytes
* sense = 0 => offset from beginning of file
* 1 => offset from current po#include "portab.h"
LONG writel(fd,buf,lnum) /* CLEAR FUNCTION ***********/
WORD fd;
REG BYTE *buf; /* addr */
LONG B@H@ムョJn<4A><6E>Sョ<53><EFBDAE> n<><6E>"n全n<E585A8><6E><EFBFBD> .<2E><>qN^NuNVH<> >.Hヌホシ<00><>gR<>*y@@(Gル<47>@@.君ケ鴫|<7C><>fp<>`
NqJ櫚゚0€N^NuNVH<>/
WORD rewind(sp) /* CLEAR FUNCTION ***********/
FILE *sp;
{
return(fseek(sp,0L,0));
}

}
/************************************************************************
*
* r e w i n d F u n c t i o n
* -----------sition
* 2 => from end of file
* ret = 0 for success, -1 for failure
*
*************************************************lnum; /* size */
{
LONG R;
REG UWORD tmp;
R = lnum;
while (lnum != 0)
{
tmp = (lnum < 32768L)? (int)lnum : 32/**************************************************************************
*
* f s e e k F u n c t i o n
* -----------
WORD rewind(sp) /* CLEAR FUNCTION ***********/
FILE *sp;
{
return(fseek(sp,0L,0));
}

}
------------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* "rewind" sets the read/write pointer o****************************/
#include "stdio.h"
WORD fseek(sp,offs,sense) /* CLEAR FUNCTION ***********/
REG FILE *sp;768;
if (write(fd,buf,tmp) != tmp)
break;
buf += tmp;
lnum -= tmp;
}
return(R-lnum); /* number of bytes----------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* "fseek" sets the read/write pointer of a
WORD rewind(sp) /* CLEAR FUNCTION ***********/
FILE *sp;
{
return(fseek(sp,0L,0));
}
サフbサフf#フ?^`J(T`ワ
2-<><> T0(ムm T*秦*<2A> 2,<>ミ⊇タf 0-ムl(描(<28>#フ?^J櫚゚0N^NuNV<4E><56> .]€-@<40><> n<><6E>0(<>=@f a stream file to the
* beginning of the stream.
*
* Calling sequence:
* ret = rewind(sp)
* Where:
* sp -> a stream fil
LONG offs;
WORD sense;
{
LONG p, lseek();
if ( fflush(sp) == FAILURE )
return( FAILURE );
p = lseek(fileno(sp), written */
}
 stream to an arbitrary
* offset.
*
* Calling sequence:
* ret = fseek(sp,offset,sense)
* Where:
* sp -> (FILE *) stream one of drtwx flags required
only one of abi flags allowed
cannot create %s
temp file write error
seek error on %s
Unable t<><74>>ョ a<00>V-@<40><>B€`<00>.ョa<00>@ .ーョ<EFBDB0><EFBDAE>~0. ーn<EFBDB0><6E>=n <0C><> .<2E><>d&-n<><6E><EFBFBD>n<EFBFBD><6E> n<><6E>"n然ョRョ<52><EFBDAE>n<EFBFBD><6E>秡< .<2E><EFBFBD>2.<2E><><EFBFBD>-@<40><>0.<2E><>@e (FILE *)
* ret = 0 for success, -1 for failure
*
*************************************************************************written */
}
acter */
REG WORD ni; /* Input char */
BOOLEAN noassign, /* Suppress assignment flag */
invert, /* Inv1/84 whf fix "%1s" bug
* 12/02/83 HY ???
*****************************************************************************/
#inclin input */
ungetc(ni,sp); /* back up once */
if( c == NULL ) /* check for this here */
break; /* ---------------------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* "_doscan" is the common subro8], /* Area for '[...]' sets */
*sb; /* Ptr into setbuf */
DOUBLE _atof(); /* */
/**************written */
}
ert flag (_ismember) */
numfound, /* Number found flag */
longf, /* Long ptr flag */
shortf; /* Short ude "stdio.h"
#include "ctype.h"
#define INFINITY 32767
#define NXTNI(d) if( ((d)=getc(sp)) == EOF ) return(EOF)
WORD _d */
} /* c points to non space */
/****************************/
if( c != '%' ) /* match spec chautine to "scanf", "fscanf", and
* "sscanf".
*
* Calling sequence:
* ret = _doscan(sp,fmt,aps)
* Where:
* WORD ret number**************/
nitems = 0; /* */
while( c = *fmt++ )
{
if( isspace(c) ) /* if space in spec str */
?B<>.,=:+-&/\|()[]*?Xptr flag */
REG WORD width; /* Max field width */
WORD tval, /* Temp val holder */
base, /* For nuoscan(sp,fmt,aps) /****************************/
REG FILE *sp; /* Stream ptr */
BYTE *fmt; /* Input format spr (non'%')?*/
{ /* */
NXTNI(ni); /* grab from input */
if( ni != c ) /* & test */
{ items matched AND assigned
* EOF when encountered on stream sp
* FILE *sp pointer to input stream
* BYTE *fmt input spe { /* */
do{ /* deblank leading blanks */
c = *fmt++; /* */
} while( isspace(c) ); /* !!!!"meric conversion */
nitems; /* Number items mtchd & assd*/
LONG val, /* For numeric conversion */
locval; /ec ptr */
BYTE **aps; /* Argument ptrs ptr */
{ /****************************/
REG BYTE c; /* Spec char/* */
ungetc(ni,sp); /* nope, put it back */
return(nitems); /* return early */
} /* cification string
* BYTE **aps pointer to (pointers to) arguments
*
* Edits:
* 3/15/84 sw Fix Atof / Nofloat problem
* 1/1 */
do{ /* deblank input stream */
NXTNI(ni); /* */
} while( isspace(ni) ); /* read past space /*****************************************************************************
*
* _ d o s c a n F u n c t i o n
* ----* Local value area */
BYTE locbuf[BUFSIZ], /* Local buffer area */
*db, /* Destination ptr */
setbuf[12*/
continue; /* yup, do the next char */
} else /****************************/
c = *fmt++; /* look for an '-' )
invert++;
width--;
NXTNI(ni);
}
val = 0L; /* initial value */
numfound = FALSE; /* assu*/
case 'x':
base = 16;
procnum: /****************************/
if( isupper(c) ) /* upper case means long assign */
nitems++; /* */
break; /****************************/
case 's': /* string input */
if( c == 'l' ) /* unless they say otherwise*/
{
longf++;
c = *fmt++;
} else if( c=='h' )
***/
ungetc(ni,sp); /* back off input */
if( numfound == FALSE ) /* was it there? */
return(nitems); /*assignment */
noassign = FALSE; /* assume we will assign */
if( c == '*' ) /* unless they say otherwise*/
me guilty til proven */
while( width-- > 0 ) { /* for each char ************/
tval = ni = toupper(ni); /* should work */
longf++;
do{
NXTNI(ni); /* grab a char from input */
} while( isspace(ni) ); /* until non-blank */
case 'c': /* char input */
case '[': /* input 'one of' */
NXTNI(ni); /* grab a character {
shortf++;
c = *fmt++;
}
/****************************/
switch( c ) /* which conversion char? no, too bad */
if( invert ) /* leading minus? */
val = -val; /* */
if( longf ) /* store this {
noassign++;
c = *fmt++;
}
width = INFINITY; /* assume no special width */
while( c >= '0' && for numbers */
if( tval<'0' || tval>'F')
break;
if( tval>'9' && tval<'A')
break;
tval -= '0'; */
if( noassign )
db = &locval; /* got to put it somewhere */
else db = *aps++; /* like to put it here **/
if( c== 's' ) /* scan string **************/
{
sb = " \t\n"; /* point set to white chars */
while(_ism */
{ /****************************/
case 'D': /* decimal input */
case 'd':
base = 10; goto pro value */
*( long *)db = val; /* somewhere */
else if( shortf ) /* */
*( short *)db = val; /* c <= '9' ) /* unless they say otherwise*/
{
if( width == INFINITY )
width = 0;
width = 10 * width + (c - '0'
if( tval>9 )
tval = tval+('0'-'A'+10);
if( tval >= base )
break;
numfound++; /* is a number /
invert = FALSE; /* assume pos number */
if( ni=='+' || ni=='-' ) { /* leading plus or minus */
if( ni ==em(ni,sb,FALSE)) /* keep reading whitespace */
NXTNI(ni); /* if there is any */
invert = TRUE; /* after, readcnum;
case 'O': /* octal input */
case 'o':
base = 8; goto procnum;
case 'X': /* hex input somehow */
else /* */
*( int *)db = val; /* sometime */
if( !noassign ) /* increment only if );
c = *fmt++;
}
longf = FALSE; /* assume ptrs not to LONGs */
shortf = FALSE; /* and not to SHORTs */
val = base * val + tval; /* */
NXTNI(ni); /* next input, please */
} /* ****************** until whites */
} else if( c == 'c' ) /* scan char ****************/
{
sb = ""; /* Null set */
if( ni != '.')
&& (ni != 'e')
&& (ni != 'E')
&& (ni != '-')
&& (ni != '+'))
break;
NXTNIented **********/
case 'e':
case 'F':
case 'f':
if( isupper(c) ) /* upper case means long */
lonreturn( invert ? !rv : rv ); /* return (maybe inverted) #*/
} /****************************/
here to pt */
else db = *aps++; /* o.w. grab the desired ptr*/
while( width-- > 0 && _ismem(ni,sb,invert) )
{
/****************************/
MLOCAL WORD _ismem(c,set,invert) /* is_member of a set */
BYTE c; /* candidawidth == INFINITY ) /* handle default width */
width = 1;
invert = TRUE; /* invert "_ismem" func */
} els(ni);
}
ungetc(ni,sp);
*--sb = '\0';
if (longf)
*(double *)db = _atof(setbuf);
else
*(float *)db =gf++;
do {
NXTNI(ni); /* grab a char from input */
} while( isspace(ni) ); /* until non-blank */
if( noreturn( invert ? !rv : rv ); /* return (maybe inverted) #*/
} /****************************/
*db++ = ni;
NXTNI(ni);
}
ungetc(ni,sp); /* we've always read 1 past */
if( c != 'c' ) /* not char type? te for set element*/
BYTE *set; /* null terminated string */
BOOLEAN invert; /* invert sense of function */
{ e /* scan set *****************/
{ /* must be a '[' */
invert = FALSE;
if( (c = *fmt++) == '^' ) /* i (float) _atof(setbuf);
if (!noassign)
nitems++;
break;
case '%':
default:
NXTNI(ni);
if(assign )
db = &locval; /* got to put it somewhere */
else db = *aps++; /* like to put it here */
sb = set/****************************************************************************
*
* _ f i l b u f F u n c t i o n
* ----- */
*db = NULL; /* then null terminate */
if( !noassign )
nitems++; /* successful assignment */
/****************************/
REG WORD rv; /* temp return val */
rv = strchr(set,c); /* look for c in set */
nvert "_ismem" ??? */
{
invert = TRUE;
c = *fmt++;
}
for( sb=setbuf; c != NULL && c != ']'; sb+ ni != c ) /* must match c */
{
ungetc(ni,sp);
return(nitems);
}
break;
} /***** end swibuf; /* setup up addr to hold string */
while (width-- > 0)
{
*sb++ = ni;
if ((ni < '0' || ni > '9') && (--------------------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* "_filbuf" function is called bbreak; /****************************/
/****************************/
case 'E': /*********** not fully implem return( invert ? !rv : rv ); /* return (maybe inverted) #*/
} /****************************/
+, c = *fmt++)
*sb = c;
*sb = NULL;
sb = setbuf;
}
if( noassign )
db = locbuf; /* give rtn somewtch ***********/
} /***** end while loop *******/
return(nitems); /* */
} /****************************/
y getc to fill the buffer.
* It performs any initialization of the buffered on the first
* call.
*
* Calling sequence:
* c = read(sp->_fd, sp->_base, /* read to our buffer */
sp->_flag & _IONBUF ? 1 : BUFSIZ); /* the right # of bytes */ || /* is the No Buf flag set? */
(sp->_base=malloc(BUFSIZ))==NULL) /* can't we get buffer? */
sp->_flag |= _IONBU/**********************************************************************
*
* _ c l e a n u p F u n c t i o n
* ---------oc(); /* someplace to get mem */
/****************************/
if((sp->_flag & _IOREAD) == 0) /* is readable fi
} /****************************/
har = _filbuf(stream)
* Where:
* stream -> file info
* char = the first character returned, or FAILURE (-1)
* on error
if( sp->_cnt <= 0 ) /* did read screw up? */
{ /* yup...********************/
if( sp->_cnt == FAILURE ) /*F; /* set No Buf flag */
else sp->_flag |= _IOABUF; /* we're all set */
} /****************************------------------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* "_cleanup" closes all buffered fle? */
return(FAILURE); /* no */
if( sp->_flag & _IOSTRI ) /* is this stream a string? */
{ /* yes: } /****************************/
 or EOF
*
*****************************************************************************/
#include "stdio.h"
#define CMASK really bad? */
sp->_flag |= _IOERR|_IOEOF; /* say so */
else sp->_flag |= _IOEOF; /* or just say /
if( sp->_flag & _IONBUF ) /* insure this set right */
sp->_base = &onebuf[sp->_fd]; /* set 'buf' to small buf */
iles
*
* Calling sequence:
* _cleanup()
*
***************************************************************************/
handle EOS as EOF*/
sp->_flag |= _IOEOF; /* */
return(FAILURE); /* */
} /****************************/} /****************************/
0xFF
WORD _filbuf(sp) /* fill buffer */
REG FILE *sp; /* from this stream */
{ /***********************we can't read*/
return(FAILURE); /* */
} /****************************/
sp->_cnt--; /* take the 1st iteif( sp==stdin && (stdout->_flag&_IOLBUF))/* console i/o? */
fflush(stdout); /* output whatever to con */
sp->_cnt#include "stdio.h"
_cleanup()
{
REG WORD ii;
for( ii=0; ii<MAXFILES; ii++ )
fclose(&_iob[ii]);
/* _m_term(); /* C
if( sp->_base == NULL ) /* has this been done? */
{ /* no...*********************/
if( sp->_flag & _IONBUF *****/
static BYTE onebuf[MAXFILES]; /* a place if no mem avail. */
/* small buf for ungetc */
EXTERN BYTE *mallm */
sp->_ptr=sp->_base; /* set up stream */
return(((WORD)(*sp->_ptr++) & CMASK)); /* and return the char */
LEAR termination routine */
}
 /*--------------------------*/
p = digs;
b = base;
if (signed)
if ((int)n < 0) {
n = -n;
*(*pbuf)++ = '-';
in a stream to be written out
* to the file. The stream remains open.
*
* Calling sequence:
* ret = fflush(stream)
* Wherbase;
WORD signed;
BYTE *digs;
{
/* 05/27/83 - changed to do divide in short (HY) */
/* 08/11/83 - changed to handle EAR termination routine */
}

}
while (n != 0)
{
*p++ = n % b;
n = n / b;
}
return (p);
}
e:
* stream is a (FILE *)
* ret = SUCCESS or FAILURE (I/O error)
*
* 9/83 fix fseek(stream,xx,1) bug whf
*
***********68K arg passing (as longs) (WHF) */
REG UWORD n;
REG BYTE *p;
REG WORD b;
#if HILO /*--------------------------*/
EAR termination routine */
}
 }
while (n != 0)
{
*p++ = n % b;
n = n / b;
}
return (p);
}
******************************************************************/
#include "stdio.h"
WORD fflush(sp) /* CLEAR FUNCTIO LONG ln; /* declare a placeholder */
/* */
ln = *pobj; /* assign arg to long */
n = ln & 0xFFF/****************************************************************************
*
* f f l u s h F u n c t i o n
* ------- }
while (n != 0)
{
*p++ = n % b;
n = n / b;
}
return (p);
}
N ***********/
REG FILE *sp; /* stream to flush */
{ /****************************/
REG WORD n, /* num writtenFL; /* then to WORD */
#else /*--------------------------*/
n = *pobj; /* assign arg to WORD */
#endif ----------------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* 'fflush' causes any buffered data
#include "portab.h"
#include "osif.h"
BYTE *__prtshort(pobj, pbuf, base, signed, digs)
WORD *pobj;
BYTE **pbuf;
WORD */
ns; /* num sposed to be written */
/****************************/
if((sp->_flag&(_IONBUF|_IOWRT))==_IOWRX蒐ケ x>シ/<)<29>?9*Nケ6\<5C><シ|g.ケ*/<*⑮ケX蒐ケ x y`)<29>$ y`)<29>.ケ*/<*儂ケX蒐ケ x.ケ*/<*ー***********************/
1 WORD) o.w.
*
*****************************************************************************/
#include "stdio.h"
WORD fpase != NULL ) /* written to already? */
{ /* */
if(sp->_flag&_IONBUF) /* is this a nobuf stream? */
/************************************************************************
*
* f p u t n F u n c t i o n
* -------------T /* does it have a wrt buf? */
&& (ns=(WORD)(sp->_ptr-sp->_base)) > 0)/* and does buf need wrt?*/
{ /* yes! NケX<> 9)<29>ミケ*ミケ*-@<40><>.ケ)<29>ap.シ,?<+Nケ
「T<EFBFBD>.ケ*aT.シ,?<+Nケ
「T<EFBFBD>.ケ*a8.シ,?<=Nケ
「T<EFBFBD>.ョ<><EFBDAE>.シ*エ**********************/
utn(buf,num,sp) /* CLEAR FUNCTION ***********/
REG BYTE *buf; /* chars to be written */
REG WORD num; /* num chars sp->_cnt = 1; /* yes */
else sp->_cnt = BUFSIZ-1; /* standard size */
} /* */
} else { /* i--------------
* Copyright 1983 by Digital Research Inc. All rights reserved.
*
* 'fputn()' writes 'n' chars to a buffered f */
n=write(sp->_fd,sp->_base,ns); /* do it */
if(ns!=n) /* did they all git writ? */
{ /* oooops */Nケ.ョ<><EFBDAE>ヲ.シ*キNケ.ケ*a<00>.シ,?<
Nケ
「T<EFBFBD> y`)<29>b>シ/Y<>?9*Nケ6\<5C>.シ*ノNケ.ョ<><EFBDAE>J>シ/Y<>?9*Nケ6\<5C>.シ**********************/
 to be written */
REG FILE *sp; /* stream to write to */
{ /****************************/
if( sp->_flag & _IONBs a readable file */
lseek(sp->_fd,(LONG) -(sp->_cnt),1);/* back up cur position ptr */
sp->_cnt = 0; /* zap oile. It optimizes
* for 'non-buffered' (_IONBUF) output.
*
* Calling sequence:
* rv = fputn(cp,n,stream)
* Where:
* cp
sp->_flag |= _IOERR; /* this stream no good */
return(FAILURE); /* let em know */
} /* */
} *ユNケ.ョ<><EFBDAE>".シ,?<
Nケ
「T蹴G`<00>J櫚゚タN^NuNVH<>*|*nB%BGセ|l2 .タシ<シ|
lワ|0`ワ|7 .閠-@JョgRG`ネ.<2E>/<HタS€oチQネ<51>€Nu o0/JfB€Nuーf<> S€NuNV<4E><EFBFBD>~ nm~セnl<01>0Gムネムネム<EFBE88>
#ミ*>シBg/9*Nケリ\<5C>3タ*l.ケ*/<*tNケUF ) /* Non-buffered file? */
{ /* */
sp->_cnt = 0; /* Always force to zero */
if(num!=write(sp->_fut count */
} /* */
sp->_ptr=sp->_base; /* reset buf */
return(SUCCESS); /* */
} /*****-> chars to be put
* n = num chars to be put
* stream -> where its going (FILE *)
* rv = SUCCESS if write ok, FAILURE (- /****************************/
if( sp->_flag & _IOWRT ) /* is this a writable file? */
{ /* */
if( sp->_b*祚ケX繍櫚゚ タN^NuNVH<>*|*nB%BGセ|
l, .
H@Hタ<ワ|0 .
Hタ-@JョgRG`ホ.<2E>/<*薇ケX繍櫚゚ タN^NuNV<4E><56>>ョ?. d,buf,num)) /* try to write */
{ /* no good */
sp->_flag |= _IOERR; /* mark this file */
return FAI*****/
REG BYTE *str; /* null term string */
REG FILE *sp; /* stream file pointer */
{ /******************------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* "fputs" copies a null terminated string to a<00><><EFBFBD>チュ0-g濳ュ0oメ.-0S<30>g<00>-gF>シ"/</
<06>4/-/
Nケ$節<>ー|g3<>-3<>-<2D>-p<>`<00>U<>ソ>シ!/<n FAILURE; /* no good */
return SUCCESS; /* everything a-ok */
} /****************************/
return(rv); /* it worked */
} /****************************/
LURE; /* and complain */
} /* */
return SUCCESS; /* */
} /****************************/
**********/
REG WORD rv; /* return val */
rv = NULL; /* init for *s==NULL */
while(*str) /* for all char stream file.
* To be compatible with Unix, it does NOT append a newline.
*
* Calling sequence:
* ret = fputs(s,stream)
* /
<06>4//
Nケ$節<>ー|g3<>-3<>-<2D>-p<>`V+G -<08>+@I<>4G<34>エケヒd
gR形<52> "
メシ4吹ムュ`Bュ`
-0<>+@+m €N^NuNVH<> /<-<2D>?.?./<06> /. nN節<4E>*@サ<>-<2D>B(n <>-<2D>%H<>|
lp0`p7゙@ヌ`磽 NqJ櫚゚0€N^NuNVH<>*n<.0`<>シ/.?Nケ f\繍@g>⑮ケ%<25>3<EFBFBD>#-3<>-<2D>-p<>`U0NqJ櫚゚ €N^NuNVH<>>ョNケ$.*@
fp<>`d0.`4+n
`> .
ムュ`4 /* */
while(num--) /* Buffered output */
if( FAILURE==fputc(*buf++,sp)) /* try to put in buf */
retus in s */
if((rv=putc(*str++,sp))==FAILURE) /* if putc fouls up */
return(FAILURE); /* give up */
Where:
* ret = last char out, on error FAILURE
* s = string to put
* stream -> stream (FILE *)
*
**********************/********************************************************************
*
* calloc.c - memory allocator for sets of elements
* Hニ n. nfzJ㍑JEg タシタ閾SE`鐐j nf&z J㍑JEg タシタ諛SE`鍮Ef-<03><>`<JngJ㌫ n P-"n R<> D€.J㍑>ョNケT+@ - ミョ
+@`p<>`,`J@gネー|gハー|gホ`<60>U<>゚Jュl+|<7C><><EFBFBD><EFBFBD> -NqJ櫚゚ N^NuNV<4E><56>>シBァ?.a<00>f\蒐qN^NuNVH<>>ョNケrn FAILURE; /* no good */
return SUCCESS; /* everything a-ok */
} /****************************/
 return(rv); /* it worked */
} /****************************/
*******************************************************/
#include "stdio.h"
WORD fputs(str,sp) /* CLEAR FUNCTION ******zalloc - memory allocator like malloc only zeros storage.
*
* BYTE *calloc(nelem,sizelem)
* UWORD nelem, sizelem;
*
* Ret/**************************************************************************
*
* f p u t s F u n c t i o n
* ---------------$.*@
fp<>`~0タ|gB€`p.シ<00>?< NケェT<EFBDAA><-H€シ@g-H€Hタ.€?< NケェT<EFBDAA>.<2E><06>?<#NケェT<EFBDAA>-H€シ@g0F.<2E>?< NケェT<EFBDAA> <n FAILURE; /* no good */
return SUCCESS; /* everything a-ok */
} /****************************/
return(rv); /* it worked */
} /****************************/
urns a pointer to a region of (zero filled) memory large
* enough to hold 'nelem' items each of size 'sizelem'.
* Returns NULLf.<2E>/
/ atP汁d-E<><45>J<>X ,蕫-@<40><><EFBFBD><EFBDAE> ,ーョ<EFBDB0><EFBDAE>N,gF>シ"/</ <06>4/,/ Nケ$節<>ー|g3<>-3<>-<2D>-p<>e = sizelem*nelem;
#if I8086
if( size > 65535L )
return NULLPTR;
#endif
return zalloc((UWORD)size);
}
_IOREAD|_IOWRT); /* not marked rd/wrt */
ii++ ) /* */
if( ii >= MAXFILES ) /* if off end of table */
nbytes)) == NULLPTR) return(NULLPTR);
blkfill( rp, NULL, nbytes );
return(rp);
}
BYTE * calloc(nelem,sizelem) /* CLEARmode = "r" for read-only, "w" for write, "a" for append
*
****************************************************************** if not enough memory, or allocation too large
* (on 8086).
*
* BYTE *zalloc(nbytes)
* UWORD nbytes;
*
* Returns a pointe/***************************************************************************
*
* f d o p e n F u n c t i o n
* -------- `H€€ n<><6E>(g* 
f$ n<><6E>(gH€Hタ.€?<NケェT<EFBDAA>
n<><6E>(gH€Hタ.€?<NケェT術`汗シ<00>l ` <<00>*E<><45>.<2E> break; /* */
if( ii >= MAXFILES ) /* */
return(NULLFILE); /* fail */
if( *mode != 'r' && *mod FUNCTION ***********/
UWORD nelem, /* number of elements */
sizelem; /* size of element */
{
REG LONG size;
si***********/
#include "stdio.h"
FILE * fdopen( fd, mode ) /* CLEAR FUNCTION ***********/
REG WORD fd;
REG BYTE *mode;
r to a region of zero filled memory nbytes long.
* Returns NULL if not enough memory.
*
*************************************---------------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* "fdopen" associates a file which wa<06><><EFBFBD><EFBFBD>?<
NケェT<EFBDAA>.<2E><>H<EFBFBD>ニフシ<00><EFBFBD>0|
.<2E>?<NケェT秀<54>J㎜J<> fU `ロS⑳<53>腴㎜<18>
R<EFBFBD> "メシ<EFBE92><EFBDBC><EFBFBD>吹NqJ櫚゚8潘^NuNV<4E><56><EFBFBD>e != 'R') /* not 'r'ead mode? */
{ /* */
sp->_flag |= _IOWRT; /* set this flag */
if( *mode == 'a' ze = sizelem*nelem;
#if I8086
if( size > 65535L )
return NULLPTR;
#endif
return zalloc((UWORD)size);
}

{
REG FILE *sp;
REG WORD ii;
/****************************/
if( fd<0 || lseek(fd,0L,1)==FAILURE ) /* is fd valid? ********************************/
#include "portab.h"
#include "osif.h"
BYTE * zalloc(nbytes) /* CLEAR FUNCTION ******s opened by a file descriptor
* (using "open" or "creat") with a stream.
*
* Calling sequence:
* stream = fdopen( fd, mode *n
B<EFBFBD>:.>ョNケ$.(@ fp<>`レJ<EFBE9A>B@`,g3<> -3<>-<2D>-p<>`,g>シ//
aホP汁<01>,g>シ//
aエP汁|,|| /* 'a'ppend mode? */
*mode == 'A' ) /* */
lseek(fd,0L,2); /* its out there, seef EOF */
} /* e = sizelem*nelem;
#if I8086
if( size > 65535L )
return NULLPTR;
#endif
return zalloc((UWORD)size);
}
 */
return(NULLFILE); /* no, oh well */
for( ii=0; /* look at _iob table */
(sp=(&_iob[ii]))->_flag&(*****/
UWORD nbytes; /* number of bytes */
{
REG BYTE *rp; /* pointer to region */
BYTE *malloc();
if( (rp = malloc()
* Where:
* stream -> stream info (FILE *) (NULLPTR returned on fail)
* fd = small int returned by open or creat
* ************************/
else sp->_flag |= _IOREAD; /* 'r'ead mode */
/****************************/
sp->_cn-------------
* Copyright 1982 by Digital Research Inc. All rights reserved.
*
* "ftell" returns the present value of the ree(描&M0<>ラタ0-触7@&<26>(<28>;G#フ-
\€`<>-f>㌢*@
fB€`(M*T`ィJ櫚゚8€N^NuNVH<> >.゙|?<3F>昱0<>>€Nケ(f*@サ<><EFBDBB><EFBFBD><EFBFBD>f return((LONG)FAILURE); /* quit if bad lseek */
if( sp->_base == NULLPTR ) /* if file hasn't had i/o */
r*******/

REG BYTE *bp; /* Buffer ptr */
LONG nread; /* Temp var */
LONG lseek(); /* byte offset into buf */t = 0; /* init count */
sp->_fd = fd; /* and file des */
sp->_base = sp->_ptr = NULLPTR; /* and buffer poiad/write pointer
* within the stream. This is a meaningless number for console
* and list devices.
*
* Calling sequence:
*B€`
R€タシ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>*@(M9G.圭預 9-NqJ櫚゚0€N^NuNVH<> *n]<5D>(y-サフcサヤeケヤeサヤeサフbサフf#フ-`J(T`ワ
2-<><> T0(ムmeturn(filepos); /* return this position */
nread = sp->_ptr - sp->_base; /* calc for # read/written */
filepoT繍<54><00>.<2E>?<NケェT<EFBDAA>+G0x.<2E><06>?NケェT繍@g>ク|o89-<2D>€p 濺`BD-H€ーn<EFBDB0><6E>g0n<30><6E>.<2E>?< NケェT<EFBDAA> 2Hチミ@0Hダ€0Hタ怙0Hタ
/* */
if( isatty(fileno(sp)) ) /* are we talking to a tty? */
return(0L); /* quit now if so */
filepnters */
/****************************/
return(sp); /* return the stream ptr */
} /******************** offset = ftell(sp)
* Where:
* sp -> (FILE *) stream
* offset = (LONG) where stream is reading from/writing to
*
******* T*秦*<2A> 2,<>ミ⊇タf 0-ムl(描(<28>#フ-J櫚゚0N^NuNV<4E><56> .]€-@<40><> n<><6E>0(<>=@<40><>>ョ a<00>V-@<40><>B€`<00>.ョa<00>@ .ーョ<EFBDB0><EFBDAE>~0. s += nread; /* correct for # read/wrtn */
if( sp->_flag & _IOREAD ) /* if reading from file */
if( fileposヨ€0<04>Hタルタ`<00>v-H€ーn<EFBDB0><6E>g0n<30><6E>.<2E>?< NケェT<EFBDAA> NqJ櫚゚0<EFBE9F>^NuNVH<>|BGセ|l タケ-f
-0`繙RG`<60>3<EFBFBD>-3<>-<2D>-p<>NqJ櫚゚os = FAILURE; /* default return value */
if( sp->_flag & (_IOREAD|_IOWRT) ) /* if file is open */
{ /* *********/
***********************************************************************/
#include "stdio.h"
LONG ftell(sp) /* CLEAR FUN/***********************************************************************
*
* f t e l l F u n c t i o n
* -------------- > 0 ) /* and we've read from file*/
filepos -= nread + sp->_cnt; /* adjust file position */
/* to reflect reaタN^NuNVH<>>.p2總F@Hタチケ-B@NqJ櫚゚€N^NuNVH<>>.ZGB€0€<>>RGJケ-f <-
#タ-#タ-
By-(y-*Tセmb60X@ーm/
if((filepos=lseek(fileno(sp),0L,1)) /* get where next byte read */
== FAILURE ) /* from or written to */
*******/
CTION ***********/
REG FILE *sp; /* stream pointer */
{ /* */
REG LONG filepos; /* file position */d ahead */
if( sp->_flag & _IOASCI ) /* ascii file? **************/
{ /* count the newlines */
ifsole, and
* translates the command line to lower case. Then it calls "__main()".
* There are two versions of "__main()" (one ORD len; /* Command length */
{ /****************************/
REG BYTE *s; /* Temp byte pointer */
r newlines */
filepos--; /* */
} /* */
} /* fini ascii ***************/
} /******" /* Include std definitions */
#include "osif.h" /* */
#include "ctype.h" /* */
EXTERN BYTE __tname[( sp->_flag & _IOWRT ) /* add in newline's cr's */
{ /* */
for( bp=sp->_base; bp < sp->_ptr; bp++ ) /* compiled for wildcards
* and the other compiled without) compiled from the source module
* "XMAIN.C".
*
* Calling Sequence:
/*****************************************************************************
*
* R U N T I M E S T A R T O F F R O U T /****************************/
_chinit(); /* Initialize channels */
open(__tname,READ); /* Open STDIN */
op**********************/
return(filepos); /* */
} /****************************/
]; /* Name of terminal device */
EXTERN BYTE __fdecls(); /* force loading of _iob */
EXTERN BYTE ___atab(); /* force */
if( *bp == '\n' ) /* count newlines in stuff */
filepos++; /* written/read so far */
} else {
* return = _main(command,length);
*
* Where:
* command Is the address of the command line from CP/M
* length Is the nuI N E
* -----------------------------------------------
* Copyright 1982,83 by Digital Research Inc. All rights reserved.
*en(__tname,WRITE); /* Open STDOUT */
open(__tname,WRITE); /* Open STDERR */
com[len] = NULL; /* Insure null *********************/
return(filepos); /* */
} /****************************/
 loading of ___atab */
#define STDIN 0 /* file descriptors */
#define STDOUT 1 /* */
#define STDERR 2 / /* we're reading... */
if( filepos > 0 ) /* check to see we've read */
for(bp= &(sp->_ptr[sp->_cnt-1]);mber of characters in the line,
* excluding the termination character (CR/LF).
*
* Modfications:
* 11-Oct-83 whf conve
* Routine "_main" is entered from the C header routine to start a C
* program. It opens STDIN, STDOUT and STDERR to the conat line end */
for (s = com; *s; s++) /* Convert string to */
*s = tolower(*s); /* lower case */
__m*********************/
return(filepos); /* */
} /****************************/
* */
/* */
_main(com, len) /****************************/
BYTE *com; /* Command address */
W/* start at end of buffer */
bp >= sp->_ptr; bp-- ) /* back up to next read char*/
if( *bp == '\n' ) /* count off forted to DRC from CPM68K
*
*****************************************************************************/
#include "portab.hain(com,len); /* Do rest (replaceable) */
} /****************************/
in(com,len); /* Do rest (replaceable) */
} /****************************/
in(com,len); /* Do rest (replaceable) */
} /****************************/
B[ソヒb<EFBE8B>#ノ5殺<35>€€<00>?/
斟Nケ<>ホ o A<>ソネdp<>Nu#タ5撮€NuNV0/"/
NBソ<EFBFBD>5仕0< A<>-x"NB0<NBN^Nu o2/0/
9/ヤメ/ヤ0.錙>€Wa>ョWaN^NuNV<4E>鸙nm n n.シ1ー?.W0Nケ0T汁. n
m nn.シ1ー?.W7Nケ0T汁Nケ\床|g.ケ/タ/</<2F>Nケ杞蒐ケBy-コBWBァ?9-クNケ>\渋
J櫚゚ N^NuNVH<>*|-廝Gセ|l.シ-クNケ,<2C>:タRG`<60> y`-徃n y`-<2D>HタS€oチQネ<51>€Nu o0/JfB€Nuーf<> S€NuNV<4E><56><EFBFBD> nm noaB~ n
h -fRy/゙RG n
2Gモノモノ.ー<>a<RGセnla `>シN^NuNV<4E><56>.シ0KNケ朦ケN^Nup "<0zNBB€NBNV<4E><56><EFBFBD>Nケ%4BW/<-鮮ケ<15><>>シ/<-鮮ケ<15><>>シ/<-鮮ケ<15><>-|-<2D><> n2n fJ.シ-クNケ,<2C>3タ/ト.シ-クNケ,<2C>3タ/ニ.シ-クNケ,<2C>3タ/ネ.シ-クNケ,<2C>3タ/ハ`.ケ/タ/<0Nケ杞蒐ケJ櫚゚ €N^NuNV<4E>魲W/. n ?Nケ-^3タ/ワ3<EFBE9C>/ワ3€-y-<2D><>#<23>-イ/フBョ<42><EFBDAE> .<2E><><EFBFBD><EFBDAE> .シ-クNケ,<2C>>>㌢hTケ/フTョ<54><EFBDAE> y`-彷 y /メgBWaB`<60>#<23>/ト/フ-y
aXX肖ノB=|<01><>*nJgJgH€Hタミシ2ェ @gR港腴g<00>G M2GムノJgJ5pH€Hタミシ2ェ @f45pH€Hタミシ2ェ @g 5pH€ミ| `5pH€Nケ>\繍€l.ケ/タ/<0.Nケ杞蒐ケ n BhN^NuNVH<>>. y /メfJB9/ヤJy/フg .シ0ENケ<07>>シ$a<00>>ケ/フa<00>.シ0HNケ-「<><EFBDA2><EFBFBD><EFBDAE> .<2E><><EFBFBD><EFBDAE> .シ-クNケ,<2C>>>㌢ Tケ/フTョ<54><EFBDAE>ヨJy/゙fF y`-彷 y /メgBWa゙`<60>#<23>/ネ/フ-y-ヲ<><EFBDA6><EFBFBD><EFBDAE>BWaセUョ<55><EFBDAE>/フ`-x b<05>B<>+V`FC Runtime V01.11, Copyright(c) 1983, Digital Research XXXX-0000-654321 o#ネ5<>"h&Iモ<49>"M4Gモハ€RG`ャJ5pg
M2GムノBRG <f.BWNケネBWBg/
R湧ケ<15>繍@g.抗<>/<0ャa森汁J >f0>シNケネBWBg/
R湧ケ6\床|g.抗<>/<0ケ<07>>シ#ap>ケ/ホaF>㌢BUy/メJy/メf*9/ヤH€D>€SWaD.シ1ー?<
Nケ0T<30>3<EFBFBD> /メJ櫚゚€N^NuNV<4E><56>0.漾>€W<00>a>ョW<00>aN^NuNV<4E><56>0.`<60> y /メgBWa「`<60>.シ/潘ケ曷櫚゚タN^NuNVH<>*n>シBg/
Nケ-@\<5C>3タ-クl.<2E>/</<2F>杞蒐ケ#ヘ/タ>シ/<-<2D>?9-クNケトaXX汁 N2n<32><6E>ノモノムノ!M<><4D>n<EFBFBD><6E>ヌ`<00><> N2n<32><6E>ノモノムノ!|<00><>.<2E><06><><EFBFBD><EFBFBD>?.<2E><>T<>>€NケJ櫚゚ €N^NuNV<4E><56>.ョNケ*>>€/.?<Nケj\<5C>.ョ Nケ R<> D€.J㍑.<2E>/Nケ*dX<64>. 93*タ`<60>
NqJ櫚゚ 潘^NuNVH<>*n<.Hニ n0Hタ.JngJ㌫ D€. n P-"n R疏ホシ<00><>J㍑.<2E>/`<00>`Cー|5bレ蕁0@ム<>0ハ PNミ.ョ<><EFBDAE>*>=@<40><>0.<2E>銧n<E98AA7><6E> Jn<4A>=n<><6E><EFBFBD>0.<2E><>n<EFBFBD><6E>=@<40>鵯.<2E>詛Z .0<><30>, n<><6E> -f"Sn<53><6E>.ョ n<><6E>H€?Nケ0T樟@g0G.<2E>?< NケェT松|<00>f3<>2ヲ3<EFBDA6>5<>2ィp<EFBDA8>`>ョNケ%V>ョNケ'xB@NqJ櫚゚ タN^NuNV<4E>魲W?. /.a:\蒐qN^NuNV<4E>魲W?. /.a"\蒐qN^?<
/<06><><EFBFBD><EFBFBD>/
Nケ x゚<78> J.<2E>p`pHタロタ`<01>.<2E>腴.<2E> <  <
<EFBFBD>#タ5<>.ケ5韮g?<
/<06><><EFBFBD><EFBFBD>/
Nケ x゚<78> J.<2E>p`pHタロタ`H€"m€Rュ`-gA<><41>+H +@ m⑲ュ-gz><3E>/-?Nケj\<5C><Bm `n-g>セ<
g -ミシーュb" -:><3E>/-*>>€/. ?<Nケj\<5C>>シ/<0ネ?<Nケj\<5C>>シ<><EFBDBC>NケN^NuNV<4E><56>.<2E><06> /./<1ーNケツP蒐qN^NuNV<4E><EFBFBD>*nBn<42><6E> n H€Rョ JgNケ*dX<64>. 93*タ`<60>
NqJ櫚゚ タN^NuNV<4E><56>>ョNケホN^NuNVH<>BGセ|l0<>ミシ1「.€NケPRG`祀櫚゚€N^NuNVH<>*n0-タ|Rョ<52><EFBDAE>n<EFBFBD><6E>0.<2E>鶸n<E9B6B8>鵯@o.ョ.<2E><>€?Nケ0T汁゙Rn<52><6E>0.<2E><>n<EFBFBD><6E>@o.ョ n<><6E>H€?Nケ0T蹴ョ<E8B9B4><EFBDAE>リRn<52><6E>0.<2E>鶸n<E9B6B8>鵯@o.ョ.<2E><>€?Nケ0T汁゙Rn<52>鎭uNV<4E><56>>シ?. /.a\蒐qN^NuNVH<>Nケ',>JGlp<>`<00>>⑮ケ%V0<>エ*@ロ<>5ャJnfU.シ-<2D>/.Nケ*゙X繍@f
U0`\`.シ-<2D>/.朿.<2E>腴.<2E> <  <
<EFBFBD>#タ5<>.ケ5韮g?</<06><><EFBFBD><EFBFBD>/
Nケ x゚<78> J.<2E>p`pHタロタ`JR.<2E>腴.<2E> <  <
<EFBFBD>#タ5<>.ケ5韮g?<?Nケj\<5C><+mBm `( -:><3E>/-?Nケj\<5C><;|<01> +mコFg
mp<>`
H€タ|<00>NqJ櫚゚ 潘^NuNVH<>>ョNケ%シ*@
fp<>`╂<%g.ョH€?Nケ0T蹴n<E8B9B4>鐐ホB.<2E><> n H€ー|-@タRョ Dタf n Rョ R.<2E><>| <20><><0fG<><47> n Rョ =|<7C><><EFBFBD><EFBFBD><*f-M<><4D> n<><6E>=P<><50><EFBFBD> ng*.康ケ-g
.ュNケ(<28>B@Hタ+@+@Bm m<>€>逼ケネNqJ櫚゚ N^NuNVH<>*n0-タ|
ー|f. -<JFo ><3E>/-?Nケj\<5C>>`璉0.<2E>鎭qJ櫚゚ €N^NuNVH<> /<5<>?.?./<06> /. nN節<4E>*@サ<>5惑B(n <>5枠%H<>|
lp0`p7゙@ヌ`磽 NqJ櫚゚0€N^NuNケ*゙X繍@fU0`<>シ/.?Nケ!<21>繍@g>⑮ケ'x3<78>#2ヲ3<EFBDA6>5<>2ィp<EFBDA8>`U0NqJ櫚゚ €N^NuNVH<>>ョNケ%シ*@
fp<>`d0.`4+n
/<06><><EFBFBD><EFBFBD>/
Nケ x゚<78> J.<2E>p`pHタロタ`<00>-M<><4D> n<><6E>-P<><50><00>-M<><4D> n<><6E>0タ|<00>@<40><>.<2E><>ネ>ョ<><EFBDAE>/<06><><EFBFBD><EFBFBD>/
NケП醜<D09F>=|<7C><><EFBFBD>ヲ>ョ<><EFBDAE>/H0タ|g>ョNケ%V>ョNケ'xB@`&-g:-f2 -ーュ l>シBァ?.Nケ>\<5C>>シ/<-<2D>?.Nケj\<5C>-gB>シ"/</
<06>4 Rョ `8セ<0m2セ<9n,Jn<4A><6E>Bn<42><6E>H€2.<2E><><EFBFBD>
ミAミ|<7C>ミ=@<40><> n Rョ `ネ=|<7C><><EFBFBD>﨨<.fBn<42><6E> n Rョ セ<*f-M<><4D> n<><6E>=P<><EFBFBD> n Rョ `.セ<0シGg
mp<>`4-gJュg-g;| `;|<01> `Bm +mB@NqJ櫚゚ タN^NuNVH<>. *n
Sm mH€"m€タ|<00>Rュ``.<2E>H€?NVH<>*n<.Hニ n. nfzJ㍑JEg タシタ閾SE`鐐j nf&z J㍑JEg タシタ諛SE`鍮Ef-<03><>`<JngJ㌫ n P-"n`> .
ムュ`4>ョNケ<13>+@ - ミョ
+@`p<>`,`J@gネー|gハー|gホ`<60>U<>゚Jュl+|<7C><><EFBFBD><EFBFBD> -NqJ櫚゚ N^NuNV<4E><56>>シBァ?.a<00>f\蒐qN^NuNV<06><><EFBFBD><EFBFBD>/
NケП醜<D09F>=|<7C><><EFBFBD><00>>ョ<><EFBDAE>/<06><><EFBFBD><EFBFBD>/
NケП<>.<2E><06><><EFBFBD><EFBFBD>*>2.<2E>硤AーAo>ョ<><EFBDAE>/<06><><EFBFBD><EFBFBD>/
NケП醜<D09F>=|<7C><><EFBFBD>礰4.ョH€?Nケ0T蹴n<E8B9B4><6E>/-/
Nケ&<>ー|g3<>2ヲ3<EFBDA6>5<>2ィp<EFBDA8>`<00>.シ<00>?< NケェT<EFBDAA>>-H€セ@g-H€Hタ.€?< NケェT<EFBDAA>.<2E><06>?<NケェT<EFBDAA><-H€m(セ<9n"H€2.<2E><EFBFBD>
ミAミ|<7C>ミ=@<40><> n Rョ `メB.<2E>萓<lgセ<LfR.<2E><> n Rョ A<><41>-H<><48>H€`0R.<2E>腴.<2E> <  <
<EFBFBD>#タ5<>.ケ5<>?<NケxT蒐qJ櫚゚ €N^NuNV<4E><56>H<EFBFBD>. *n
BF:-fp<>`&-fTJュfN>シNケ'「+@+@fm`2m>逼ケ$<24>J@gm@`;|<01> H<>>ョNケ%シ*@
fp<>`~0タ|gB€`p.シ<00>?< NケェT<EFBDAA><-H€シ@g-H€Hタ.€?< NケェT<EFBDAA>.<2E><06>?<#NケェT<EFBDAA>-H€シ@g0F.<2E>/
<06>4/.<2E><>/
Nケ&<>ー|g U .<2E><>㌔.+n<><6E>゚ュ -ーュ o+m G<>4J㎜ロS㌔<53> .<2E><>qJ櫚゚8タN^NuNV<4E><EFBFBD>*n(n ..-)l .<2E><>qJ櫚゚8潘^NuNV<4E><56><EFBFBD>*n(n ..-G<><47> -蕫-@<40><> -タシg<00> -ーョ<EFBDB0><EFBDAE><00>-gF>シ"/</
<06>4/-/
Nケ&<>ー|2ヲ3<EFBDA6>5<>2ィp<EFBDA8>`tU<>ソ -タシ<EFBE80><EFBDBC><EFBFBD>€"- S<><EFBFBD><EFBDBC><EFBFBD>€D>シ!/</
<06>4/.<2E><>/
Nケ&<>ー|g3<>2ヲ3<EFBDA6>5<>2ィp<EFBDA8>``>シ€/
予繍@g>⑮ケ'x3<78>2ヲ3<EFBDA6>5<>2ィp<EFBDA8>`2U>シBァ-H€?Nケ>\州WBァ-H€?Nケ>\<5C>0NqJ櫚゚ €N^NuNV<4E><56><EFBFBD>*n
B<EFBFBD>:.>ョNケ%シ(@ /
aエP汁|,f.<2E>/
/ atP汁d-E<><45>J<>X ,蕫-@<40><><EFBFBD><EFBDAE> ,ーョ<EFBDB0><EFBDAE>N,gF>シ"/</ <06>4/,/ Nケ&<>ー|g3<>?< NケェT<EFBDAA> <<00><><EFBFBD>チュ0-g濳ュ0oメ.-0S<30>g<00>-gF>シ"/</
<06>4/-/
Nケ&<>ー|g3<>2ヲ3<EFBDA6>5<>2ィp<EFBDA8>`<00>g<00><>-H<><48> n<><6E>(g.シ<00>?<NケェT<EFBDAA>€p`J n<><6E>(gエ&L.シ<00>?<NケェT<EFBDAA>€ n<><6E>(H€f
>シNケ n<><6E>(g Ag3<>2ヲ3<EFBDA6>5<>2ィp<EFBDA8>`U<>ソ>シ!/</
<06>4/.<2E><>/
Nケ&<>ー|g3<>2ヲ3<EFBDA6>5<>2ィp<EFBDA8>`~+n<><6E>&M -タシラタラ<EFBE80>4
ミシ4a X<>+n<><6E>&M -タシラタラ<EFBE80>4
ミシエキタd
J㎜ワS㌔鵯㌻$U@ .<2E><> -ーュ o+m .<2E><>ィ>シ"/</
<06>4/.<2E><>/
Nケ&fp<>`<01>,gB@`x,g3<> 2ヲ3<EFBDA6>5<>2ィp<EFBDA8>`X,g.<2E>/
/ NケフP汁>,f.<2E>/
/ a6P汁&-E<><45><EFBFBD>.,訒セャg<00>2ヲ3<EFBDA6>5<>2ィp<EFBDA8>`<00>T<>ソ ,タシ<EFBE80><EFBDBC><EFBFBD>€", S<><EFBFBD><EFBDBC><EFBFBD>€$>シ!/</ <06>4/.<2E><>/ Nケ&<>)n<><6E> ,タシ-@<40><>&Lラ<4C><EFBE97><EFBFBD>4, ミシエキタU<>ソ>シ!/</
<06>4//
Nケ&<>ー|g3<>2ヲ3<EFBDA6>5<>2ィp<EFBDA8>`V+G -<08>+@I<>4G<34>エケヒd
gR形<52> "
メシ4吹ムュ`Bュ`
-m Zn
H€ミ| `H€€ n<><6E>(g* 
f$ n<><6E>(gH€Hタ.€?<NケェT<EFBDAA>
n<><6E>(gH€Hタ.€?<NケェT術`汗シ<00>l `エキタdJ㎜
ロS⑲ュ`覊㌶ -ーュ o+m .<2E><>.Rョ<52><EFBFBD> 蕫-@<40><><EFBFBD><EFBDAE> >シ!/.<2E><>/ /.<2E><>/
Nケ&<>Hタ,ンョ<EFBE9D><EFBDAE> <06>ムュ <06><06>ルタ -゚<>ー|g3<>2ヲ3<EFBDA6>5<>2ィp<EFBDA8>`fRョ<52><EFBDAE> 蕫-@<40><><EFBFBD><EFBDAE>b -ーョ<EFBDB0><EFBDAE> .<2E><><EFBFBD><EFBDAE>o U<>ソ+|<7C><><EFBFBD><EFBFBD>>シ"/.<2E><>/ /.<2E><>/
Nケ&<>Hタ".<2E><>,gF>シ"/</ <06>4/,/ Nケ&<>ー|g3<>2ヲ3<EFBDA6>5<>2ィp<EFBDA8>`T<>ソ>シ!/</ <06>4// Nケ&<>ー|gT .<2E><><EFBFBD>"J<> 
f セ<
g<
`S<>ヌRャ`メ ミシエキタe4>シ"/</ <06>4/.<2E><>/ Nケ&<>ー|g .<2E><><EFBFBD>$`T@J<> ,ーャ o)l .<2E><>0<>+@+m U -NqJ櫚゚8タN^NuNV<4E>魲W?. /.a:\蒐qN^NuNV<4E>魲W?. /.a"\蒐qN^NuNV<4E><56>>シ?. /.a\蒐qN^NuNVH<>Nケ',>JGl <<00>*E<><45>.<2E><06><><EFBFBD><EFBFBD>?<
NケェT<EFBDAA>.<2E><>H<EFBFBD>ニフシ<00><EFBFBD>0|
.<2E>?<NケェT秀<54>J㎜J<> fU `ロS⑳<53>腴㎜<18>
R<EFBFBD> "メシ<EFBE92><EFBDBC><EFBFBD>吹NqJ櫚゚ーュ o+m ショ<EFBDBC><EFBDAE>U .<2E><>セJ㌶ .<2E><>-gD>シ"/</
<06>4/-/
Nケ&<>ー|g3<>2ヲ3<EFBDA6>5<>2ィp<EFBDA8>`hU<>ソ>シ!/<3<>2ヲ3<EFBDA6>5<>2ィp<EFBDA8>`<00> .<2E><>€梳 .<2E><>€ルタ .<2E><> -ーュ o+m J㌶ .<2E><>-gB>シ"/</
<06>4/-/
Nケ&<>ー|g3<><00>)G ,タシ-@<40><>&Lラ<4C><EFBE97><EFBFBD>4 ミシエキタdDJ<44>@シ<fT ,ーャ o)l .<2E><><EFBFBD>6`シ<
fR騎ャ`
ニS<EFBE86>騎ャ`ー`<00><> ,ーャ o``<00>ヲJ櫚゚8潘^NuNV<4E><56><EFBFBD>*n(n ..-G<><47> -蕫-@<40><> -タシgj -ーョ<EFBDB0><EFBDAE>-gF>シ"/</
<06>4/-/
Nケ&<>ー|g3<><33>`メ>⑮ケ%V0<>エ*@ロ<>5ャJn fUJnfU.シ-<2D>/.Nケ*゙X繍@f U0`<00>.シ-<2D>/.Nケ*゙X繍@fU0`f>シ/.?Nケ!<21>8潘^NuNV<4E><56><EFBFBD>*n
B<EFBFBD>:.>ョNケ%シ(@ fp<>`レJ<EFBE9A>B@`,g3<> 2ヲ3<EFBDA6>5<>2ィp<EFBDA8>`,g>シ//
aホP汁<01>,g>シ/2ヲ3<EFBDA6>5<>2ィp<EFBDA8>`tU@ -蕫+@ -タシ<EFBE80><EFBDBC><EFBFBD>€"- S<><EFBFBD><EFBDBC><EFBFBD>€&>シ!/</
<06>4/-/
Nケ&<>`>シ€/
<06>4a X秀<58>4J㎜ワS<EFBE9C>5<EFBFBD>2ィp<EFBDA8>NqJ櫚゚タN^NuNVH<>>.p2總F@Hタチケ2錬@NqJ櫚゚€N^NuNVH<>>.ZGB€0€<>>RGJケ2「f <2<>#タ2「#タ2廝y2<>(y2「*Tエ*@ロ<>5ャ0.@BU+|<7C><><EFBFBD><EFBFBD>BュBュ B-I<>
ミシケタd<18> `<60>
ミシ0ケタdB`<60>櫚゚0N^NuNVH<>>.セ|e3<> 2ヲ3<EFBDA6>5<>2ィB@`0Rケ3Тy3<>. H€NqN^NuNVH<>><3<>3<EFBFBD>3<>#<23>3<>3<>><3E>/93<>?93€Nケj\床Ggp<>`B@NqJ櫚゚€N^NuNVH<>*n BmJnfB@,H€シ@g,H€Hタ.€?< NケェT<EFBDAA>.<2E>?.NケェT<EFBDAA>>,H€シ@g0F.<2E>?< NケェT<EFBDAA> ng nf0`セ|nB@`p<>NqJ櫚゚8タN^NuNVH<> *nSn<53><6E><EFBFBD> .<2E><>qN^NuNVH<> >.Hヌホシ<00><>gR<>*y5<>(Gル<47>5<>.君ケ鴫|<7C><>fp<>`
NqJ櫚゚0€N^NuNVH<> *n(MJgR形<52> 錐NqJ櫚゚0N^Nu`<60> .<2E><>qJ櫚゚8€N^NuNVH<>*n>. 0SGJ@oB`<60>櫚゚ €N^NuNV<4E><EFBFBD>*n.. <.-G<>鸙㎜, 
f0|
.<2E>?NケェT<EFBDAA>H€Hタ.€?NケェT輯㌔ミセmb60X@ーme(描&M0<>ラタ0-触7@&<26>(<28>;G#フ2「
\€`<>2「f>㌢*@
fB€`(M*T`ィJ櫚゚8€N^NuNVH<> >.゙|?<3F>昱0<>>€Nケ0<>エ*@ロ<>5ャ-f3<> 2ヲ3<EFBDA6>5<>2ィB@`
NqJ櫚゚ €N^NuNV<4E><56>H<EFBFBD>? *n.. (n,.:.B<>.シ<00>?< NケェT<EFBDAA>=@<40><>-H€ーn<EFBDB0><6E>g-H€`p=@>ョBg/.Nケ-@\<5C>:€NqJ櫚゚ N^NuNVH<>*nJmnA<>+H>シ/-?Nケト\<5C>;@Jmnp<>`Sm mH€タ|<00>RュNqJ櫚゚ N^(n >.Jg.JGg*H€Hタミシ2ェ @g
H€ミ|<7C>H€タR拘G`ホJ櫚゚0€N^NuNVH<> *n(n >.Jg"H€>€/92<><00>€f
JGgンSG`レNVH<>..,. J<>#<23>3* <€`Jシ㌘
#ヌ3*B€`<セ<>zB㌔(x<> 縲シ€b繙繖`猪<><EFA896><>割梟竚竡`<60>#ヌ3* NqJ櫚゚<00>^NuNVH<> .<2E><>qJ櫚゚ タN^NuNV<4E>ワH<EFBE9C>*n
0.<>エ(@ル<>5ャG<EFBDAC>.シ<00>?< NケェT<EFBDAA><F>シ /<06><><EFBFBD>ワ/
a<>*@ :f6.<2E><06><><EFBFBD>ワ/ / aP床|<7C><>fp<>`)<29>*@サ<><EFBDBB><EFBFBD><EFBFBD>fB€`
R€タシ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>*@(M9G.圭預 92「NqJ櫚゚0€N^NuNVH<> *n]<5D>(y2「サフcサヤeケヤeサヤeサフbサフf#フ2「`J(T`ワ
2-<>ミ?タ.€?< NケェT繍<54><00>.<2E>?<NケェT<EFBDAA>+G0x.<2E><06>?NケェT繍@g>ク|o895達€p 濺`BD-H€ーn<EFBDB0><6E>g0n<30><6E>.<2E>?< NケェT<EFBDAA> 2Hチミ@0NuNVH<>*n.溝<>>セ|<7C><>fp<>`4<フ|<00>瓰.溝<00>~>セ|<7C><>fp<>`0タ|<00>g <<3C><>掘0NqJ櫚゚ タN^NuNV<4E><56>>ョ?. /.Nケミ\蒐qN^NuNVH蹌
NqJ櫚゚0€N^NuNVH<>*n(n &nBGH€Hタミシ2ェ @g<>
H€゙@゙|<7C>G`リJg*H€Hタミシ2ェ @g
H€ミ|<7C>H€ミ|<7C>€R徽f *n(n JfJg&H€>€a,H€>€a"op`lp<>``メB@NqJ櫚゚0タN^NuNVH<>. セ<am
セ<zn<04>< H€NqJ櫚゚€N^NuJ<75>
.シ<><EFBDBC><EFBFBD><EFBFBD>l>シ /<06><><EFBFBD>ワR<EFBE9C>/
aイP<EFBDB2>*@ *f>シ?<?/ R湧ケリ\蹴<>>シ/ R<>/<06><><EFBFBD>ワa.P繍g .gp<>` .fN>シ /<06><><EFBFBD>ワ/
aTP<54>*@ *f>シー杷 T0(ムm T*秦*<2A> 2,<>ミ⊇タf 0-ムl(描(<28>#フ2「J櫚゚0N^NuNV<4E><56> .]€-@<40><> n<><6E>0(<>=@<40><>>ョ a<00>V-@<40><>B€`<00>.ョa<00>@ .Hダ€0Hタ怙0Hタヨ€0<04>Hタルタ`<00>v-H€ーn<EFBDB0><6E>g0n<30><6E>.<2E>?< NケェT<EFBDAA> NqJ櫚゚0<EFBE9F>^NuNVH<>|BGセ|l タケ2惑
2<>0`繙RG`<60>3<EFBFBD>2ヲ3<EFBDA6>>.0NqJ櫚゚€N^NuStack Overflow$C runtimeCON:LST: -op<>`B@NqJ櫚゚8€N^NuNVH<>>ョNケ%シ*@
fB@`-fB@`pNqJ櫚゚ N^NuNVH<>BGセ|l>㌢RG`<60>櫚゚€N^NuNVH<> 0.<>uNV<4E><56> y3€n*>シ/<06> ?<Nケj\床|gp<>`b. H€`ZJy34#<23>3<>3<>>シ/93<>?93€Nケj\床|gp<>`&3<>3<> y3<> ?<?/ <06> Nケリ\<5C>>シ/ <06> /<06><><EFBFBD>ワaハP<EFBE8A> nfH>シ?/ R湧ケ<00>€gp<>`<00>,H€シ@g,H€Hタ.€?< NケェT<EFBDAA>.<2E>?<NケェT<EFBDAA>ーョ<EFBDB0><EFBDAE>~0. ーn<EFBDB0><6E>=n <0C><> .<2E><>d&-n<><6E><EFBFBD>n<EFBFBD><6E> n<><6E>"n然ョRョ<52><EFBDAE>n<EFBFBD><6E>秡< .<2E><EFBFBD>2.<2E><><EFBFBD>-@<40><>0.<2E><>@B@H@ムョJn<4A><6E>Sョ<53><EFBDAE> n<><6E>"n<10>2<><>.,=:+-&/\|()[]*2<>!!!!"enミ_opena枩openbカ_readト__rdbinz__ttyinフ_writej__chrout「!彑_wrtbin「t__cleadfile [>outputfile]
C RTL -- Program not linked for floating point
$Cannot open Cannot create
<EFBFBD> <
N/ワ_noclear、/゙_main_usagej_openfil「酸outword「_readhdr「*_longsee「ヤ_hexbyワ_hexwdCP/M-68K(tm), Version 1.2, Copyright (c) 1983, Digitalr!v___open!<21>isatty$<24>__chinit「%4___chini「%V__chkc%シ__blkio&__chvec2論allocc',_freec N N N N N N <09> N N N
<EFBFBD> N <09> N N
: N N N N N N N N N N
<EFBFBD> @
Nシ_outhexnofloatЮpetoaЮpftoaЮ_main胆_err>_printf枩_doprtツ___prtin「 x__exitホ__break5酸_start___cpmrv。5胆_base5垣brk酸__BDO Research XXXX-0000-6543213<>'x_malloc'「_free(<28>_realloc「)(_sbrk)<29>errno2ヲ__errcpm、2ィ___atab2ェ_strlen*>_uldivr N N N N N N <09> N N N
<EFBFBD> N <09> N N
>

___prtld「 臉__prtsh「
論exit__cleanu「_fcloseP_fflushェ_fputc0__flsbuf「x__iob1「_c S903Sェ_fillリ__index<00>__pname、-㍉__tname、-狙__lname、-棒__xeof-媽couthd-彑ibuf-ク_ifilnam3*_uldiv*d__strcmp「*゙_sw_+V_fout3€_xputcha「+f_myflush「+<2B>xfopen,L_xgetc,契xgetw
loseネ_creat6__creat€_creataN_creatbf_lseek>_tellネ__filesz「秬open<15>_op0000FC
unable to open %s
read error on file: %s
file format error: %s
seek error on file %s
S2S1Usage: sendc68 [-] comman、/タ_datasta、/ト_bssstar、/ネ_loctr/フ_pflg/ミ_bcnt/メ_cksum/ヤ_syno/ヨ_ofn/リ_ofd,訐xopen-@_dup-^_symptr5ィ__fds5ャ裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹lo68 -r -o $1.68k s.o $1.o $2.o $3.o $4.o $5.o $6.o $7.o $8.o $9.o clib libe.a
裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹lo68 -r -unofloat -o $1.68k s.o $1.o $2.o $3.o $4.o $5.o $6.o $7.o $8.o $9.o clib
裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹