home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ZSYS
/
SIMTEL20
/
ZCPR3
/
DPROG.HLP
< prev
next >
Wrap
Text File
|
2000-06-30
|
8KB
|
242 lines
;
DPROG - Device Programmer
A ZCPR3 Tool
D - DPROG Summary 1 - Characters
P - DPROG Programming 2 - Format Specifications
3 - Word Definitions
4 - DPROG Commands
:D
Command: DPROG 1.0
Syntax:
DPROG <-- program from STD.DPG
DPROG filename <-- program from filename.DPG
DPROG filename.typ <-- program from filename.typ
Function:
DPRO╟á i≤á useΣ t∩ prograφ thσ devicσ a⌠á thσá Console¼ ì
List¼á o≥á PuncΦ Device«á I⌠ read≤ thσ indicateΣ o≥ implieΣ ì
filσ afte≥ ß patΦ searcΦ anΣ print≤ ou⌠ string≤ accordinτ t∩ ì
thσá format≤ containeΣ iε thσ file«á Thσ DPRO╟ too∞ caεá bσ ì
useΣ t∩ senΣ an∙ se⌠ oµ bytσ value≤ iε an∙ desireΣ forma⌠ t∩ ì
eithe≥ thσ Console¼ List¼ o≥ PuncΦ devices.
Options: None
Comments:
Thσá filσ useΣ t∩ prograφ thσ devicσ i≤ ßá conventiona∞ ì
ASCI╔ tex⌠ filσ whicΦ contain≤ fou≥ basiπ type≤ oµ lines:
1«á commen⌠á line≤ - thosσ line≤ whosσ firs⌠á non-ì
blanδ characte≥ i≤ ß semicoloε (;)
2« worΣ definitioε line≤ - thosσ line≤ tha⌠ begiε ì
witΦ ß dasΦ (-⌐ iε columε onσ followeΣ immediatel∙ b∙ ß word
3«á DPRO╟á commanΣ line≤ - thosσ line≤á beginninτ ì
witΦ ß specia∞ commanΣ characte≥ t∩ DPROG
4«á outpu⌠ line≤ - an∙ othe≥ linσ whicΦ doe≤á no⌠ ì
fi⌠á onσá oµá thσ threσ type≤ oµ line≤á above╗á thesσá line≤ ì
generatσ thσ outpu⌠ whicΦ i≤ sen⌠ t∩ thσ device
Thσá detail≤á oµá ho≈ t∩ writσ program≤á iεá thσá DPRO╟ ì
languagσ arσ covereΣ elsewherσ iε thi≤ HL╨ file.
Selected Error Messages: Self-explanatory
Examples of Use:
DPROG -- program from STD.DPG
DPROG ASM -- program from ASM.DPG
:P
DPROG Programming
DPRO╟á i≤á ßá 3╦ interprete≥ fo≥ ßá devicσá programminτ ì
language«á Word≤ (ß symbo∞ u≡ t∩ 1╢ character≤ long⌐á whicΦ ì
contaiεáá an∙áá combinatioεáá oµáá outpu⌠áá forma⌠áá contro∞ ì
instructions¼á tex⌠á strings¼á anΣ reference≤ t∩ othe≥ word≤ ì
caε bσ defineΣ iε thi≤ language« Oncσ ß worΣ i≤ defined¼ i⌠ ì
caεá bσá nameΣá iεá aεá outpu⌠á line¼áá anΣá it≤á definitioε ì
(includinτ embeddeΣ forma⌠ controls⌐ wil∞ bσ translateΣá anΣ ì
outpu⌠á t∩á eithe≥ thσ console¼á printer¼á o≥ puncΦá device« ì
WorΣá reference≤ caε bσ nesteΣ u≡ t∩ 12╕ level≤á deep«á Fo≥ ì
example:
;
; Sample DPROG programming file
;
; Define Basic Words
-esc (%c) "\E" ; the escape character
-ctrly "^Y" ; the character control-Y
-test (Char: %c %x %d\n) ; character test format
-normal_form (%c) ; normal output format
;
; Use Words
;
"This is a test\n" test "ABC" normal_form "\nEnd of Test"
Thσá outpu⌠ froφ thσ executioε oµ thσ outpu⌠ linσá wil∞ ì
be:
This is a test
Char: A 41 65
Char: B 42 66
Char: C 43 67
End of Test
UseΣ iε conjunctioε witΦ botΦ forma⌠ definition≤ (wherσ ì
the∙á arσ outpu⌠ literally⌐ anΣ quoteΣ string≤á (wherσá the∙ ì
arσ outpu⌠ accordinτ t∩ thσ curren⌠ forma⌠ definition)¼á thσ ì
followinτ escapσ sequence≤ apply:
^c Define control character (2-char sequence)
\b Backspace char
\d Delete char (DEL)
\e Escape char (ESC)
\l New Line char (CRLF pair)
\n Line Feed Char (LF)
\r Carriage Return char (CR)
\t Tab char (TAB)
\# Numeric value (forms are \d for decimal, \dH
for hex, \dq for octal, \dB for
binary: \1, \245, \33h, \0feH, \111b,
\77q, etc)
Additionally¼ thσ forma⌠ expressioε i≤ oµ thσ form
(<format text>)
wherσá <forma⌠á text╛ caε contaiε an∙ characte≥ sequencσá a≤ ì
wel∞ a≤ recognizσ thσ followinτ outpu⌠ directives:
%c Output chars as ASCII characters
%d Output chars as floating decimal ASCII chars
%x Output chars as 2 hex ASCII chars
%2 Output chars as 2 decimal ASCII chars
%3 Output chars as 3 decimal ASCII chars
An∙ tex⌠ caε surrounΣ thesσ outpu⌠ directives¼ anΣ eacΦ ì
directivσá caε bσ useΣ a≤ man∙ time≤ a≤ desireΣ iε ßá forma⌠ ì
expression«á Oncσ ß forma⌠ expressioε i≤ given¼á i⌠ i≤ useΣ ì
unti∞ ß ne≈ expressioε i≤ defined« Fo≥ example:
(%x %d ) "\12\10hA" (%c) "\12\10hA"
will output:
0C 12 10 16 41 65 ^L^PA
wherσá ^╠á anΣá ^╨ arσ thσá ASCI╔á control-╠á anΣá control-╨ ì
characters.
Finally¼á t∩á makσ al∞ oµ thi≤ complete¼á thσ use≥á caε ì
direc⌠ outpu⌠ t∩ thσ console¼á printer¼ o≥ puncΦ a⌠ an∙ timσ ì
(fo≥ programminτ whateve≥ devicσ yo⌡ wan⌠ t∩ program)¼ therσ ì
arσá debugginτ command≤ (pausσ t∩ examinσ output¼á dum≡ worΣ ì
definitioε table¼á dum≡ forma⌠ expression)¼á anΣ yo⌡ caε se⌠ ì
u≡ a≤ man∙ *.DP╟ file≤ tha⌠ yo⌡ wan⌠ t∩ prograφ ß variet∙ oµ ì
functions«á DPRO╟ i≤ ß truσ ZCPR│ utility¼á anΣ i⌠ searche≤ ì
thσá patΦá fo≥ thσ *.DP╟ files¼á s∩ thσ *.DP╟ file≤á caεá bσ ì
retaineΣá iε thσ ROO╘ director∙ anΣ the∙ wil∞ bσ founΣá froφ ì
an∙ director∙ oε thσ system.
DPROG is used by issuing a command of the form:
DPROG filename.typ <-- program from filename.typ
DPROG filename <-- program from filename.DPG
DPROG <-- program from STD.DPG
DPROG¼á oµá course¼á caε bσ useΣ withiε aεá alias¼á ZE╪ ì
commanΣ file¼ o≥ an∙ othe≥ ZCPR│ environment« Fo≥ instance¼ ì
thσ followinτ WorΣ Sta≥ alia≤ i≤ reasonable:
IF NEC=$2
DEV L NEC <-- assign printer
WSN $1 <-- run NEC version of WS
ELSE
DEV L TTY <-- assign printer
DPROG CORRESP <-- program printer for
correspondence
WS $1 <-- run proper version of WS
FI
:1
Thσá followinτá symbol≤á arσá useΣá t∩á definσá specia∞ ì
characters under DPROG:
^c Define control character (2-char sequence)
\b Backspace char
\d Delete char (DEL)
\e Escape char (ESC)
\l New Line char (CRLF pair)
\n Line Feed Char (LF)
\r Carriage Return char (CR)
\t Tab char (TAB)
\# Numeric value (forms are \d for decimal, \dH
for hex, \dq for octal, \dB for
binary: \1, \245, \33h, \0feH, \111b,
\77q, etc)
:2
Thσ followinτ escapσ sequence≤ (thσ escapσ characte≥ i≤ ì
%⌐ arσ valiΣ iε forma⌠ specification≤ (whicΦ arσ encloseΣ iε ì
parentheses) under DPROG:
%c Output chars as ASCII characters
%d Output chars as floating decimal ASCII chars
%x Output chars as 2 hex ASCII chars
%2 Output chars as 2 decimal ASCII chars
%3 Output chars as 3 decimal ASCII chars
:3
A word definition under DPROG takes the following form:
-word_symbol text_of_definition
where "-" is the first character in the line.
:4
è Thσáá followinτá DPRO╟á command≤á arσáá availablσáá fo≥ ì
debugging and other purposes:
Output Direction:
>C Direct Output to Console
>L Direct Output to List (Printer)
>P Direct Output to Punch
Data Dump:
= Dump both Word Table (Symbols) and Format
=F Dump current Format Specification
=S Dump current Word Table (Symbol Table)