home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Current Shareware 1994 January
/
SHAR194.ISO
/
dos_util
/
pcmcvt.zip
/
PCMASM.ZIP
/
PCMDATA.INC
< prev
next >
Wrap
Text File
|
1993-05-29
|
8KB
|
171 lines
;PCMData.INC
;Copyright (c) 1993 Jay Munro
;First published in PC Magazine June 29 1993
;Data file for PCMCVT.ASM
;---- File Declaration section
ParseFileName Proto Near, FileAddr:Ptr
Seek Proto Near, Handle1:Word, Pointer:Dword
OpenFile Proto Near, FileName:Word, Attr:Word
Read Proto Near, Handle2:Word, Buffer:Word, BufSize:Word
Write Proto Near, Handle3:Word, Buffer:Word, BufSize:Word
Exist Proto Near, FileSpec:Word
Close Proto Near, Handle4:Word
StrCmp Proto Near, SrcString:Ptr, CmpString:Ptr, StrLength:Word
SearchString Proto Near, Strt:Word, Srce:Word, SLen:Word, Srch:Word, SrcLen:Word
ShowBuffer Proto Near, AddrWriteBuffer:Word,BufLen:Word
WordWrap Proto Near, WBuffer:Word, WBLen:Word
Text2Num Proto Near, MaxWidthText:Word, MaxWidth:Word
PrintLine Proto Near, MessagePtr:Word
;---- Data section
Copyright DB 'PCMCVT Version 1.0 ■ Copyright (c) 1993 Jay Munro',10,13
DB 'First Published in PC Magazine June 29,1993',10,13,'$'
;User selection
DefExtension DB '.TXT',0 ;default extension for dest file
FileType DW 0 ;file type found
;internal stuff
OldInt24IP DW ? ;old interrupt 24h instruction ptr
OldInt24CS DW ? ; "" code segment
DOSErrCode DW ? ;save error code
CritErrFlag DW ? ;verify that a critical error occurred
ErrorNum DW 0 ;error number used for file routines
HelpScreen DB 10,13
DB 'Syntax:',10,13
DB ' PCMCVT /S source [/D destination] [/Wxx] [/O] [/Tx] [/?] ',10,13
DB 10,13
DB '/S - Source file: You must specify a source file.',10,13
DB ' File extensions need not match file type but must be included.',10,13
DB '/D - Destination file name: the default is the same name as source file',10,13
DB ' but with a .TXT extension.',10,13
DB ' If /O is not specified, you will be warned if file exists.',10,13
DB '/Wxx - Word wrap: forces word wrap at xx line length.',10,13
DB ' Default is 78 characters if just /W specified.',10,13
DB '/O - Overwrite destination file if it exists.',10,13
DB '/Tx - Tab: Sets tab expansion where x is number of spaces to use.',10,13
DB '/? - This Help screen',10,13,'$'
WordWrapFlag DB 0
MaxWidthText DB 10 dup (0) ;give them some room
MaxWidth DW 78
TabWidthText DB 10 dup (0) ;give them some room
TabWidth DW 1
TabFlag DB 0
CRLF_FLAG DB 0 ;used in AMI module only
OverWriteFile DW 0
DTA DB 66 Dup (?) ;disk transfer area
TopEnd DW 0 ;top of input buffer address
;--- word wrap data
LastCRLF DW 0
CRLF DB 13,10
;--- misc data
BulletChar DB '*'
;--- File data
SourceFile DB 68 Dup (0) ;buffer for source file
DestFile DB 70 Dup (0) ;buffer for destination file
SHandle DW 0 ;file handle for source file
DHandle DW 0 ;file handle for destination file
ReadBuffer DB 2048 Dup (?) ;read file buffer
BufferSize DW 2048 ;$ - ReadBuffer
WriteBuffer DB 2048 Dup (?) ;write file buffer
WBufferSize DW 2048 ;$ - WriteBuffer
DestFileThere DB 0 ;flag for destination file
SourceFileThere DB 0 ;flag for source file
HeaderBuffer DB 256 Dup (0) ;buffer for header
FilePointer DD 0 ;current File pointer
EOFFlag DW 0
;--- ID header's data structs
;--- WordPerfect
WPerf51 Struc
WPCorpID DB 4 Dup (0) ;wordperfect id
WPDocStart DD 0 ;offset of start of document
WPProdtype DB 0 ;product type
WPFieldtype DB 0 ;product specific variable
WPMajorVer DB 0 ;major of product
WPMinorVer DB 0 ;minor version of product (0 for WP5.0,1 for 5.1)
WPEncryptKey DW 0 ;0h = not encrypted
WPReserved DW 0 ;usually 0h
WPerf51 EndS
WPerfID DB 0FFh,'WPC',0 ;WPerf ID string
InFunction DB 0 ;flag for in single or multi byte function
MSWordDOS Struc
MSWdwIdent DW 0BE31H ;Signature (magic number)
MSWddtyDW DW 0 ;Document type
MSWdwTool DW 0AB00H ;Signature
MSWdpnNextFib DW ? ;Pointer to incremental save
MSWdpnChar DW ? ;Pointer to Char formatting
MSWdpnPlcpcd DW ? ;Pointer to piece table
MSWdfcres DW ? ;
MSWdfcMac DW ?,? ;File char pos of file end
MSWdpnPara DW ? ;Location of para formatting
MSWdpnFntb DW ? ;Location of footnote table
MSWdpnBkmk DW ? ;Bookmarks and sequence info
MSWdpnSetb DW ? ;Section table
MSWdpnBftb DW ? ;Buffer table
MSWdpnSumd DW ? ;Summary information
MSWdszSsht DB 66 DUP(?) ;Style sheet path
MSWdwReserve DW ? ;For Windows Write use
MSWdrgchPrtNm DB 8 DUP(?) ;Printer name
MSWdpnMac DW ? ;One past end of document
MSWdDOP DB 8 DUP(?) ;Document properties
MSWdversion DB ? ;word version
MSWdfAsv DB ? ;Autosave
MSWdpnPagb DW ? ;Word 5.0 page table
MSWdpnMacBkmk DW ? ;Mac of Bkmk stuff
MSWdpnFilename DW ? ;Only used for Asv files
MSWdpnRhtb DW ? ;Running head table
MSWdcodepage DW ? ;codepage
MSWordDOS EndS
;signatures (magic numbers)
MSWordDosID DB 31h,0BEh,0 ;Word for DOS
MSWordWinID DB 0DBh,0A5h,0 ;Winword 2
MSWordWinID1 DB 09Bh,0A5h,0 ;Winword 1
MSWordWin Struc ;short version
MSW4wwIdent DW 0DBA5H ;Signature (magic number)
MSW4wnFib DW 0 ;fib version written
MSW4wnProduct DW ? ;
MSW4wpnLid DW ? ;
MSW4wpnNext DW ? ;
MSW4wfComplex DW ? ;fast saving process
MSW4wfEncrypt DW ? ;
MSW4wfnFibBack DW ?,? ;
MSW4wrgwspare DW ?,?,? ;reserved
MSW4wfcMin DW ?,? ;
MSW4wfcMac DW ? ;
MSW4wcbMac DW ? ;
MSWordWin EndS
;strings used in file
DefaultExtension DB '.TXT'
SourceRequired DB 'You must specify a source file!',10,13,'$'
NotKnown DB 'Sorry, Unknown format',10,13,'$'
WPerfName DB 'WordPerfect',10,13,'$'
MSW4DName DB 'Word For DOS',10,13,'$'
MSW4WName DB 'Word For Windows 2.0',10,13,'$'
MSW4WName1 DB 'Word For Windows 1.x',10,13,'$'
AMIName DB 'AMI Pro 2.0',10,13,'$'
WRIName DB 'Windows Write',10,13,'$'
AMIProID DB '[ver]',0
AmiEdoc DB '[edoc]',0