*******************************************************************************
* data v1.2.1
*******************************************************************************

	section	MiscData,DATA

*******************************************************************************
* variables

	cnop	0,4
_DOSBase	dc.l	0
_StdOut	dc.l	0	;standard output handle

WrkBufAdr	dc.l	0	;work buffer adr
WrkBufLen	dc.l	0	;work buffer length
ChnkSize	dc.l	0	;chunk length
InFileHnd	dc.l	0	;source file handle
InFileSze	dc.l	0	;size of source file
ExtnAdr	dc.l	0	;ptr to extension
MaxChnk	dc.l	0	;highest chunk #
DgtNmb	dc.l	0	;min necessary length of extension

flags	dc.b	0	;see defs.i for bit allocations

*******************************************************************************
* tables

	cnop	0,4
ErrTab	dc.l	txt_AllDne,txt_LowMem,txt_SouFle
	dc.l	txt_ChnkSz,txt_DstFle,txt_ChnkNb
	dc.l	txt_UsrBrk

*******************************************************************************
* texts

_DOSName	dc.b	"dos.library",0

txt_vers	dc.b	"$VER: sss v1.1 (20.11.1998)",0
txt_title	dc.b	10,"›1msss v1.1›0m (20.11.1998) - © 1998 Simone Bevilacqua",10,10,0
txt_InfoArrow	dc.b	" -> ",0
txt_InfoBytes	dc.b	" bytes"
txt_ENTER	dc.b	10,0
txt_writing	dc.b	13,"writing          : ",0
txt_InfoFName	dc.b	"source file name : ",0
txt_InfoFSize	dc.b	"source file size : ",0
txt_InfoOFile	dc.b	"chunks file names: ",0
txt_InfoCSize	dc.b	"chunks size      : ",0
txt_InfoBSize	dc.b	"buffer size      : ",0

txt_error	dc.b	"ERROR: ",0
txt_AllDne	dc.b	"all done!",10,10,0
txt_LowMem	dc.b	"not enough memory!",10,0
txt_SouFle	dc.b	"can't read from source file",10,0
txt_DstFle	dc.b	"can't write to destination",10,0
txt_ChnkSz	dc.b	"wrong chunk size",10,0
txt_ChnkNb	dc.b	"too many chunks (max. 10000)!",10,0
txt_UsrBrk	dc.b	"***Break",10,0
txt_UsgHlp	dc.b	"  ›1mSYNTAX›0m",10,10
	dc.b	"    sss [›1m-q›0m] ›1mInputFile ChunkSize ›0m[›1mOutBase›0m]",10,10
	dc.b	"  ›1mARGS›0m",10,10
	dc.b	"    ›1m-q       ›0m = quiet mode: don't print any message",10
	dc.b	"    ›1mInputFile›0m = name of the file to split",10
	dc.b	"    ›1mChunkSize›0m = size in bytes of each chunk",10
	dc.b	"                (0 < ChunkSize < $7fffffff = 2,147,483,647)",10
	dc.b	"    ›1mOutBase›0m   = output files will be called ›1mOutBase›0m.x",10
	dc.b	"                (000 <= x <= 99,999; by default ›1mOutBase›0m = ›1mInputFile›0m)",10,10
	dc.b	"  ›1mNOTE›0m",10,10
	dc.b	"    execution can be stopped by pressing ›1mCTRL-C›0m anytime",10,10,0

*******************************************************************************
* buffers

	section	bufs,BSS
InFile	ds.b	1024	;file to split
OutBase	ds.b	1024
CmdLn	ds.b	514	;command line string

	cnop	0,4
TmpBuf	ds.b	256
